How to make a circular ripple on a button when it's being clicked?

后端 未结 12 2111
一个人的身影
一个人的身影 2021-01-29 18:59

Background

On the dialer app of Android, when you start searching for something, and you click the arrow button on the left of the EditText, you get a circular ripple

12条回答
  •  爱一瞬间的悲伤
    2021-01-29 19:15

    If you already have a background image, here is an example of a ripple that looks close to selectableItemBackgroundBorderless:

                
    

    ic_filter_state.xml:

    
    
        
        
    
    

    state_pressed_ripple.xml: (opacity set to 10% on white background) 1AFFFFFF

         
        
            
                
                    
                
                
            
        
    

提交回复
热议问题