how to change the dropdown height in spinner

后端 未结 11 1624
粉色の甜心
粉色の甜心 2021-02-05 11:20

i tried a lot to change the dropdown item height of spinner.. but i couldn\'t get a good solution.. plz help me guys..

here is a code loginactivityview.xml



        
11条回答
  •  鱼传尺愫
    2021-02-05 11:57

    As people say, best way is to add

        android:minHeight="48dp"
    

    to .xml. But if you want to do it programatically use:

        mspinner.setMinimumHeight(48);
    

    being mspinner the name of your spinner and 48 the new height of the option.

提交回复
热议问题