1
我把TextView
放在一個帶有const字符串的佈局中。字符串很長,所以我定義了兩行TextView
。問題是第二行從右側開始,而不是從中心開始。我怎麼能對齊TextView
是從中心TextView與兩行對齊
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/str_item"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_gravity="center_horizontal" android:lines="2" android:textColor="@color/Red"/>