Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Fixed the gap between video control buttons (#1732)
Browse files Browse the repository at this point in the history
* Fix for the fullscreen controls middle gap between buttons

* Added a padding to fix the gap

* Add a background layout to cover the gap
  • Loading branch information
keianhzo authored and MortimerGoro committed Sep 3, 2019
1 parent d926803 commit a6dc055
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 41 deletions.
13 changes: 4 additions & 9 deletions app/src/main/res/layout/navigation_bar.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<merge>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<include layout="@layout/navigation_bar_navigation" />

<include layout="@layout/navigation_bar_navigation" />
<include layout="@layout/navigation_bar_fullscreen" />

<include layout="@layout/navigation_bar_fullscreen" />

<include layout="@layout/navigation_bar_resize" />
</RelativeLayout>
<include layout="@layout/navigation_bar_resize" />
</merge>
67 changes: 40 additions & 27 deletions app/src/main/res/layout/navigation_bar_fullscreen.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">

<LinearLayout
<FrameLayout
android:id="@+id/fullScreenModeContainer"
style="?attr/navigationBarStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:padding="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone">

<org.mozilla.vrbrowser.ui.views.UIButton
android:id="@+id/fullScreenExitButton"
style="?attr/fullScreenButtonStyle"
android:background="@drawable/fullscreen_button_first"
android:src="@drawable/ic_icon_back" />
<FrameLayout
android:layout_width="5dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:background="@drawable/fullscreen_button" />

<org.mozilla.vrbrowser.ui.views.UIButton
android:id="@+id/fullScreenResizeEnterButton"
style="?attr/fullScreenButtonStyle"
android:src="@drawable/ic_icon_resize" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">

<org.mozilla.vrbrowser.ui.views.UIButton
android:id="@+id/projectionButton"
style="?attr/fullScreenButtonStyle"
android:src="@drawable/ic_icon_vr_projection"
android:tooltipText="@string/video_mode_tooltip" />
<org.mozilla.vrbrowser.ui.views.UIButton
android:id="@+id/fullScreenExitButton"
style="?attr/fullScreenButtonStyle"
android:background="@drawable/fullscreen_button_first"
android:src="@drawable/ic_icon_back"
android:tooltipText="@string/back_tooltip" />

<org.mozilla.vrbrowser.ui.views.UIButton
android:id="@+id/brightnessButton"
style="?attr/fullScreenButtonStyle"
android:background="@drawable/fullscreen_button_last"
android:src="@drawable/ic_icon_brightness" />
</LinearLayout>
<org.mozilla.vrbrowser.ui.views.UIButton
android:id="@+id/fullScreenResizeEnterButton"
style="?attr/fullScreenButtonStyle"
android:src="@drawable/ic_icon_resize"
android:tooltipText="@string/resize_tooltip" />

<org.mozilla.vrbrowser.ui.views.UIButton
android:id="@+id/projectionButton"
style="?attr/fullScreenButtonStyle"
android:src="@drawable/ic_icon_vr_projection"
android:tooltipText="@string/video_mode_tooltip" />

<org.mozilla.vrbrowser.ui.views.UIButton
android:id="@+id/brightnessButton"
style="?attr/fullScreenButtonStyle"
android:background="@drawable/fullscreen_button_last"
android:src="@drawable/ic_icon_brightness"
android:tooltipText="@string/brightness_mode_tooltip" />
</LinearLayout>
</FrameLayout>
</merge>
8 changes: 3 additions & 5 deletions app/src/main/res/layout/navigation_bar_resize.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@

<LinearLayout
android:id="@+id/resizeModeContainer"
style="?attr/navigationBarStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:padding="0dp"
android:visibility="gone">

<org.mozilla.vrbrowser.ui.views.UITextButton
Expand Down

0 comments on commit a6dc055

Please sign in to comment.