[Android] [PATCH 1/2] Nicer audio lists

Geoffrey Métais geoffrey.metais at gmail.com
Tue Nov 4 17:29:22 CET 2014


---
 vlc-android/res/layout/audio_browser_item.xml                    | 9 ++++++---
 .../src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java  | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/vlc-android/res/layout/audio_browser_item.xml b/vlc-android/res/layout/audio_browser_item.xml
index 189d27c..8387020 100644
--- a/vlc-android/res/layout/audio_browser_item.xml
+++ b/vlc-android/res/layout/audio_browser_item.xml
@@ -3,11 +3,13 @@
     android:id="@+id/layout_item"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:paddingTop="10dp"
     android:orientation="vertical" >
 
     <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="@dimen/audio_browser_item_size" >
+        android:layout_height="@dimen/audio_browser_item_size"
+    	android:layout_marginBottom="10dp" >
 
         <ImageView
             android:id="@+id/cover"
@@ -19,6 +21,7 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_toRightOf="@+id/cover"
+            android:layout_toLeftOf="@+id/item_more"
             android:paddingLeft="10dp"
             android:gravity="center_vertical"
             android:orientation="vertical" >
@@ -51,9 +54,9 @@
             android:id="@+id/item_more"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_alignParentBottom="true"
+            android:layout_centerVertical="true"
             android:layout_alignParentRight="true"
-            android:background="@drawable/ic_more"
+            android:background="@drawable/ic_more_vert_grey600_24dp"
             android:clickable="true" />
     </RelativeLayout>
 
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
index 4e1056c..c8e7cbb 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
@@ -454,7 +454,7 @@ public class AudioBrowserListAdapter extends BaseAdapter implements SectionIndex
             throw new IllegalArgumentException("Tested item must be a media item and not a separator.");
 
         if (position == mItems.size() - 1)
-            return false;
+            return true; //consider end of list as a separator. Nicer to display
         else if (mItems.get(position + 1).mIsSeparator )
             return true;
         else
-- 
1.9.1



More information about the Android mailing list