android - paddingStart/Left and paddingEnd/Right -


in recent code writing times i've seen single element contain paddingleft/right, paddingstart/end, , both.

can't seem find on better , why. have insight / when use 1 or other or both?

you need new start/end properties create nice right-to-left layout, used in countrys people read right left.

there no better version, newer version.

if want support android versions prior android 4.2, should use old , new properties together. if want support android 4.2 , newer versions, it's ok use new properties paddingstart (instead of paddingleft).

there nice explanation available on android developers blog:

to take advantage of rtl layout mirroring, make following changes app:

  1. declare in app manifest app supports rtl mirroring.

    • specifically, add android:supportsrtl="true" element in manifest file.
  2. change of app's "left/right" layout properties new "start/end" equivalents.

    • if targeting app android 4.2 (the app's targetsdkversion or minsdkversion 17 or higher), should use “start” , “end” instead of “left” , “right”. example, android:paddingleft should become android:paddingstart.

    • if want app work versions earlier android 4.2 (the app's targetsdkversion or minsdkversion 16 or less), should add “start” , end” in addition “left” , “right”. example, you’d use both android:paddingleft , android:paddingstart.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -