【问题标题】:How to add a ripple effect on a layout with rounded corners? [duplicate]如何在带有圆角的布局上添加涟漪效果? [复制]
【发布时间】:2017-07-17 21:47:55
【问题描述】:

我想在带有圆角的布局上设置波纹效果。我该怎么做?

【问题讨论】:

标签: android android-layout rippledrawable


【解决方案1】:

只需在 xml 文件中设置这些属性

android:background="?android:attr/selectableItemBackground"
android:clickable="true"

应该可以的。

【讨论】:

  • 这不会使布局边框转角。
  • 然后试试android:foregroud="?android:attr/selectableItemBackground"
  • @ChetanAshtivkar android:foregroud="?android:attr/selectableItemBackground" 也不起作用
猜你喜欢
  • 2021-02-25
  • 1970-01-01
  • 2023-03-26
  • 1970-01-01
  • 2021-04-30
  • 2015-11-14
  • 2022-12-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多