美文网首页
Andriod 笔记

Andriod 笔记

作者: 芒果儿1 | 来源:发表于2020-08-23 21:02 被阅读0次

1.Andriod 中的supportsRtl

android:layout_marginStart:如果在LTR布局模式下,该属性等同于android:layout_marginLeft。如果在RTL布局模式下,该属性等同于android:layout_marginRight。

android:layout_marginEnd:如果在LTR布局模式下,该属性等同于android:layout_marginRight。如果在RTL布局模式下,该属性等同于android:layout_marginLeft。

其实android:supportsRtl属性就是表明app是否支持从右往左的布局,如果把这个属性默认是false,那么app在任何情况下都不会出现从右往左的布局。如果把这个属性默认是true,并且targetSdkVersion设置为17或更高时,那么当手机在诸如阿拉伯语、希伯来语等环境中,会自动修改为从右往左的布局。可以用android:supportsRtl=“false”来解决从右往左的问题。

相关文章

网友评论

      本文标题:Andriod 笔记

      本文链接:https://www.haomeiwen.com/subject/jzuwjktx.html