How to change the position of opened spinner?

前端 未结 3 1080
既然无缘
既然无缘 2021-01-02 05:01

I would like the spinner dropdown to open right below the spinner itself. E.g.:

\"enter

3条回答
  •  旧时难觅i
    2021-01-02 06:05

    Declare the spinner mode as a dropdown:

    android:spinnerMode="dropdown"
    

    then use the vertical offset to close the gap:

    android:dropDownVerticalOffset="-15dp"
    

    Spinner Android Documentation

提交回复
热议问题