Limit ripple to parent folder

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

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

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

Loading…
Cancel
Save