ui: create viewmodel for navigation

Create a ViewModel for the more complicated navigation pathways.

Normally, navigation was fragmented along a complicated stretch of
fragment hacks and DetailViewModel's navToItem attitbute, both of which
were not really that ideal. Dumpster them for a single, unified
viewmodel for the more complicated navigation situations. This removes
much of the duplicate navigation logic and is likely much more
maintainable for future situations.
This commit is contained in:
OxygenCobalt
2022-04-02 20:21:06 -06:00
parent 74f5962844
commit ab194c14c2
43 changed files with 283 additions and 247 deletions
@@ -6,15 +6,18 @@
android:layout_height="match_parent">
<org.oxycblt.auxio.ui.EdgeAppBarLayout
android:id="@+id/home_appbar"
style="@style/Widget.Auxio.AppBarLayout"
app:liftOnScroll="true">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/home_toolbar"
style="@style/Widget.Auxio.Toolbar"
app:menu="@menu/menu_home"
app:title="@string/info_app_name" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/home_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
@@ -40,6 +43,7 @@
app:layout_anchorGravity="bottom|end">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/home_fab"
style="@style/Widget.Auxio.FloatingActionButton.Adaptive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"