Commit 179a5efc authored by Alexandre Perraud's avatar Alexandre Perraud

Video Player : Fix UI for small screens

Fix #14958
parent 39306b88
......@@ -59,20 +59,22 @@
<LinearLayout
android:id="@+id/player_overlay_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="100dp"
android:orientation="horizontal"
android:layout_above="@+id/progress_overlay"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/default_margin">
<FrameLayout android:id="@+id/verticalbar"
android:layout_width="24dp"
android:layout_height="100dp"
<FrameLayout
android:id="@+id/verticalbar"
android:layout_width="20dp"
android:layout_height="match_parent"
android:background="@drawable/video_list_length_bg"
android:visibility="gone">
<LinearLayout android:layout_width="match_parent"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="6dp"
android:padding="4dp"
android:orientation="vertical"
android:weightSum="100"
android:gravity="bottom">
......@@ -86,12 +88,10 @@
<TextView
android:id="@+id/player_overlay_textinfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_height="match_parent"
android:background="@drawable/video_list_length_bg"
android:padding="@dimen/half_default_margin"
android:layout_margin="@dimen/half_default_margin"
android:gravity="center_horizontal"
android:layout_marginLeft="@dimen/half_default_margin"
android:gravity="center"
android:textColor="@color/white"
android:textSize="36sp"
android:visibility="gone" />
......
......@@ -29,7 +29,7 @@
<TextView
android:id="@+id/player_overlay_time"
android:layout_width="64dp"
android:layout_width="66dp"
android:layout_height="wrap_content"
android:layout_below="@id/player_overlay_seekbar"
android:layout_alignLeft="@+id/player_overlay_seekbar"
......@@ -43,7 +43,7 @@
<TextView
android:id="@+id/player_overlay_length"
android:layout_width="64dp"
android:layout_width="66dp"
android:layout_height="wrap_content"
android:layout_below="@id/player_overlay_seekbar"
android:layout_alignParentRight="true"
......
......@@ -1800,7 +1800,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mTouchAction = TOUCH_VOLUME;
vol = vol * 100 / mAudioMax;
showInfoWithVerticalBar(getString(R.string.volume) + '\u00A0' + Integer.toString(vol) + '%', 1000, vol);
showInfoWithVerticalBar(getString(R.string.volume) + "\n" + Integer.toString(vol) + '%', 1000, vol);
}
private void mute(boolean mute) {
......@@ -1859,7 +1859,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
// Set Brightness
getWindow().setAttributes(lp);
int brightness = Math.round(lp.screenBrightness * 100);
showInfoWithVerticalBar(getString(R.string.brightness) + '\u00A0' + brightness + '%', 1000, brightness);
showInfoWithVerticalBar(getString(R.string.brightness) + "\n" + brightness + '%', 1000, brightness);
}
/**
......@@ -2306,7 +2306,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mSysTime.setText(DateFormat.getTimeFormat(this).format(new Date(System.currentTimeMillis())));
if (time >= 0) mTime.setText(Strings.millisToString(time));
if (length >= 0) mLength.setText(mDisplayRemainingTime && length > 0
? "- " + Strings.millisToString(length - time)
? "-" + '\u00A0' + Strings.millisToString(length - time)
: Strings.millisToString(length));
return time;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment