[Android] Audio player: improve the playlist layout on dragging
Adrien Maglo
git at videolan.org
Mon Jan 27 14:42:40 CET 2014
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Mon Jan 27 14:42:28 2014 +0100| [849088a5ec9f50556c6ee5ed0d750521a042de48] | committer: Adrien Maglo
Audio player: improve the playlist layout on dragging
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=849088a5ec9f50556c6ee5ed0d750521a042de48
---
vlc-android/res/layout/audio_playlist_item.xml | 172 ++++++++++++------------
1 file changed, 89 insertions(+), 83 deletions(-)
diff --git a/vlc-android/res/layout/audio_playlist_item.xml b/vlc-android/res/layout/audio_playlist_item.xml
index 8411084..ab46eb0 100644
--- a/vlc-android/res/layout/audio_playlist_item.xml
+++ b/vlc-android/res/layout/audio_playlist_item.xml
@@ -1,112 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
-<org.videolan.vlc.widget.AudioPlaylistItemViewGroup xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/playlist_item"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:descendantFocusability="blocksDescendants" >
+ android:orientation="vertical" >
- <View
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" />
-
- <LinearLayout
+ <org.videolan.vlc.widget.AudioPlaylistItemViewGroup
+ android:id="@+id/playlist_item"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="vertical" >
+ android:descendantFocusability="blocksDescendants" >
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" />
<LinearLayout
- android:id="@+id/item_expansion"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="vertical"
- android:visibility="gone" >
+ android:orientation="vertical" >
- <View
+ <LinearLayout
+ android:id="@+id/item_expansion"
android:layout_width="fill_parent"
- android:layout_height="45dp" />
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:visibility="gone" >
- <View
- android:layout_width="match_parent"
- android:layout_height="1dp"
- android:layout_gravity="center"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
- android:background="?attr/playlist_item_footer" />
- </LinearLayout>
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="45dp" />
- <LinearLayout
- android:id="@+id/layout_item"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="horizontal"
- android:paddingLeft="10dp" >
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_gravity="center"
+ android:layout_marginLeft="10dp"
+ android:layout_marginRight="10dp"
+ android:background="?attr/playlist_item_footer" />
+ </LinearLayout>
<LinearLayout
- android:layout_width="0dip"
+ android:id="@+id/layout_item"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:gravity="center_vertical"
- android:orientation="vertical" >
+ android:orientation="horizontal"
+ android:paddingLeft="10dp" >
- <TextView
- android:id="@+id/title"
- android:layout_width="fill_parent"
+ <LinearLayout
+ android:layout_width="0dip"
android:layout_height="wrap_content"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="5dip"
- android:layout_marginTop="5dip"
- android:singleLine="true"
- android:text="@string/title"
- android:textColor="@color/list_title"
- android:textSize="16sp" />
+ android:layout_weight="1"
+ android:gravity="center_vertical"
+ android:orientation="vertical" >
- <TextView
- android:id="@+id/artist"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="5dip"
- android:singleLine="true"
- android:text="@string/artist"
- android:textColor="@color/list_subtitle"
- android:textSize="11sp" />
- </LinearLayout>
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="5dip"
+ android:layout_marginRight="5dip"
+ android:layout_marginTop="5dip"
+ android:singleLine="true"
+ android:text="@string/title"
+ android:textColor="@color/list_title"
+ android:textSize="16sp" />
+
+ <TextView
+ android:id="@+id/artist"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="5dip"
+ android:layout_marginRight="5dip"
+ android:singleLine="true"
+ android:text="@string/artist"
+ android:textColor="@color/list_subtitle"
+ android:textSize="11sp" />
+ </LinearLayout>
- <View
- android:layout_width="1dp"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:layout_marginBottom="8dp"
- android:layout_marginTop="8dp"
- android:background="?attr/playlist_item_footer" />
+ <View
+ android:layout_width="1dp"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="8dp"
+ android:background="?attr/playlist_item_footer" />
- <ImageButton
- android:id="@+id/move"
- android:layout_width="30dp"
- android:layout_height="30dp"
- android:layout_gravity="center"
- android:layout_marginLeft="5dp"
- android:layout_marginRight="5dp"
- android:background="#00000000"
- android:scaleType="fitXY"
- android:src="@drawable/ic_move_media" />
+ <ImageButton
+ android:id="@+id/move"
+ android:layout_width="30dp"
+ android:layout_height="30dp"
+ android:layout_gravity="center"
+ android:layout_marginLeft="5dp"
+ android:layout_marginRight="5dp"
+ android:background="#00000000"
+ android:scaleType="fitXY"
+ android:src="@drawable/ic_move_media" />
+ </LinearLayout>
</LinearLayout>
<View
- android:id="@+id/layout_footer"
- android:layout_width="match_parent"
- android:layout_height="1dp"
- android:layout_gravity="center"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
- android:background="?attr/playlist_item_footer" />
- </LinearLayout>
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" />
+ </org.videolan.vlc.widget.AudioPlaylistItemViewGroup>
<View
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" />
+ android:id="@+id/layout_footer"
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_gravity="center"
+ android:layout_marginLeft="10dp"
+ android:layout_marginRight="10dp"
+ android:background="?attr/playlist_item_footer" />
-</org.videolan.vlc.widget.AudioPlaylistItemViewGroup>
\ No newline at end of file
+</LinearLayout>
\ No newline at end of file
More information about the Android
mailing list