本文介绍了更改?selectableItemBackground无边界波纹颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用?selectableItemBackgroundBorderless LinearLayout 创建无边界波纹,它可以正常工作,但不清楚.

I'm trying to use ?selectableItemBackgroundBorderless to create borderless ripple for a LinearLayout, it works fine but is not clearly visible.

如何更改?selectableItemBackgroundBorderless 的默认颜色以使波纹效果可见?

How can I change the default color for ?selectableItemBackgroundBorderless to make the ripple effect visible?

我尝试将 ThemeOverlay.AppCompat.Dark 主题应用于父级布局,但这无济于事.

I've tried applying ThemeOverlay.AppCompat.Dark theme to the parent layout but it doesn't help.

推荐答案

主题与 AppCompat 博客文章:

因此,创建一个 ThemeOverlay.AppCompat 将该值设置为您选择的颜色,将允许您更改该视图及其子级的波纹颜色.

So creating a ThemeOverlay.AppCompat that sets that value to your chosen color will allow you to change the ripple color for that view and its children.

这篇关于更改?selectableItemBackground无边界波纹颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 15:18
查看更多