画像のようなAndroidXMLファイルで垂直整列ボタンAndroidを作成する方法
3 に答える
2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:text="Button" android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="fill_parent"></Button>
</LinearLayout>
layout_height には fill_parent を使用します。OK の場合は O の下に K を指定できますが、写真のように背景画像を使用する必要があります。
于 2011-07-19T04:25:37.557 に答える
0
android:background を使用して、このボタンのような画像をドローアブルに配置すると、たとえば次のように作成できます。
android:background="@drawable/my_button"
于 2011-07-19T17:47:24.580 に答える
0
ボタンのサイズが希望どおりになるように、高さを大きくして幅を小さくすることができます。「OK」の場合は、背景画像として作成する必要があります。
于 2011-07-19T04:21:55.080 に答える