[Android] Nicer audio lists

Geoffrey Métais git at videolan.org
Tue Nov 4 17:59:53 CET 2014


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov  4 16:50:45 2014 +0100| [afe0fdb71c8b724d339a26cba06f679ae2ba8aff] | committer: Geoffrey Métais

Nicer audio lists

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=afe0fdb71c8b724d339a26cba06f679ae2ba8aff
---

 vlc-android/res/layout/audio_browser_item.xml                 |    9 ++++++---
 .../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



More information about the Android mailing list