List view set a custom ripple selector

后端 未结 1 1263
我在风中等你
我在风中等你 2021-02-07 21:57

I\'m trying to use a list view control on Lollipop under the following conditions:

  1. The theme type is the default Theme.Material (dark theme).
  2. The list vie
1条回答
  •  遥遥无期
    2021-02-07 22:15

    You're using an unbounded ripple, e.g. a ripple with no content or mask layer, so the ripple is projecting onto the background of its parent ListView. You should set a mask layer to constrain the ripple bounds.

    res/drawable/my_list_selector.xml:

    
    
        
            
        
    
    

    0 讨论(0)
提交回复
热议问题