Set spinner width to current item width

后端 未结 3 756
栀梦
栀梦 2020-12-16 04:32

By default the spinner width is set to fit the largest item in the dropdown but I want it to be the same width as the selected item.



        
3条回答
  •  春和景丽
    2020-12-16 05:32

    Setting the spinners XML to:

    android:layout_width="wrap_content"
    

    worked for me.

提交回复
热议问题