id相对布局alignParentRight和AlignPare

id相对布局alignParentRight和AlignPare

本文介绍了Android相对布局alignParentRight和AlignParentEnd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找出相对布局的布局参数之间的差异,特别是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)的语言(例如希伯来语,阿拉伯语),结尾是左,开始是右.如果使用endstart属性,则在设置为RTL语言环境的设备上运行布局时,该布局将镜像.如果使用leftright,它将不会镜像.

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 09:43