您可以爲從右到左的語言定義其他佈局。您應該將其放置到您的語言代碼>的佈局<。
如果字符串太大,也可以截斷並替換字符串的最後一個字符。 你可以做到這一點採用了android:ellipsize和android:單線屬性:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/text_mytext"
android:ellipsize="end"
android:singleLine="true"
/>
另一種方法是定義dimens.xml文字大小需要語言和按如下方式使用它:
在dimens.xml
:
<dimen name="text_size">32sp</dimen>
佈局:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/text_mytext"
android:textSize="@dimen/text_size"
/>
安置自己的佈局,你的代碼 –