Glimpse: Rename SearchFragment to LibraryFragment

This fragment contains more options than just search.
Rename to better reflect this.

Change-Id: I7d22eae1977c178677607b952664d1f7c1dc4007
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
diff --git a/app/src/main/java/org/lineageos/glimpse/fragments/SearchFragment.kt b/app/src/main/java/org/lineageos/glimpse/fragments/LibraryFragment.kt
similarity index 90%
rename from app/src/main/java/org/lineageos/glimpse/fragments/SearchFragment.kt
rename to app/src/main/java/org/lineageos/glimpse/fragments/LibraryFragment.kt
index 327a756..e29d7bd 100644
--- a/app/src/main/java/org/lineageos/glimpse/fragments/SearchFragment.kt
+++ b/app/src/main/java/org/lineageos/glimpse/fragments/LibraryFragment.kt
@@ -25,15 +25,15 @@
 
 /**
  * A fragment showing a search bar with categories.
- * Use the [SearchFragment.newInstance] factory method to
+ * Use the [LibraryFragment.newInstance] factory method to
  * create an instance of this fragment.
  */
-class SearchFragment : Fragment(R.layout.fragment_search) {
+class LibraryFragment : Fragment(R.layout.fragment_library) {
     // Views
     private val appBarLayout by getViewProperty<AppBarLayout>(R.id.appBarLayout)
     private val favoritesAlbumListItem by getViewProperty<ListItem>(R.id.favoritesAlbumListItem)
     private val photosAlbumListItem by getViewProperty<ListItem>(R.id.photosAlbumListItem)
-    private val searchNestedScrollView by getViewProperty<NestedScrollView>(R.id.searchNestedScrollView)
+    private val libraryNestedScrollView by getViewProperty<NestedScrollView>(R.id.libraryNestedScrollView)
     private val searchBar by getViewProperty<SearchBar>(R.id.searchBar)
     private val trashAlbumListItem by getViewProperty<ListItem>(R.id.trashAlbumListItem)
     private val videosAlbumListItem by getViewProperty<ListItem>(R.id.videosAlbumListItem)
@@ -60,7 +60,7 @@
                 rightMargin = insets.right
             }
 
-            searchNestedScrollView.updateLayoutParams<ViewGroup.MarginLayoutParams> {
+            libraryNestedScrollView.updateLayoutParams<ViewGroup.MarginLayoutParams> {
                 leftMargin = insets.left
                 rightMargin = insets.right
             }
@@ -103,7 +103,7 @@
          *
          * @return A new instance of fragment SearchFragment.
          */
-        fun newInstance() = SearchFragment().apply {
+        fun newInstance() = LibraryFragment().apply {
             arguments = createBundle()
         }
     }
diff --git a/app/src/main/res/drawable/ic_library.xml b/app/src/main/res/drawable/ic_library.xml
new file mode 100644
index 0000000..836d2e0
--- /dev/null
+++ b/app/src/main/res/drawable/ic_library.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     SPDX-FileCopyrightText: Material Design Authors / Google LLC
+     SPDX-License-Identifier: Apache-2.0
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="960"
+    android:viewportHeight="960"
+    android:tint="?attr/colorControlNormal">
+  <path
+      android:fillColor="@android:color/white"
+      android:pathData="M320,640L800,640Q800,640 800,640Q800,640 800,640L800,160Q800,160 800,160Q800,160 800,160L720,160L720,440L620,380L520,440L520,160L320,160Q320,160 320,160Q320,160 320,160L320,640Q320,640 320,640Q320,640 320,640ZM320,720Q287,720 263.5,696.5Q240,673 240,640L240,160Q240,127 263.5,103.5Q287,80 320,80L800,80Q833,80 856.5,103.5Q880,127 880,160L880,640Q880,673 856.5,696.5Q833,720 800,720L320,720ZM160,880Q127,880 103.5,856.5Q80,833 80,800L80,240L160,240L160,800Q160,800 160,800Q160,800 160,800L720,800L720,880L160,880ZM520,160L520,160L620,160L720,160L720,160L520,160ZM320,160Q320,160 320,160Q320,160 320,160L320,160Q320,160 320,160Q320,160 320,160L520,160L520,160L620,160L720,160L720,160L800,160Q800,160 800,160Q800,160 800,160L800,160Q800,160 800,160Q800,160 800,160L320,160Z"/>
+</vector>
diff --git a/app/src/main/res/layout/fragment_search.xml b/app/src/main/res/layout/fragment_library.xml
similarity index 96%
rename from app/src/main/res/layout/fragment_search.xml
rename to app/src/main/res/layout/fragment_library.xml
index fe03199..67c6923 100644
--- a/app/src/main/res/layout/fragment_search.xml
+++ b/app/src/main/res/layout/fragment_library.xml
@@ -14,7 +14,7 @@
         android:layout_height="wrap_content"
         android:fitsSystemWindows="true"
         android:paddingHorizontal="16dp"
-        app:liftOnScrollTargetViewId="@+id/searchNestedScrollView">
+        app:liftOnScrollTargetViewId="@+id/libraryNestedScrollView">
 
         <com.google.android.material.search.SearchBar
             android:id="@+id/searchBar"
@@ -26,7 +26,7 @@
     </com.google.android.material.appbar.AppBarLayout>
 
     <androidx.core.widget.NestedScrollView
-        android:id="@+id/searchNestedScrollView"
+        android:id="@+id/libraryNestedScrollView"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical"
diff --git a/app/src/main/res/menu/fragment_main_bottom_app_bar.xml b/app/src/main/res/menu/fragment_main_bottom_app_bar.xml
index 18d5b87..6c8f0bd 100644
--- a/app/src/main/res/menu/fragment_main_bottom_app_bar.xml
+++ b/app/src/main/res/menu/fragment_main_bottom_app_bar.xml
@@ -19,8 +19,8 @@
 
     <item
         style="@style/Theme.Glimpse.BottomAppBarOption"
-        android:id="@+id/searchFragment"
-        android:icon="@drawable/ic_search"
-        android:title="@string/search_title" />
+        android:id="@+id/libraryFragment"
+        android:icon="@drawable/ic_library"
+        android:title="@string/library_title" />
 
 </menu>
diff --git a/app/src/main/res/navigation/main_fragment_navigation.xml b/app/src/main/res/navigation/main_fragment_navigation.xml
index 888c9ab..65165cf 100644
--- a/app/src/main/res/navigation/main_fragment_navigation.xml
+++ b/app/src/main/res/navigation/main_fragment_navigation.xml
@@ -22,9 +22,9 @@
         tools:layout="@layout/fragment_albums" />
 
     <fragment
-        android:id="@+id/searchFragment"
-        android:name="org.lineageos.glimpse.fragments.SearchFragment"
-        android:label="@string/search_title"
-        tools:layout="@layout/fragment_search" />
+        android:id="@+id/libraryFragment"
+        android:name="org.lineageos.glimpse.fragments.LibraryFragment"
+        android:label="@string/library_title"
+        tools:layout="@layout/fragment_library" />
 
 </navigation>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 78f18f9..d8f80ad 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -14,6 +14,7 @@
     <string name="albums_title">Albums</string>
     <string name="search_title">Search</string>
     <string name="categories_title">Categories</string>
+    <string name="library_title">Library</string>
 
     <!-- Album buckets -->
     <string name="album_favorites">Favorites</string>