[Android] Same size for all control buttons

Geoffrey Métais git at videolan.org
Thu Jan 8 16:13:44 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jan  7 16:54:27 2015 +0100| [4c5d62bfd37d56f71b2908eb971090b97a48172e] | committer: Geoffrey Métais

Same size for all control buttons

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

 vlc-android/res/layout/player_hud.xml |  110 +++++++++++++++------------------
 1 file changed, 50 insertions(+), 60 deletions(-)

diff --git a/vlc-android/res/layout/player_hud.xml b/vlc-android/res/layout/player_hud.xml
index 977fd37..44e0e26 100644
--- a/vlc-android/res/layout/player_hud.xml
+++ b/vlc-android/res/layout/player_hud.xml
@@ -51,71 +51,61 @@
         android:textSize="16sp" />
 
     <!-- Media control buttons -->
-
-    <ImageView
-        android:id="@+id/lock_overlay_button"
-        android:layout_width="wrap_content"
+    <LinearLayout
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_below="@id/player_overlay_length"
-        android:layout_alignBottom="@+id/player_overlay_play"
-        android:layout_alignTop="@+id/player_overlay_play"
-        android:layout_alignParentLeft="true"
+        android:layout_marginRight="@dimen/images_margin_sides"
         android:layout_marginLeft="@dimen/images_margin_sides"
-        android:src="@drawable/ic_lock_circle"
-        android:scaleType="center"
-        android:focusable="true"/>
+        android:weightSum="5">
+        <ImageView
+            android:id="@+id/lock_overlay_button"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:src="@drawable/ic_lock_circle"
+            android:scaleType="center"
+            android:focusable="true"/>
 
-    <ImageView
-        android:id="@+id/player_overlay_tracks"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/player_overlay_length"
-        android:layout_toRightOf="@+id/lock_overlay_button"
-        android:layout_toLeftOf="@+id/player_overlay_play"
-        android:layout_alignBottom="@+id/player_overlay_play"
-        android:layout_alignTop="@+id/player_overlay_play"
-        android:clickable="true"
-        android:onClick="onAudioSubClick"
-        android:src="@drawable/ic_audiosub_circle"
-        android:scaleType="center"
-        android:focusable="true"/>
+        <ImageView
+            android:id="@+id/player_overlay_tracks"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:clickable="true"
+            android:onClick="onAudioSubClick"
+            android:src="@drawable/ic_audiosub_circle"
+            android:scaleType="center"
+            android:focusable="true"/>
 
-    <ImageView
-        android:id="@+id/player_overlay_play"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/player_overlay_length"
-        android:layout_centerHorizontal="true"
-        android:clickable="true"
-        android:src="@drawable/ic_pause_circle_normal_o"
-        android:scaleType="center"
-        android:focusable="true"/>
+        <ImageView
+            android:id="@+id/player_overlay_play"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:clickable="true"
+            android:src="@drawable/ic_pause_circle_normal_o"
+            android:scaleType="center"
+            android:focusable="true"/>
 
-    <ImageView
-        android:id="@+id/player_overlay_adv_function"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/player_overlay_length"
-        android:layout_toRightOf="@+id/player_overlay_play"
-        android:layout_toLeftOf="@+id/player_overlay_size"
-        android:layout_alignBottom="@+id/player_overlay_play"
-        android:layout_alignTop="@+id/player_overlay_play"
-        android:clickable="true"
-        android:onClick="showAdvancedOptions"
-        android:src="@drawable/ic_more_circle"
-        android:scaleType="center"
-        android:focusable="true"/>
+        <ImageView
+            android:id="@+id/player_overlay_adv_function"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:clickable="true"
+            android:onClick="showAdvancedOptions"
+            android:src="@drawable/ic_more_circle"
+            android:scaleType="center"
+            android:focusable="true"/>
 
-    <ImageView
-        android:id="@+id/player_overlay_size"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/player_overlay_length"
-        android:layout_alignBottom="@+id/player_overlay_play"
-        android:layout_alignTop="@+id/player_overlay_play"
-        android:layout_alignParentRight="true"
-        android:layout_marginRight="@dimen/images_margin_sides"
-        android:src="@drawable/ic_crop_circle_o"
-        android:scaleType="center"
-        android:focusable="true" />
+        <ImageView
+            android:id="@+id/player_overlay_size"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:src="@drawable/ic_crop_circle_o"
+            android:scaleType="center"
+            android:focusable="true" />
+    </LinearLayout>
 </RelativeLayout>
\ No newline at end of file



More information about the Android mailing list