Android Spinner Underline color

后端 未结 3 1510
独厮守ぢ
独厮守ぢ 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 07:03

    Seems like this question has already been answered. But here is a way to resolve that programatically as well. (Tested on API 19 & Above).

    Use ViewCompat for this.

    ViewCompat.setBackgroundTintList(spinner, ColorStateList.valueOf(your_color));
    

提交回复
热议问题