我有兩個問題。Android中的佈局
- 如何讓下圖中的微調更接近文本?
我使用下面的XML佈局
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="4">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Check by"
android:layout_weight="1"
android:textSize="20dp"/>
<Spinner
android:id="@+id/CheckBy"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="20dp"
android:enabled="false"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Outcome"
android:layout_weight="1"
android:textSize="20dp"/>
<Spinner
android:id="@+id/Outcome"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="20dp"
android:enabled="false"/>
</LinearLayout>
- 我怎樣才能改變輸入按鈕的文本,如在下面圖中,並在點擊時指定要執行的操作?
你可以試試這個使用'RelativeLayout' – Praveenkumar
我不知道我理解你的問題,但是你想要在按鈕上有輸入圖標嗎?如果是這種情況,可以使用ImageButton並將背景設置爲@null,將src設置爲輸入按鈕的可繪製對象。 –