而汉语,日语以及朝鲜语中存在Top-to-bottom, right-to-left从上到下,从右向左的情况. 但是这些语言大多数使用从左向右的情况.
常见的RTL语言有阿拉伯语,希伯来语等....LTR语言和RTL语言刚好相反,即我们常见的Left-to-right,Top-to-bottom,从左向右,从上到下,朝右继续.这种语言很常见, 代表语言为英语等....未加入android:supportsRtl=“true” 阿拉伯语(RTL)的示例.
?
加入该属性的英文(LTR)语言效果.
?
加入该属性的阿拉伯语(RTL)语言效果.
?...android:background="#ccefc8"
android:text="@string/share"
/>
上述代码在阿拉伯语下的效果图:
?...高级处理
android:layoutDirection 设置组件的布局方向
android:textDirection 设置组件文字的方向
android:textAlignment 设置组件文字的对齐