Limit ripple to parent folder

pull/153/head
M66B 6 years ago
parent b4f88a7b1c
commit 6109e91172

@ -94,6 +94,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
private ImageView ivSync;
private TextView tvKeywords;
private TextView tvError;
private View vwRipple;
private RecyclerView rvChilds;
private AdapterFolder childs;
@ -124,6 +125,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
ivSync = itemView.findViewById(R.id.ivSync);
tvKeywords = itemView.findViewById(R.id.tvKeywords);
tvError = itemView.findViewById(R.id.tvError);
vwRipple = itemView.findViewById(R.id.vwRipple);
rvChilds = itemView.findViewById(R.id.rvChilds);
LinearLayoutManager llm = new LinearLayoutManager(context);
@ -294,6 +296,9 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
if (view.getId() == R.id.ivExpander)
onCollapse(folder);
else {
vwRipple.setPressed(true);
vwRipple.setPressed(false);
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast(
new Intent(ActivityView.ACTION_VIEW_MESSAGES)

@ -8,8 +8,7 @@
android:id="@+id/clItem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/activatableItemBackground"
android:foreground="?attr/selectableItemBackground">
android:background="?attr/activatableItemBackground">
<View
android:id="@+id/vwColor"
@ -182,6 +181,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvError" />
<View
android:id="@+id/vwRipple"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="?android:attr/selectableItemBackground"
app:layout_constraintBottom_toTopOf="@id/vSeparator"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvChilds"
android:layout_width="0dp"

Loading…
Cancel
Save