我想使按鈕佔用每個對話框寬度的一半,謝謝x3。 如何使按鈕分享一半在android中的對話框的寬度?
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:paddingBottom="10dp"
android:paddingLeft="10dp" android:paddingRight="10dp">
<TextView android:layout_width="fill_parent"
android:layout_height="1dip" android:background="#FFFFFF" android:id="@+id/seperator_line" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/text1"
android:text="Amount:" android:textColor="#FFFFFF"
android:layout_below="@id/seperator_line" android:padding="10dp" />
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/deleteButton_dialog"
android:layout_below="@id/text1" android:text="Delete" />
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/cancelButton_dialog"
android:text="Cancel" android:layout_toRightOf="@id/deleteButton_dialog"
android:layout_below="@id/text1" />
</RelativeLayout>
發佈您的代碼和圖片,如果可以的話。如果沒有更多的東西可以解決,那麼任何人都不可能告訴你發生了什麼。 – FoamyGuy
螺絲它大聲笑il只是做一個textview而不是 –
我改變了這個問題,你可以幫助那個嗎?謝謝x333 –