在RelativeLayout中居中放置ImageButton和TextView
问题描述:
android:layout_gravity="center"
似乎在RelativeLayout
中的作用与在LinearLayout
中的作用不同。在RelativeLayout中居中放置ImageButton和TextView
我想要一个ImageButton
和TextView
集中在RelativeLayout
- 是否有一个基本的xml
代码呢?
答
android:layout_centerHorizontal="true"
另外:
android:layout_centerInParent
android:layout_centerVertical