在安卓系统中设置按钮的宽度
如何为安卓按钮设置固定宽度?每次我尝试设置固定宽度时,它都会填充当前父项(相对视图)。这是我的XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/relativelayout" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
<EditText android:layout_height="wrap_content" android:editable="false" android:layout_width="fill_parent" android:id="@+id/output"></EditText>
<Button android:layout_height="wrap_content" android:id="@+id/Button01" android:layout_below="@id/output" android:text="7" android:layout_width="wrap_content"></Button>
<Button android:layout_below="@id/output" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/Button02" android:layout_toRightOf="@+id/Button01" android:text="8"></Button>
<Button android:layout_below="@id/output" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/Button03" android:layout_toRightOf="@+id/Button02" android:text="9"></Button>
</RelativeLayout>
如何给它一个固定的宽度?
更新
假设我有几个按钮,我想要彼此相同的大小和整个视图的1/3(纵向),然后我想要一个宽度加倍的按钮。然后是一个高度加倍的按钮。我怎么能完成这个手动调整它们的大小?