How to create android spinner without down triangle on the right side of the widget

后端 未结 8 747
粉色の甜心
粉色の甜心 2020-11-27 04:59

I have a screen where the user has many items to input so screen space is at a premium.

I want the look of the widget on the screen (before the user presses it) t

8条回答
  •  情书的邮戳
    2020-11-27 05:28

    No answer was helpful for me, so here is a really simple one-line solution that worked.

      //some spinner initialisation stuff->
    mySpinner.setAdapter(adapter);
    
      //some spinner initialisation stuff->
    mySpinner.getBackground().setColorFilter(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
    

    I can't tell for sure if it will work with just a default spinner layout, but it worked well with my custom that I created for other needs.

提交回复
热议问题