[Android] Center elements in video actionbar for old devices

Geoffrey Métais git at videolan.org
Mon Feb 29 16:02:29 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 29 15:52:00 2016 +0100| [318280621a5c71252ec27624c7f3a4caffcc2533] | committer: Geoffrey Métais

Center elements in video actionbar for old devices

> https://code.videolan.org/videolan/vlc-android/commit/318280621a5c71252ec27624c7f3a4caffcc2533
---

 vlc-android/res/layout/player_action_bar.xml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/vlc-android/res/layout/player_action_bar.xml b/vlc-android/res/layout/player_action_bar.xml
index 54a6dae..87f92d0 100644
--- a/vlc-android/res/layout/player_action_bar.xml
+++ b/vlc-android/res/layout/player_action_bar.xml
@@ -11,8 +11,9 @@
     <TextView
         android:id="@+id/player_overlay_title"
         android:layout_width="0dp"
-        android:layout_height="wrap_content"
+        android:layout_height="match_parent"
         android:layout_weight="1"
+        android:gravity="center"
         android:text="@string/title"
         android:textColor="#ffffff"
         android:textSize="15sp" />
@@ -20,10 +21,11 @@
     <TextView
         android:id="@+id/player_overlay_battery"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_height="match_parent"
         android:layout_marginRight="5dp"
         android:textColor="#ffffff"
         android:textSize="15sp"
+        android:gravity="center"
         tools:ignore="true" />
 
     <TextView
@@ -39,6 +41,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginRight="5dp"
+        android:layout_gravity="center_vertical"
         android:src="@drawable/ic_playlist_circle"
         android:focusable="true"
         android:visibility="gone"/>
@@ -47,6 +50,7 @@
         android:id="@+id/player_overlay_navmenu"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
         android:clickable="true"
         android:src="@drawable/ic_navmenu_circle"
         android:scaleType="center"



More information about the Android mailing list