我的 Xml 代码:
<Button
android:id="@+id/link_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/google_btn" />
我正在应用默认的涟漪效果
<Button
android:id="@+id/link_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground" />
但我需要一个带有自定义背景"@drawable/google_btn"
且具有波纹效果的按钮,需要使用"?android:attr/selectableItemBackground"
属性。