1

私は次のレイアウトを持っています:

   <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です。(リスト項目ではなく、スピナー自体)。したがって、幅を0dpmatch_parentwrap_contentまたはのいずれに設定しx_dpても、同じままです。幅を変更するにはどうすればよいですか?

4

0 に答える 0