android - 如何在 android 中显示类似 YouTube 的涟漪效应?
解决方案
通过设置它实际上只是一个波纹背景android:background="?selectableItemBackground"
在 Youtube 按钮示例中,
<RelativeLayout
android:id="@+id/rl_chat_search"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground" <-- ripple effect
android:layout_margin="10dp">
<ImageView
android:src="@drawable/ic_download"
/>
<TextView
android:text="Download"
/>
</RelativeLayout>
推荐阅读
- sql - 将 CTE 函数合并字符串应用于 H2 表中的每一行
- javascript - IE 11 - 日期不起作用
- matlab - MATLAB symengine 在逻辑语句上失败
- elasticsearch - ElasticSearch 和 Redis 都是过分的用例?
- css - 在 material_parallax 中更改图像的高度
- swift - Alamofire 响应序列化失败
- python - 使用python读取xml文件的结果不一致
- django - Django 自定义多对多查询
- three.js - .gltf 对象在三个.js 中加载时变黑
- swift - 如何编写单元测试返回导航