问题描述
我正在尝试找出相对布局的布局参数之间的差异,特别是alignParentRight和alignParentEnd(以及alignParentLeft和alignParentStart).阅读参考资料并没有多大帮助,我认为父母的结尾永远是对的.这有什么区别吗?现在折旧了吗?
I'm trying to figure out the difference between the layout params for relative layout, specifically alignParentRight and alignParentEnd (also alignParentLeft and alignParentStart). Reading the reference doesn't help much, I figured the end of a parent was always its right. Is there any difference to this? Is one depreciated now?
推荐答案
仅适用于从左到右(LTR)的语言.对于从右到左(RTL)的语言(例如希伯来语,阿拉伯语),结尾是左,开始是右.如果使用end
和start
属性,则在设置为RTL语言环境的设备上运行布局时,该布局将镜像.如果使用left
和right
,它将不会镜像.
Only for left-to-right (LTR) languages. For right-to-left (RTL) languages (e.g., Hebrew, Arabic), end is left and start is right. If you use end
and start
attributes, your layout will mirror when it is run on a device set to an RTL locale. If you use left
and right
, it will not mirror.
这篇关于Android相对布局alignParentRight和AlignParentEnd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!