开发者

Android OPEN spinner with single button click

I开发者_开发百科 have implemented button which clicks and opens dialog with spinner inside as described here

However this is two clicks. One to open dialog and one to open spinner. I want the spinner to open with a single click of the button? How can this be done?

Is there anyway to just open spinner from button click w/o going to dialog. If not how can I open dialog view and have the spinner open at same time.


Just put this in your button.onClick

spinner.performClick();


Define a spinner in your activity with 0 height and 0 width in your xml, then the onItemSelected will work

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜