我希望三個按鈕間隔相等,大小相同。當其中一個按鈕的文本超過3個單詞(新行)時,按鈕會如圖所示下降。有沒有一種方法可以解決所有三個按鈕都在同一行中的問題?我嘗試使用TableLayout
/但它沒有幫助。高度不匹配 - 按鈕
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/linearLayout1"
android:layout_alignParentBottom="true" android:layout_width="fill_parent"
android:layout_height="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android">
<Button android:text="Trade"
android:layout_weight="1" android:layout_height="wrap_content"
android:layout_width="0dip" ></Button>
<Button android:text="Set Alert"![enter image description here][2]
android:layout_weight="1" android:layout_height="wrap_content"
android:layout_width="0dip" ></Button>
<Button android:text="Add to watchlist"
android:layout_weight="1" android:layout_height="wrap_content"
android:layout_width="0dip"></Button>
</LinearLayout>
我不能看到你所提到的圖片。你忘了添加鏈接嗎?會非常有幫助的,我無法弄清楚你想要從文本中完全做什麼。 – 2011-07-20 23:28:23
錯過了之前添加圖片。它現在在那裏。 –