Override context menu colors in Android

前端 未结 3 1995
你的背包
你的背包 2020-11-30 07:53

Let\'s see,

i know how to change the style of a ListView (the orange color when an item is selected):

android:listSelector=\"@drawable/xxx\" and a drawable w

3条回答
  •  情书的邮戳
    2020-11-30 08:55

    This is the only approach that worked for me:

    You can override the android attribute actionModeBackground (which I found in Android/Sdk/platforms/android-22/data/res/values/themes_holo.xml and R.attr) in your app theme:

    
    

    and replace it with your own drawable and colors, in this case,

    context_menu.xml:

    
    
        
        
    
    

    which is composed of

    context_menu_bottom.xml:

    
    
        
        
    
    

    and

    context_menu_top.xml:

    
    
        
    
    

    Hope it helps!

提交回复
热议问题