スピナー コントロールを複製しようとしています (理由は聞かないでください)。仕切りに苦労しています。イメージビューの左側に仕切りを追加するまで、偽のスピナーは問題なく見えます。仕切りを追加すると、その高さが画面の残りの部分を埋めます。誰かがこれを説明できますか?
次のxml:
.......
<Spinner
android:id="@+id/equipment_spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"/>
<ImageView
android:id="@+id/spinner_arrow"
android:layout_width="45sp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/spinner_arrow"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
次の画面が生成されます。
仕切りを追加すると、xml は次のようになります。
<Spinner
android:id="@+id/equipment_spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"/>
<ImageView
android:id="@+id/spinner_arrow"
android:layout_width="45sp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/spinner_arrow"/>
<View
android:background="#e7ebe7"
android:layout_width="1dip"
android:layout_height="fill_parent"
android:layout_toLeftOf="@id/spinner_arrow"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
次の画面が表示されます。
誰かが私がここで間違っていることを見つけることができますか? ...