你如何检索当前的微调设置阵列适配器? Android操作系统,Droid的 [英] How do you retrieve the array adapter currently set for a spinner? Android OS, Droid
问题描述
展望创建两个可能的阵列之间切换的微调菜单切换。例如,如果微调设置为显示阵列A,然后当我preSS这个菜单按钮,我想微调设置为数组B.如果我再preSS它,我希望它被设置回数组A
Looking to create a menu toggle that switches between two possible arrays for a spinner. For example, if the spinner is set to show array A, then when I press this menu button, I want the spinner to be set to array B. If I press it again, I want it to be set back to array A.
我可以处理的if / then语句和所有,但我怎么叫微调的阵列适配器?我知道该怎么称呼用getSelectedItemPosition()它的价值;但有,为获取阵列它当前设置为?类似的方法
I can handle the if/then statements and all, but how do I call the spinner's array adapter? I know how to call its value using getSelectedItemPosition(); but is there a similar method for retrieving WHICH array it is currently set to?
推荐答案
我觉得适配器视图#getAdapter()
由android.widget.Spinner遗传吗?
I think AdapterView#getAdapter()
is inherited by android.widget.Spinner?
这篇关于你如何检索当前的微调设置阵列适配器? Android操作系统,Droid的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!