相关疑难解决方法(0)

单击按钮时如何在按钮上形成圆形纹波?

背景

在Android的拨号器应用程序上,当您开始搜索某些内容,然后单击EditText左侧的箭头按钮时,会对其产生圆形连锁效果:

在此输入图像描述

问题

我也尝试过它,但我有一个矩形的:

    <ImageButton
        android:id="@+id/navButton"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_gravity="center_vertical"
        android:layout_marginLeft="8dp"
        android:background="?android:attr/selectableItemBackground"
        android:src="@drawable/search_ic_back_arrow"/>
Run Code Online (Sandbox Code Playgroud)

这个问题

单击时如何使按钮具有圆形波纹效果?我是否必须创建一个新的drawable,或者是否有内置的方式?

android button rippledrawable

107
推荐指数
8
解决办法
6万
查看次数

标签 统计

android ×1

button ×1

rippledrawable ×1