相对布局:layout_alignBottom和layout_above之间不同

hqt*_*hqt 2 android relativelayout android-layout

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

以下是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.
Run Code Online (Sandbox Code Playgroud)

谢谢 :)

fge*_*iew 18

看图像它解释了一切:)

在此输入图像描述

上图:视图的下边缘位于视图A的上边缘

alignBotton:视图的下边缘与视图B在同一条线上.

  • 图像超过1000个单词. (2认同)