Add navigation to LibraryFragment

Add navigiation to LibraryFragment. This navigation is nested so that one can still move through the ViewPager, which will certainly have no problems later on. /s
This commit is contained in:
OxygenCobalt
2020-09-09 19:01:28 -06:00
parent 49248f98d9
commit f7e25d3fa8
21 changed files with 419 additions and 43 deletions
+7 -8
View File
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
<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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
@@ -19,13 +18,13 @@
app:title="@string/title_library_fragment"
tools:titleTextColor="@color/blue" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/library_recycler"
<androidx.fragment.app.FragmentContainerView
android:id="@+id/nav_host"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/album_item" />
app:defaultNavHost="false"
app:navGraph="@navigation/nav_library" />
</LinearLayout>
</layout>