Commit 34b2a839 authored by Geoffrey Métais's avatar Geoffrey Métais

Nicer selection of contiguous list items

parent 5a956d2d
......@@ -22,8 +22,8 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:longClickable="true"
android:clickable="true"
android:focusable="@{item.getItemType() != MediaLibraryItem.TYPE_DUMMY}"
......
......@@ -21,8 +21,8 @@
android:background="@{bgColor}"
android:clickable="true"
android:onClick="@{holder::onClick}"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:onLongClick="@{holder::onLongClick}" >
<ImageView
android:id="@+id/icon"
......
......@@ -381,8 +381,7 @@ public class AudioBrowserAdapter extends RecyclerView.Adapter<AudioBrowserAdapte
private void setViewBackground(boolean focused, boolean selected) {
itemView.setBackgroundColor(focused ? UiTools.ITEM_FOCUS_ON : UiTools.ITEM_FOCUS_OFF);
int selectionColor = selected ? UiTools.ITEM_SELECTION_ON : 0;
vdb.audioItemMeta.setBackgroundColor(selectionColor);
vdb.itemMore.setBackgroundColor(selectionColor);
itemView.setBackgroundColor(selectionColor);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment