Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我搞砸了imageviews,我可以imageview用下面的代码在中心水平对齐一个:
imageviews
imageview
android:layout_centerHorizontal="true"
现在我的主要问题是我有 Ximageviews并且当我像这样对齐它们然后使用 时android:layout_toRightOf="",它们只是从中间开始。
android:layout_toRightOf=""
该怎么办?
一个快速的解决方案,您将第一个向左对齐,然后是下一个图像视图(从您的布局中toRightOf= 删除)android:layout_centerHorizontal="true"
toRightOf=
将它们包裹在以您的 RelativeLayout 为中心的水平 LinearLayout 中