我有一個在同一行上有一個imageview和textview的XML佈局。這工作完美,但現在我想在這下面放置三個按鈕,我不能找出什麼佈局來實現這些按鈕,因爲佈局只是在圖像和文本視圖之間的行內設置。XML佈局,在一個列表視圖/文本視圖下的按鈕
下圖顯示了我試圖實現什麼。 (B1,B2和B3代表按鈕)
誰能給我推在如何我能得到這個佈局方向是正確的?
我的繼承人XML:現在放錯地方的TextView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imgLink"
android:layout_width="78dp"
android:layout_height="match_parent"
android:src="@drawable/cons" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="75dp"
android:gravity="center"
android:text="Contacts"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="40sp" />
</LinearLayout>
</LinearLayout>
佈局/佈局
你可以做一個相對佈局instea d並根據需要使用layout_below和layout_toRightOf參數。 – sam
@ user1352057嘗試發佈解決方案,根據您的要求設置佈局。 –