在相对视图组中,我们可以将一个视图放置在另一个视图之上或之下:“layout_above”和“layout_below”。 等等...
现在,我遇到的问题是,如果我想将一个视图放置在另一个视图的中心(不一定位于父视图的中心),我该怎么办?
当然,它可以使用边距来实现,但它不能提供精确的修复,并且可能会很烦人......
<...
android:id="@id/View_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/View_1"
android:layout_toRightOf="@+id/View_1"
..../>