From af63a64b3a2794aad5df5c38a725cf4cf2ab464b Mon Sep 17 00:00:00 2001 From: Bnyro Date: Thu, 14 Jul 2022 22:05:35 +0200 Subject: [PATCH] player UI improvements --- .../libretube/fragments/PlayerFragment.kt | 3 +- .../main/res/drawable/ic_rotating_circle.xml | 12 +++- .../layout/exo_styled_player_control_view.xml | 70 ++++++------------- app/src/main/res/values/style.xml | 17 ++++- 4 files changed, 49 insertions(+), 53 deletions(-) diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt index eff82fe5f..b05624a71 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt @@ -1303,7 +1303,8 @@ class PlayerFragment : Fragment() { playerBinding.exoPlayPause.visibility = visibility playerBinding.exoBottomBar.visibility = visibility playerBinding.closeImageButton.visibility = visibility - playerBinding.exoTitle.visibility = visibility + playerBinding.exoTitle.visibility = + if (isLocked && Globals.isFullScreen) View.VISIBLE else View.INVISIBLE // disable double tap to seek when the player is locked if (isLocked) enableDoubleTapToSeek() else disableDoubleTapToSeek() diff --git a/app/src/main/res/drawable/ic_rotating_circle.xml b/app/src/main/res/drawable/ic_rotating_circle.xml index 7339373fe..63ad1c16a 100644 --- a/app/src/main/res/drawable/ic_rotating_circle.xml +++ b/app/src/main/res/drawable/ic_rotating_circle.xml @@ -1,4 +1,10 @@ - - + + diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml index 21e47fef8..8df359629 100644 --- a/app/src/main/res/layout/exo_styled_player_control_view.xml +++ b/app/src/main/res/layout/exo_styled_player_control_view.xml @@ -20,28 +20,21 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:layoutDirection="ltr" - android:paddingStart="@dimen/exo_styled_bottom_bar_time_padding" - android:paddingLeft="@dimen/exo_styled_bottom_bar_time_padding" - android:paddingEnd="@dimen/exo_styled_bottom_bar_time_padding" - android:paddingRight="@dimen/exo_styled_bottom_bar_time_padding"> + android:layout_marginStart="5dp" + android:layoutDirection="ltr"> - - @@ -64,42 +57,26 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:layoutDirection="ltr" - android:paddingStart="@dimen/exo_styled_bottom_bar_time_padding" - android:paddingLeft="@dimen/exo_styled_bottom_bar_time_padding" - android:paddingEnd="@dimen/exo_styled_bottom_bar_time_padding" - android:paddingRight="@dimen/exo_styled_bottom_bar_time_padding"> + android:layout_marginEnd="10dp" + android:layoutDirection="ltr"> - + style="@style/PlayerControlTop" + android:text="1x" /> + style="@style/PlayerControlTop" + android:text="@string/hls" /> @@ -116,7 +93,6 @@ + style="@style/PlayerControlBottom" /> diff --git a/app/src/main/res/values/style.xml b/app/src/main/res/values/style.xml index b40cc63da..590003761 100644 --- a/app/src/main/res/values/style.xml +++ b/app/src/main/res/values/style.xml @@ -104,14 +104,27 @@ - + + + + \ No newline at end of file