[Android] Nicer UI for Streams fragment

Geoffrey Métais git at videolan.org
Thu Feb 19 18:14:23 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 19 18:13:26 2015 +0100| [1a5da57e83353450e5672681d5e6a6bdcb975f93] | committer: Geoffrey Métais

Nicer UI for Streams fragment

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

 vlc-android/res/layout/mrl_item.xml  |   47 ++++++++++++++++++++--------------
 vlc-android/res/layout/mrl_panel.xml |    3 +++
 2 files changed, 31 insertions(+), 19 deletions(-)

diff --git a/vlc-android/res/layout/mrl_item.xml b/vlc-android/res/layout/mrl_item.xml
index 2bfad0a..2ffc076 100644
--- a/vlc-android/res/layout/mrl_item.xml
+++ b/vlc-android/res/layout/mrl_item.xml
@@ -1,21 +1,30 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent" android:layout_height="50dp">
-    <TextView
-        android:id="@+id/mrl_item_uri"
+<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:card_view="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="50dp"
+    card_view:cardUseCompatPadding="true"
+    card_view:cardElevation="1sp">
+
+    <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:paddingLeft="10dp"
-        android:clickable="true"
-        android:layout_toLeftOf="@+id/mrl_item_delete"
-        android:gravity="center_vertical"/>
-    <ImageView
-        android:id="@+id/mrl_item_delete"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
-        android:layout_centerInParent="true"
-        android:src="@drawable/ic_trash_small_normal"
-        android:clickable="true"
-        android:paddingRight="5dp"/>
-</RelativeLayout>
\ No newline at end of file
+        android:layout_height="wrap_content">
+        <TextView
+            android:id="@+id/mrl_item_uri"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:paddingLeft="10dp"
+            android:clickable="true"
+            android:layout_toLeftOf="@+id/mrl_item_delete"
+            android:gravity="center_vertical"/>
+        <ImageView
+            android:id="@+id/mrl_item_delete"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_centerInParent="true"
+            android:src="@drawable/ic_trash_small_normal"
+            android:clickable="true"
+            android:paddingRight="5dp"/>
+    </RelativeLayout>
+</android.support.v7.widget.CardView>
\ No newline at end of file
diff --git a/vlc-android/res/layout/mrl_panel.xml b/vlc-android/res/layout/mrl_panel.xml
index 7962f54..8766b35 100644
--- a/vlc-android/res/layout/mrl_panel.xml
+++ b/vlc-android/res/layout/mrl_panel.xml
@@ -9,11 +9,14 @@
         android:layout_margin="10dp"
         android:hint="@string/open_mrl_dialog_msg"
         android:inputType="textUri"
+        android:maxLines="2"
         android:imeOptions="actionGo"/>
     <android.support.v7.widget.RecyclerView
         android:id="@+id/mrl_list"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_marginRight="15dp"
+        android:layout_marginLeft="15dp"
         android:layout_below="@+id/mrl_edit"/>
 
 </RelativeLayout>
\ No newline at end of file



More information about the Android mailing list