Android Spinner Underline color

后端 未结 3 1501
独厮守ぢ
独厮守ぢ 2020-12-06 06:25

I can add underline in spinner using style=\"@style/Base.Widget.AppCompat.Spinner.Underlined\". How can I change color of underline using style only? I dont wan

3条回答
  •  抹茶落季
    2020-12-06 06:47

    By default the Spinner will use the color set via android:textColorSecondary or colorControlNormal in your AppTheme. So either set the appropriate colors there or define a new Theme and apply this one to your Spinner:

    Example:

    styles.xml

    
    

    layout.xml

    
    

    Note: The dropdown arrow will also be tinted - I'm not aware of an option to color the arrow separately

提交回复
热议问题