Use or not use margin_start?

0

Many times when I give a left margin to a view using the xml attribute 'android: marginLeft' android studio I get a warning saying that I consider adding also android: marginStart.

When I add it with the same value the warning disappears.

I understand that marginStart is for apis higher than 17, so the reason for using it is that? MarginLeft for apis below 17 and marginStart for superiors to 17, I also understand that marginLeft works on those above 17, so why do you recommend it? What is its function?

    
asked by Reductor 31.10.2017 в 10:26
source

1 answer

1

The purpose is to support the RTL option (right to left). From api 17, Android supports the languages that are written from right to left like Arabic. In that sense, if you want to create a margin before the beginning of the text, with margin-start it will always be created at the beginning regardless of the language. In the manifest you have a supportsRtl option to enable / disable those options. Greetings

    
answered by 31.10.2017 / 11:15
source