[Android] Fix ActionBar size & factorize shadow view

Geoffrey Métais git at videolan.org
Fri Feb 27 12:07:29 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb 27 12:06:53 2015 +0100| [46a3057ad70a29676906c95bbe4a6b02ecd66e3f] | committer: Geoffrey Métais

Fix ActionBar size & factorize shadow view

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

 vlc-android/res/layout/about.xml              |    5 ++---
 vlc-android/res/layout/audio_albums_songs.xml |    5 ++---
 vlc-android/res/layout/audio_browser.xml      |    6 ++----
 vlc-android/res/layout/directory_view.xml     |    6 +-----
 vlc-android/res/layout/history_list.xml       |    6 +-----
 vlc-android/res/layout/main.xml               |    3 +--
 vlc-android/res/layout/mrl_panel.xml          |    6 +-----
 vlc-android/res/layout/network_browser.xml    |    6 +-----
 vlc-android/res/layout/shadow_top.xml         |    6 ++++++
 vlc-android/res/layout/video_grid.xml         |    7 +------
 10 files changed, 18 insertions(+), 38 deletions(-)

diff --git a/vlc-android/res/layout/about.xml b/vlc-android/res/layout/about.xml
index 672d0ba..266144c 100644
--- a/vlc-android/res/layout/about.xml
+++ b/vlc-android/res/layout/about.xml
@@ -19,9 +19,8 @@
             <include layout="@layout/about_licence" />
         </android.support.v4.view.ViewPager>
 
-    <View
+    <include layout="@layout/shadow_top"
         android:layout_width="match_parent"
         android:layout_height="9dp"
-        android:layout_below="@+id/sliding_tabs"
-        android:background="@drawable/bottom_shadow" />
+        android:layout_below="@+id/sliding_tabs" />
 </RelativeLayout>
diff --git a/vlc-android/res/layout/audio_albums_songs.xml b/vlc-android/res/layout/audio_albums_songs.xml
index 2241f39..b3d6afc 100644
--- a/vlc-android/res/layout/audio_albums_songs.xml
+++ b/vlc-android/res/layout/audio_albums_songs.xml
@@ -50,10 +50,9 @@
         </android.support.v4.view.ViewPager>
     </android.support.v4.widget.SwipeRefreshLayout>
 
-    <View
+    <include layout="@layout/shadow_top"
         android:layout_width="match_parent"
         android:layout_height="9dp"
-        android:layout_below="@+id/sliding_tabs"
-        android:background="@drawable/bottom_shadow" />
+        android:layout_below="@+id/sliding_tabs" />
 </RelativeLayout>
 
diff --git a/vlc-android/res/layout/audio_browser.xml b/vlc-android/res/layout/audio_browser.xml
index ecc90f6..cf54195 100644
--- a/vlc-android/res/layout/audio_browser.xml
+++ b/vlc-android/res/layout/audio_browser.xml
@@ -89,10 +89,8 @@
         </android.support.v4.view.ViewPager>
     </android.support.v4.widget.SwipeRefreshLayout>
 
-    <View
-        android:id="@+id/shadow"
+    <include layout="@layout/shadow_top"
         android:layout_width="match_parent"
         android:layout_height="9dp"
-        android:layout_below="@+id/sliding_tabs"
-        android:background="@drawable/bottom_shadow" />
+        android:layout_below="@+id/sliding_tabs" />
 </RelativeLayout>
diff --git a/vlc-android/res/layout/directory_view.xml b/vlc-android/res/layout/directory_view.xml
index 6bd68b0..5a981d0 100644
--- a/vlc-android/res/layout/directory_view.xml
+++ b/vlc-android/res/layout/directory_view.xml
@@ -18,9 +18,5 @@
         </ListView>
     </android.support.v4.widget.SwipeRefreshLayout>
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="9dp"
-        android:layout_marginTop="6dp"
-        android:background="@drawable/bottom_shadow" />
+    <include layout="@layout/shadow_top"/>
 </FrameLayout>
\ No newline at end of file
diff --git a/vlc-android/res/layout/history_list.xml b/vlc-android/res/layout/history_list.xml
index 5ce67fa..c975409 100644
--- a/vlc-android/res/layout/history_list.xml
+++ b/vlc-android/res/layout/history_list.xml
@@ -27,9 +27,5 @@
             android:textSize="20sp" />
     </android.support.v4.widget.SwipeRefreshLayout>
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="9dp"
-        android:layout_marginTop="6dp"
-        android:background="@drawable/bottom_shadow" />
+    <include layout="@layout/shadow_top"/>
 </FrameLayout>
\ No newline at end of file
diff --git a/vlc-android/res/layout/main.xml b/vlc-android/res/layout/main.xml
index c5e7943..f4f475f 100644
--- a/vlc-android/res/layout/main.xml
+++ b/vlc-android/res/layout/main.xml
@@ -85,8 +85,7 @@
 
     <android.support.v7.widget.Toolbar
         android:id="@+id/main_toolbar"
-        android:layout_height="wrap_content"
+        android:layout_height="?attr/actionBarSize"
         android:layout_width="match_parent"
-        android:minHeight="?attr/actionBarSize"
         android:background="?attr/background_actionbar" />
 </FrameLayout>
diff --git a/vlc-android/res/layout/mrl_panel.xml b/vlc-android/res/layout/mrl_panel.xml
index 48ddd66..3492035 100644
--- a/vlc-android/res/layout/mrl_panel.xml
+++ b/vlc-android/res/layout/mrl_panel.xml
@@ -19,9 +19,5 @@
         android:layout_marginLeft="15dp"
         android:layout_below="@+id/mrl_edit"/>
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="9dp"
-        android:layout_marginTop="6dp"
-        android:background="@drawable/bottom_shadow" />
+    <include layout="@layout/shadow_top"/>
 </RelativeLayout>
diff --git a/vlc-android/res/layout/network_browser.xml b/vlc-android/res/layout/network_browser.xml
index 66ff3d8..5f736e6 100644
--- a/vlc-android/res/layout/network_browser.xml
+++ b/vlc-android/res/layout/network_browser.xml
@@ -23,9 +23,5 @@
         </FrameLayout>
     </android.support.v4.widget.SwipeRefreshLayout>
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="9dp"
-        android:layout_marginTop="6dp"
-        android:background="@drawable/bottom_shadow" />
+    <include layout="@layout/shadow_top"/>
 </FrameLayout>
diff --git a/vlc-android/res/layout/shadow_top.xml b/vlc-android/res/layout/shadow_top.xml
new file mode 100644
index 0000000..4a822f7
--- /dev/null
+++ b/vlc-android/res/layout/shadow_top.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<View xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/shadow"
+    android:layout_width="match_parent"
+    android:layout_height="9dp"
+    android:background="@drawable/bottom_shadow"/>
\ No newline at end of file
diff --git a/vlc-android/res/layout/video_grid.xml b/vlc-android/res/layout/video_grid.xml
index fac121b..aa95f47 100644
--- a/vlc-android/res/layout/video_grid.xml
+++ b/vlc-android/res/layout/video_grid.xml
@@ -95,10 +95,5 @@
         </LinearLayout>
     </LinearLayout>
 
-    <View
-        android:id="@+id/shadow"
-        android:layout_width="match_parent"
-        android:layout_height="9dp"
-        android:layout_marginTop="6dp"
-        android:background="@drawable/bottom_shadow" />
+    <include layout="@layout/shadow_top" />
 </FrameLayout>



More information about the Android mailing list