[英]Android: set textview rtl
I`m trying to set the gravity of textview to right: 我正在尝试将textview的重力设置为正确:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="6dp"
android:textDirection="anyRtl"
android:textSize="18sp"
android:gravity="right"
android:textColor="#000000">
</TextView>
In all the phones I tested it`s ok exept GT-S5830 (2.3.4), in the GT only if I remove the android:gravity="right" it set to right. 在所有我测试过的手机中,都可以使用GT-S5830(2.3.4),只有在GT中,如果我将设置为right的android:gravity =“ right”删除,就可以使用GT。
Thanks 谢谢
试试这个android:layout_gravity =“ right”
Use from this : 从这里使用:
<TextView
android:id="@+id/txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.