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

后端 未结 12 2091
一个人的身影
一个人的身影 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:20

    If you want more generic XML files, I have two files:

    1) btn_ripple_background with code:

    
    
    
    
    

    2) ripple_circuler_shape with code:

    
    
        
    
    

    finally the usage:android:foreground="@drawable/ripple_btn_background"

提交回复
热议问题