Glimpse: Remove placeholder search bar

Change-Id: Ib5c4ce40cefa388be4939813027367acf693e62a
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
diff --git a/app/src/main/java/org/lineageos/glimpse/fragments/LibraryFragment.kt b/app/src/main/java/org/lineageos/glimpse/fragments/LibraryFragment.kt
index e29d7bd..ba9f58f 100644
--- a/app/src/main/java/org/lineageos/glimpse/fragments/LibraryFragment.kt
+++ b/app/src/main/java/org/lineageos/glimpse/fragments/LibraryFragment.kt
@@ -16,7 +16,6 @@
 import androidx.fragment.app.Fragment
 import androidx.navigation.fragment.findNavController
 import com.google.android.material.appbar.AppBarLayout
-import com.google.android.material.search.SearchBar
 import com.google.android.material.shape.MaterialShapeDrawable
 import org.lineageos.glimpse.R
 import org.lineageos.glimpse.ext.getViewProperty
@@ -34,7 +33,6 @@
     private val favoritesAlbumListItem by getViewProperty<ListItem>(R.id.favoritesAlbumListItem)
     private val photosAlbumListItem by getViewProperty<ListItem>(R.id.photosAlbumListItem)
     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)
 
@@ -55,11 +53,6 @@
                 WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout()
             )
 
-            searchBar.updateLayoutParams<ViewGroup.MarginLayoutParams> {
-                leftMargin = insets.left
-                rightMargin = insets.right
-            }
-
             libraryNestedScrollView.updateLayoutParams<ViewGroup.MarginLayoutParams> {
                 leftMargin = insets.left
                 rightMargin = insets.right
diff --git a/app/src/main/res/drawable/ic_search.xml b/app/src/main/res/drawable/ic_search.xml
deleted file mode 100644
index aa8f844..0000000
--- a/app/src/main/res/drawable/ic_search.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?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:tint="#000000"
-    android:viewportWidth="24"
-    android:viewportHeight="24">
-    <path
-        android:fillColor="@android:color/white"
-        android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z" />
-</vector>
diff --git a/app/src/main/res/layout/fragment_library.xml b/app/src/main/res/layout/fragment_library.xml
index 67c6923..78033ad 100644
--- a/app/src/main/res/layout/fragment_library.xml
+++ b/app/src/main/res/layout/fragment_library.xml
@@ -16,12 +16,12 @@
         android:paddingHorizontal="16dp"
         app:liftOnScrollTargetViewId="@+id/libraryNestedScrollView">
 
-        <com.google.android.material.search.SearchBar
-            android:id="@+id/searchBar"
+        <com.google.android.material.appbar.MaterialToolbar
+            android:id="@+id/toolbar"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginVertical="16dp"
-            app:defaultMarginsEnabled="false" />
+            android:layout_height="?attr/actionBarSize"
+            app:layout_scrollFlags="scroll|enterAlways|snap"
+            app:title="@string/library_title" />
 
     </com.google.android.material.appbar.AppBarLayout>
 
@@ -39,7 +39,7 @@
 
             <TextView
                 android:id="@+id/categoriesTitleTextView"
-                style="@style/TextAppearance.Material3.TitleLarge"
+                style="@style/TextAppearance.Material3.TitleMedium"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginHorizontal="17dp"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index d8f80ad..b0e2716 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -12,7 +12,6 @@
     <!-- Titles -->
     <string name="reels_title">Reels</string>
     <string name="albums_title">Albums</string>
-    <string name="search_title">Search</string>
     <string name="categories_title">Categories</string>
     <string name="library_title">Library</string>