0
如何在另一个视图的顶部和中间找到一个视图?所以我想要一个ImageButton
和TextView
它下面,但第一个是在中心和第二个之上。如何查看另一个顶部和中间的视图?
如何在另一个视图的顶部和中间找到一个视图?所以我想要一个ImageButton
和TextView
它下面,但第一个是在中心和第二个之上。如何查看另一个顶部和中间的视图?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:id="@+id/textView1" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="SOME TEXT HERE"
android:layout_centerInParent="true" />
<ImageButton android:src="@drawable/icon" android:id="@+id/imageButton1"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" />
</RelativeLayout>
您可以使用FrameLayout实现这一
如果我需要有两连胜按钮和文本的意见? – Eugene 2011-05-10 12:01:53
@AndroidNoob:对于更多的列将更正后的解决方案用'layout_weight =“1”包装到'TableLayout'或'LinearLayout'中,孩子将是最好的选择。 – rekaszeru 2011-05-10 12:04:56
在@rekaszeru哈哈大声笑我读了他的笔记,因为他字面上想要textview BELOW(z-index)textview。我猜它太早,我没有足够的咖啡。 – jkhouw1 2011-05-10 12:07:26