[英]Call a spinner's onClickListener with another button or control
Is it possible to call a Spinner
's onClickListener
(the one that makes the Spinner
's list of items come up) from another Button
? 是否可以从另一个
Button
调用Spinner
的onClickListener
(使Spinner
的项目列表出现的那个)? If so, how do I do this? 如果是这样,我该怎么做? I'm thinking along the lines of iOS, where if I wanted to call a control's action from elsewhere I could reference the control and send the appropriate callback message.
我正在思考iOS,如果我想从其他地方调用控件的动作,我可以引用控件并发送相应的回调消息。
spinner.performClick();
你可以使用onclick of button来显示微调器。所以在你的按钮的clicklistener上面放上一行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.