gpt4 book ai didi

android - 相对布局 : difference between layout_alignBottom and layout_above

转载 作者:太空狗 更新时间:2023-10-29 15:30:06 24 4
gpt4 key购买 nike

我已经阅读了有关相对布局的这两个属性的文档,并尝试了一些示例,但仍然无法识别它们之间的区别。我已经尝试了一些测试,但我经常得到相同的结果,有时,不同的,但我无法解释。

Android 文档的描述如下:

android:layout_above
Positions the bottom edge of this view above the given anchor view ID. Accommodates bottom margin of this view and top margin of anchor view.

android:layout_alignBottom
Makes the bottom edge of this view match the bottom edge of the given anchor view ID. Accommodates bottom margin.

谢谢:)

最佳答案

这张图片说明了一切:)

enter image description here

上图: View 的底部边缘放置在 View A 的顶部边缘

alignBottom: View 的底部边缘与 View B 在同一条线上。

关于android - 相对布局 : difference between layout_alignBottom and layout_above,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19890973/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com