Android OPEN spinner with single button click

前端 未结 2 1452
温柔的废话
温柔的废话 2021-02-12 20:08

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

相关标签:
2条回答
  • 2021-02-12 20:58

    Just put this in your button.onClick

    spinner.performClick();
    
    0 讨论(0)
  • 2021-02-12 21:02

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

    0 讨论(0)
提交回复
热议问题