How can I make the spinner width same as largest available item width

前端 未结 7 1574
天涯浪人
天涯浪人 2021-01-31 07:44

I realize even I use wrap_content for my spinner (I avoid using match_parent as I do not want the spinner overly long), and using match_parent

相关标签:
7条回答
  • 2021-01-31 08:11

    In such Cases where you want to list all country or have big list
    Try : spinnerMode="dialog" as show below :

    <Spinner
        android:id="@+id/spinnerId"
        android:layout_width="wrap_content"
        android:dropDownWidth="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:spinnerMode="dialog"/>
    
    0 讨论(0)
提交回复
热议问题