How to create ripple effect in simple layout

前端 未结 10 1595
耶瑟儿~
耶瑟儿~ 2020-12-02 06:06

How can I have a ripple effect in a simple linear/relative layout when touching the layout?

I\'ve tried setting the background of a layout to something like:

10条回答
  •  有刺的猬
    2020-12-02 06:14

    It turns out this is working as intended. The standard Material theme colorControlHighlight value is #40ffffff. So on a white background, this will not show up. Changing the highlight color to something else works, and/or changing the background color of the object.

    Thanks all (especially Alanv for pointing me in the right direction).

提交回复
热议问题