Code cleanup and minimization

* Deduplicated and simplified a lot of code
* Fixed ``invalidSeekConditions`` so that it's possible to seek while the player is loading (like currently the case)
This commit is contained in:
litetex 2021-12-03 20:29:18 +01:00
parent 18a6e22d45
commit f56439e568
11 changed files with 185 additions and 477 deletions

View file

@ -647,24 +647,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/controlAnimationView"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/background_oval_black_transparent"
android:padding="15dp"
android:visibility="gone"
tools:ignore="ContentDescription"
tools:src="@drawable/ic_fast_rewind"
tools:visibility="visible" />
</LinearLayout>
<RelativeLayout
android:id="@+id/loading_panel"
android:layout_width="match_parent"
@ -764,8 +746,8 @@
android:textColor="@color/white"
android:visibility="gone" />
<org.schabi.newpipe.views.player.PlayerSeekOverlay
android:id="@+id/seekOverlay"
<org.schabi.newpipe.views.player.PlayerFastSeekOverlay
android:id="@+id/fast_seek_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0"

View file

@ -643,24 +643,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/controlAnimationView"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/background_oval_black_transparent"
android:padding="15dp"
android:visibility="gone"
tools:ignore="ContentDescription"
tools:src="@drawable/ic_fast_rewind"
tools:visibility="visible" />
</LinearLayout>
<RelativeLayout
android:id="@+id/loading_panel"
android:layout_width="match_parent"
@ -761,8 +743,8 @@
android:textColor="@color/white"
android:visibility="gone" />
<org.schabi.newpipe.views.player.PlayerSeekOverlay
android:id="@+id/seekOverlay"
<org.schabi.newpipe.views.player.PlayerFastSeekOverlay
android:id="@+id/fast_seek_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0"

View file

@ -10,8 +10,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="false"
android:focusable="false"
android:visibility="invisible" />
android:focusable="false" />
<org.schabi.newpipe.views.player.SecondsView
android:id="@+id/seconds_view"