的1/3我在XML中有两个按钮是这样的:设置按钮的高度与宽度
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:background="@drawable/button1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="10dp"/>
<Button
android:background="@drawable/button2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="10dp"/>
</LinearLayout>
</ScrollView>
但是按钮会出现在广场,而我的形象的高度是宽度的1/3。 我怎样才能使按钮高度的1/3的宽度?
我使用的ImageButton在第一,但同样的事情发生了.. –
只有按钮不同的是,我可以设置按钮的高度与“dp”(ImageButton不能适用),但它不适合所有屏幕 –