Graphical issue with spinner control in Android

青春壹個敷衍的年華 提交于 2019-12-01 01:23:05

Actually I can reproduce this behavior on Android 2.3. Not possible on Android 2.2 and lower.

It' doesn't matter if you place the Spinner in a TableLayout or RelativeLayout. Same problem there..

Only solution to get ride of the lines was to put a 1px-View between the spinner:

<Spinner android:layout_height="wrap_content" android:id="@+id/spinnerDriver"
    android:layout_width="match_parent" android:layout_below="@id/driverDesc" />

<View android:id="@+id/helper" android:layout_height="1px"
    android:layout_width="match_parent" android:layout_below="@id/spinnerDriver" />

<Spinner android:layout_height="wrap_content" android:id="@+id/spinnerDriver1"
    android:layout_width="match_parent" android:layout_below="@id/helper" />

This is actually a very, very, very... ugly solution but it works for me...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!