android微调器值集
我有android微调器值集,android,spinner,Android,Spinner,我有活动首先在这里,我将得到的值发送到第二个活动 在第二个活动中包含文本视图和微调器。这里的spinner包含约翰塞纳、摇滚、殡仪馆等价值观 因此,在活动中我获得的值为card2和Rock,通过意图传递到下一个屏幕。因此在下一个活动中 cardname.setText(cardReceived)这里是textview我们上面给出的spinner我们该怎么做 所以当我从第一个活动导航到下一个微调器时,值必须显示为岩石 但它显示默认值johncena 类似地,如果我得到的值是卡3和承办人,那么如果我
活动
首先在这里,我将得到的值发送到第二个活动
在第二个活动中
包含文本视图
和微调器
。这里的spinner
包含约翰塞纳、摇滚、殡仪馆等价值观
因此,在活动中
我获得的值为card2和Rock,通过意图
传递到下一个屏幕。因此在下一个活动中
cardname.setText(cardReceived)代码>这里是textview
我们上面给出的spinner
我们该怎么做
所以当我从第一个活动
导航到下一个微调器
时,值必须显示为岩石
但它显示默认值johncena
类似地,如果我得到的值是卡3和承办人,那么如果我导航到第二个活动
,那么它必须显示卡3和承办人(对于微调器
)
但它显示card3和johncena(默认值)
我认为您需要使用:
// Set this integer to be between 0 and N-1, where the adapter has N entries
// 0 is the first you put in the adapter, N-1 the last
int selection = 2;
cardDetail.setSelection(selection);
// Set this integer to be between 0 and N-1, where the adapter has N entries
// 0 is the first you put in the adapter, N-1 the last
int selection = 2;
cardDetail.setSelection(selection);