playback: rework playback slide up implementation

Rework the playback slide up implementation to be more straightfoward.

This is really composed of stylistic improvements, very little in
actual behavior changes. This does re-introduce a regression when
nothing is playing where the scroll position will become off when
rotating, but that desynchronization happens often so unless I were
to completely migrate both the panel and the bar to a view, I don't
really see it as an issue.
This commit is contained in:
OxygenCobalt
2022-03-20 12:33:49 -06:00
parent 608112a7ac
commit e4d4266e35
21 changed files with 317 additions and 329 deletions
@@ -2,7 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".playback.PlaybackFragment">
tools:context=".playback.PlaybackPanelFragment">
<data>
@@ -2,7 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".playback.PlaybackFragment">
tools:context=".playback.PlaybackPanelFragment">
<data>
@@ -2,7 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".playback.PlaybackFragment">
tools:context=".playback.PlaybackPanelFragment">
<data>
@@ -12,7 +12,7 @@
</data>
<merge
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
@@ -108,5 +108,5 @@
app:trackColor="?attr/colorPrimary"
tools:progress="70" />
</merge>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
@@ -2,7 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".playback.PlaybackFragment">
tools:context=".playback.PlaybackPanelFragment">
<data>
@@ -12,7 +12,7 @@
</data>
<merge
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
@@ -106,5 +106,5 @@
app:trackColor="?attr/colorPrimary"
tools:progress="70" />
</merge>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
+15 -3
View File
@@ -8,8 +8,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.oxycblt.auxio.playback.PlaybackLayout
android:id="@+id/playback_layout"
<org.oxycblt.auxio.ui.BottomSheetLayout
android:id="@+id/bottom_sheet_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -21,7 +21,19 @@
app:navGraph="@navigation/nav_explore"
tools:layout="@layout/fragment_home" />
</org.oxycblt.auxio.playback.PlaybackLayout>
<androidx.fragment.app.FragmentContainerView
android:id="@+id/playback_bar_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="org.oxycblt.auxio.playback.PlaybackBarFragment" />
<androidx.fragment.app.FragmentContainerView
android:id="@+id/playback_panel_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="org.oxycblt.auxio.playback.PlaybackPanelFragment" />
</org.oxycblt.auxio.ui.BottomSheetLayout>
<FrameLayout
android:id="@+id/layout_too_small"
@@ -12,7 +12,7 @@
</data>
<merge
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
@@ -80,5 +80,5 @@
app:layout_constraintStart_toStartOf="parent"
tools:progress="70" />
</merge>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
@@ -2,7 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".playback.PlaybackFragment">
tools:context=".playback.PlaybackPanelFragment">
<data>
+2 -4
View File
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- This is for PlaybackBarLayout -->
<item name="playback_container" type="id" />
<item name="playback_bar" type="id" />
<item name="playback_panel" type="id" />
<!-- This is for BottomSheetLayout -->
<item name="bottom_sheet_layout_container" type="id" />
<!-- This is for HomeFragment's AppBarLayout. Explanations for these can be found there. -->
<item name="home_song_list" type="id" />
+1 -1
View File
@@ -2,7 +2,7 @@
<resources>
<integer name="detail_app_bar_title_anim_duration">150</integer>
<!-- FIXME: This is really stupid, figure out how we can unify it with the C object-->
<!-- FIXME: This is really stupid, figure out how we can unify it with the IntegerTable object-->
<!-- Preference values -->
<string-array name="entries_theme">
<item>@string/set_theme_auto</item>