[Android] VideoPlayer : Resize time information and dynamicaly adjust seekbar

Alexandre Perraud git at videolan.org
Tue Feb 12 18:23:49 CET 2013


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Tue Feb 12 17:48:45 2013 +0100| [f93d183e9f680736e2fd0948804794406e0ac344] | committer: Jean-Baptiste Kempf

VideoPlayer : Resize time information and dynamicaly adjust seekbar

This avoids the overlap of the timeline and time button, and the big
space.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 vlc-android/res/layout/player.xml |   23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/vlc-android/res/layout/player.xml b/vlc-android/res/layout/player.xml
index 50842dc..d4f3408 100644
--- a/vlc-android/res/layout/player.xml
+++ b/vlc-android/res/layout/player.xml
@@ -10,6 +10,7 @@
         android:layout_height="wrap_content"
         android:layout_centerInParent="true"
         android:foregroundGravity="clip_horizontal" >
+
         <SurfaceView
             android:id="@+id/player_surface"
             android:layout_width="wrap_content"
@@ -86,8 +87,8 @@
             android:layout_height="35dp"
             android:layout_marginRight="5dp"
             android:layout_marginTop="20dp"
-            android:onClick="showAdvanceFunction"
-            android:background="@drawable/dots" />
+            android:background="@drawable/dots"
+            android:onClick="showAdvanceFunction" />
 
         <ImageButton
             android:id="@+id/player_overlay_audio"
@@ -104,7 +105,6 @@
             android:layout_marginRight="5dp"
             android:layout_marginTop="20dp"
             android:background="@drawable/header_icon_subtitle" />
-
     </LinearLayout>
 
     <LinearLayout
@@ -133,42 +133,44 @@
 
         <TextView
             android:id="@+id/player_overlay_time"
-            android:layout_width="60dp"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignBottom="@+id/player_overlay_seekbar"
             android:layout_alignParentLeft="true"
             android:layout_alignTop="@+id/player_overlay_seekbar"
             android:clickable="true"
             android:gravity="left|center_vertical"
+            android:paddingRight="10dp"
             android:text="@string/time_0"
             android:textColor="#ffffff"
-            android:textSize="15dip" />
+            android:textSize="15sp" />
 
         <SeekBar
             android:id="@+id/player_overlay_seekbar"
-            android:layout_width="fill_parent"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_toLeftOf="@+id/player_overlay_length"
             android:layout_toRightOf="@+id/player_overlay_time"
             android:maxHeight="4dip"
             android:minHeight="4dip"
-            android:paddingLeft="20dp"
-            android:paddingRight="20dp"
+            android:paddingLeft="10dp"
+            android:paddingRight="10dp"
             android:progressDrawable="@drawable/po_seekbar"
             android:thumb="@drawable/ic_seekbar_thumb" />
 
         <TextView
             android:id="@+id/player_overlay_length"
-            android:layout_width="60dp"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignBottom="@+id/player_overlay_seekbar"
             android:layout_alignParentRight="true"
             android:layout_alignTop="@+id/player_overlay_seekbar"
             android:clickable="true"
             android:gravity="right|center_vertical"
+            android:paddingLeft="10dp"
             android:text="@string/time_0"
             android:textColor="#ffffff"
-            android:textSize="15dip" />
+            android:textSize="15sp" />
 
         <FrameLayout
             android:id="@+id/player_control"
@@ -186,7 +188,6 @@
             android:layout_alignParentRight="true"
             android:layout_below="@+id/player_overlay_seekbar"
             android:background="@drawable/ic_size" />
-
     </RelativeLayout>
 
 </RelativeLayout>
\ No newline at end of file



More information about the Android mailing list