There is an interesting issue I stumbled upon while working on an Android Honeycomb project. As you can see in the image below, while expanding a Spinner in a dialog, the navigation bar at the bottom overlaps it. Thus, the element at the bottom can not be selected.
In order to fix this I tried using android:fitsSystemWindows="true"
in the Spinner widget. It did not work. Also I noticed that we have an XML Attribute for dropdown width, android:dropDownWidth
, but none for height.
Here is the XMl layout for the 3 Spinners:
<TableRow>
<Spinner
android:id="@+id/order_dialog_category_code_Spinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fitsSystemWindows="true" />
<Spinner
android:id="@+id/order_dialog_packing_code_Spinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fitsSystemWindows="true" />
<Spinner
android:id="@+id/order_dialog_product_Spinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fitsSystemWindows="true" />
</TableRow>
I will keep testing and hope to find a solution soon but it is an interesting issue and it deserved to be posted.
I did not test in Android ICS yet but I think it might act the same.
EDIT
I managed somewhat of a fix by using the android:layout_marginBottom
attribute for the Spinners. It did solve the issue but now I have the margin in the dialog view as well and I don't want that.
Does anyone know how to set the margin only for the dropdown resource?