Java 如何在android中设置微调文本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19266841/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to set spinner text in android
提问by user2843420
I have 2 spinners
populated with the same array
. I want to display the first item of array in first spinner
(and here no problems) and to display the second item in second spinner
(I am not having any idea . How I can do this).
我有 2 个spinners
填充了same array
. 我想首先显示数组的第一项spinner
(这里没有问题)并在第二项中显示第二项spinner
(我不知道。我该怎么做)。
Thanks.
谢谢。
采纳答案by A.S.
On spinner it is simple to set deafult selection with spin.setSelection(YOUR_NUMBER);
在微调器上设置默认选择很简单 spin.setSelection(YOUR_NUMBER);