[Android] Layout optimizations

Geoffrey Métais git at videolan.org
Thu Feb 12 17:12:34 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 12 13:57:31 2015 +0100| [62f4ce82cc63c78ba05344b363c308ab7014e467] | committer: Geoffrey Métais

Layout optimizations

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

 vlc-android/res/layout/about_licence.xml       |   12 ++++--------
 vlc-android/res/layout/audio_player.xml        |    1 -
 vlc-android/res/layout/audio_playlist_item.xml |    2 --
 vlc-android/res/layout/audio_playlist_tips.xml |    4 ++--
 vlc-android/res/layout/player.xml              |    4 +++-
 5 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/vlc-android/res/layout/about_licence.xml b/vlc-android/res/layout/about_licence.xml
index 0eb9502..a718e1e 100644
--- a/vlc-android/res/layout/about_licence.xml
+++ b/vlc-android/res/layout/about_licence.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical" >
-
+<merge xmlns:android="http://schemas.android.com/apk/res/android" >
     <WebView
         android:id="@+id/webview"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent" />
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
 
-</FrameLayout>
\ No newline at end of file
+</merge>
\ No newline at end of file
diff --git a/vlc-android/res/layout/audio_player.xml b/vlc-android/res/layout/audio_player.xml
index 09e1691..59619bc 100644
--- a/vlc-android/res/layout/audio_player.xml
+++ b/vlc-android/res/layout/audio_player.xml
@@ -22,7 +22,6 @@
         android:id="@+id/header"
         android:layout_width="fill_parent"
         android:layout_height="60dip"
-        android:layout_weight="0"
         android:gravity="center_vertical"
         android:orientation="horizontal" >
 
diff --git a/vlc-android/res/layout/audio_playlist_item.xml b/vlc-android/res/layout/audio_playlist_item.xml
index 10304ab..3ce0a37 100644
--- a/vlc-android/res/layout/audio_playlist_item.xml
+++ b/vlc-android/res/layout/audio_playlist_item.xml
@@ -23,7 +23,6 @@
                 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" >
 
@@ -44,7 +43,6 @@
                 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" >
 
diff --git a/vlc-android/res/layout/audio_playlist_tips.xml b/vlc-android/res/layout/audio_playlist_tips.xml
index 7694c12..416193b 100644
--- a/vlc-android/res/layout/audio_playlist_tips.xml
+++ b/vlc-android/res/layout/audio_playlist_tips.xml
@@ -19,7 +19,7 @@
 
     <LinearLayout
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_height="0dp"
         android:layout_weight="1"
         android:gravity="left|center"
         android:orientation="vertical" >
@@ -51,7 +51,7 @@
 
     <LinearLayout
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_height="0dp"
         android:layout_weight="1"
         android:gravity="center"
         android:orientation="vertical" >
diff --git a/vlc-android/res/layout/player.xml b/vlc-android/res/layout/player.xml
index c3a39b9..e9ab906 100644
--- a/vlc-android/res/layout/player.xml
+++ b/vlc-android/res/layout/player.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent" >
 
@@ -18,7 +19,8 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:foregroundGravity="clip_horizontal|clip_vertical" >
+            android:foregroundGravity="clip_horizontal|clip_vertical"
+            tools:ignore="true">
 
             <SurfaceView
                 android:id="@+id/player_surface"



More information about the Android mailing list