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

后端 未结 12 2095
一个人的身影
一个人的身影 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条回答
  •  -上瘾入骨i
    2021-01-29 19:28

    I also fixed this problem in one of my projects. android:foreground="?attr/selectableItemBackgroundBorderless" is responsible for the ripple effect, that's why it is set in the foreground and android:clipToPadding="false" will prevent the ripple effect cut off and make it rectangular.It will keep your ripple effect circular.

    
    

提交回复
热议问题