Tôi đang cố gắng thêm Ripple
Hiệu ứng vào mục của RecyclerView
. Tôi đã có một cái nhìn trực tuyến, nhưng không thể tìm thấy những gì tôi cần. Tôi đã cố gắng android:background
thuộc tính đến RecyclerView
chính nó và đặt nó vào "?android:selectableItemBackground"
nhưng nó đã không làm việc .:Mục Recyclerview nhấp vào hiệu ứng gợn sóng
bố trí Chánh của tôi là như
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<android.support.v7.widget.RecyclerView
android:id="@+id/dailyTaskList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:scrollbars="vertical" />
</LinearLayout>
và bộ chuyển đổi mẫu này được hiển thị ở bên dưới
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dp">
<TextView
android:id="@+id/txtTitle"
style="@style/kaho_panel_sub_heading_textview_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/txtDate"
style="@style/kaho_content_small_textview_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
Vui lòng cung cấp cho tôi giải pháp
Bạn đã thử cha mẹ nào "android: background ="? Android: attr/selectableItemBackground "'? –