How to grey out spinner in Android?

放肆的年华 提交于 2019-12-11 07:30:11

问题


I use two Spinner in my App. One of them is initially disabled because I need the user to select something in the first spinner to load the content of the second one.

I would like to change the design of the second spinner to show the user that the spinner is not active, eg. grey the spinner out. How can I achieve this?

If this is not possible how would you change this dialog to make it clear to the user that she has to select something in the first spinner?


回答1:


Further to setting as disabled, I don't know any other way to grey out.

Hide the second spinner until the first has no selection.
Or until it's in disabled state, the first visible option should show text related to the required selection eg: Select a Continent first




回答2:


The Spinner doesn't gray out when disabled, it's a bug that we fixed in FroYo (next version of Android.)



来源:https://stackoverflow.com/questions/2456069/how-to-grey-out-spinner-in-android

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