简体   繁体   中英

android:textDirection=“locale” for api 15

i try to make my text aligned according to my android locale.

In my TextView I have tried:

android:textDirection="locale"

but that's for API 17 and above.

I have tried:

android:gravity=start

but my text is aligned according to the text locale and not the device locale.

how can i fix this to api 15?

Did you try:

android:textAlignment="viewStart"
android:layout_gravity="start"

or

android:textAlignment="viewStart"
android:gravity="start"

layout_gravity or gravity is needed for API < 17

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM