Spinner item not showing as dropdown but in the top of the spinner

ぃ、小莉子 提交于 2019-12-24 00:45:25

问题


i am using spinner in my code which i had declare in my xml

xml code for spinner:-

<Spinner
        android:id="@+id/spinner"
        android:layout_width="180dp"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/button1"
        android:layout_marginTop="133dp"
        android:drawSelectorOnTop="true" />

so as can be seen that the spinner is down the one button which is also in that layout xml .Now when i run my app its loading all data correctly but the item is showing in the top of the spinner not in the down side of the spinner.Mentioning the screenshot how it appear

but when i m using the same spinner parallel to the button the spinner dropdown effect working very fine.Here is the screenshot how it appear.

so can any tell me how can we solve this kind of scenario.thanks for any reply.


回答1:


try this hope this will help you

 android:spinnerMode="dropdown"


来源:https://stackoverflow.com/questions/21277102/spinner-item-not-showing-as-dropdown-but-in-the-top-of-the-spinner

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