ui: create dedicated playback bar layout

Create a dedicated playback bar layout. This replaces the old janky
observer system with something that handles state better and is just
more elegant.
This commit is contained in:
OxygenCobalt
2021-10-30 18:21:30 -06:00
parent 4f4f6654c0
commit 68782fadac
33 changed files with 544 additions and 278 deletions
+5 -16
View File
@@ -4,8 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
tools:context=".MainFragment">
<LinearLayout
android:id="@+id/main_layout"
<org.oxycblt.auxio.playback.PlaybackBarLayout
android:id="@+id/main_bar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
@@ -15,20 +15,9 @@
android:id="@+id/explore_nav_host"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
app:navGraph="@navigation/nav_explore"
tools:layout="@layout/fragment_home" />
<androidx.fragment.app.FragmentContainerView
android:id="@+id/main_playback"
android:name="org.oxycblt.auxio.playback.CompactPlaybackFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
android:clipToPadding="true"
android:elevation="@dimen/elevation_normal"
tools:layout="@layout/fragment_compact_playback" />
</LinearLayout>
</layout>
</org.oxycblt.auxio.playback.PlaybackBarLayout>
</layout>