Change color of android:activatedBackgroundIndicator

前端 未结 2 1875
醉梦人生
醉梦人生 2021-01-31 09:25

Can I change the default color (blue) of the attr android:activatedBackgroundIndicator?

I am developing an application for target 18 and for minimun 11.

Thank yo

2条回答
  •  情深已故
    2021-01-31 10:09

    On Lollipop and above, you have the option of setting colorControlActivated in your theme instead:

    
    

    This approach works because the Material Theme's activatedBackgroundIndicator selector uses ?attr/colorControlActivated for the activitate state as seen in themes_material.xml and activated_background_material.xml.

    Note that Yoann Hercouet's answer is correct and still works in Lollipop.

提交回复
热议问题