Change color of android:activatedBackgroundIndicator

前端 未结 2 1853
醉梦人生
醉梦人生 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 09:58

    Here is a way to change it on your theme:

    Update your theme to apply your custom style on the activatedBackgroundIndicator attribute (here the parent theme is Holo Light but you can of course change it):

    
    

    In your "drawable" resource folder, create the XML file list_activated_background and define your new background indicator, for example:

    
      
       
       
       
         
    
    

    Then just be sure you are calling your custom theme in the manifest file with android:theme="@style/AppTheme" in this case for example.

提交回复
热议问题