私は次のレイアウトを持っています:
<TableRow
android:id="@+id/contentRow3"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
style="@style/hotelapp_textblack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="5dp"
android:text="@string/check_room"
tools:context=".MainActivity" />
<Spinner
android:id="@+id/spinRoom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:spinnerMode="dropdown"
android:dropDownWidth="match_parent" />
</TableRow>
次の ArrayAdapter レイアウトを使用します。
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:minHeight="30dp"
android:textColor="#000" />
TableRow
明らかに多くの中の 1 つです。ここで直面している問題は、何をしても の幅を変更できないことSpinner
です。(リスト項目ではなく、スピナー自体)。したがって、幅を0dp
、match_parent
、wrap_content
またはのいずれに設定しx_dp
ても、同じままです。幅を変更するにはどうすればよいですか?