ImageView selectableItemBackgroundBorderless does not render outside of view bounds

后端 未结 6 2211
青春惊慌失措
青春惊慌失措 2021-02-13 21:47

I am using selectableItemBackgroundBorderless to add a ripple to an ImageView. My expected behaviour would be to have a circular ripple, extending the

6条回答
  •  感动是毒
    2021-02-13 22:09

    If you have a clickable ImageView, then most possibly it should be an ImageButton instead.

    Having defined following ImageButton:

    
    

    Then you'll get following output:

    If you want bigger ripple effect, you have to change view's size: instead of wrap_content make it, let's say, 100dp:

提交回复
热议问题