1
我的XML文件有問題。 我有兩個自定義大小的按鈕。 我想調整按鈕的大小相對於屏幕的大小。如何設置按鈕之間的距離?
在圖片1上,你可以看到它們應該有多大。
在圖片2,你可以看到,他們是太遙遠又小。
我知道我沒有設置是否正確。 (主要是android:layout_width)但是如何設置?
這裏是我的XML代碼:
<Button
android:id="@+id/button2"
android:layout_width="130dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:background="#99000099" />
<Button
android:id="@+id/button1"
android:layout_width="130dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:background="#99990000" />
感謝您的回覆! :)
你使用什麼佈局作爲它們的容器? – 2013-03-03 16:09:52
發佈完整的佈局文件並更多地闡明您的問題。 – 2013-03-03 16:12:53