[Android] Nicer selection of contiguous list items
Geoffrey Métais
git at videolan.org
Fri Feb 17 11:57:30 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb 17 11:50:07 2017 +0100| [34b2a839c9e60dd73b017c7d58d581ced943b230] | committer: Geoffrey Métais
Nicer selection of contiguous list items
> https://code.videolan.org/videolan/vlc-android/commit/34b2a839c9e60dd73b017c7d58d581ced943b230
---
vlc-android/res/layout/audio_browser_item.xml | 4 ++--
vlc-android/res/layout/history_item.xml | 4 ++--
vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java | 3 +--
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/vlc-android/res/layout/audio_browser_item.xml b/vlc-android/res/layout/audio_browser_item.xml
index 8e829b7..2eb059c 100644
--- a/vlc-android/res/layout/audio_browser_item.xml
+++ b/vlc-android/res/layout/audio_browser_item.xml
@@ -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}"
diff --git a/vlc-android/res/layout/history_item.xml b/vlc-android/res/layout/history_item.xml
index fc06f10..27e7fac 100644
--- a/vlc-android/res/layout/history_item.xml
+++ b/vlc-android/res/layout/history_item.xml
@@ -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"
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
index 1e74873..8305b34 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
@@ -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);
}
}
More information about the Android
mailing list