如何在Android中变灰微调框? [英] How to grey out spinner in Android?

查看:94
本文介绍了如何在Android中变灰微调框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用了两个微调器.其中一个最初被禁用,因为我需要用户在第一个微调器中选择一些内容来加载第二个微调器的内容.

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?

推荐答案

在将其设置为禁用"后,我不知道其他任何方式可以将其变灰.

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

这篇关于如何在Android中变灰微调框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆