Clicking spinner within popup window causes WindowManager$BadTokenException

前端 未结 4 1555
你的背包
你的背包 2020-12-11 21:34

I\'ve looked up a couple of posts for the same problem but can\'t seem to resolve my issue. I\'ve used spinners throughout my application and they are working fine. It\'s wh

4条回答
  •  醉梦人生
    2020-12-11 22:06

    I had this problem in my work, and wasted about 2 days trying to find a solution to it. But, I didn't find a solution from the web.

    The solution was to specify the Spinner mode to be dialog.

    from XML layout:

    android:spinnerMode="dialog"
    

    or from java code:

    Spinner(Context context, int mode)
    

    I hope my answer was helpful

提交回复
热议问题