Skip to content

Commit

Permalink
Glimpse: Remove placeholder search bar
Browse files Browse the repository at this point in the history
Change-Id: Ib5c4ce40cefa388be4939813027367acf693e62a
Signed-off-by: Aayush Gupta <[email protected]>
  • Loading branch information
theimpulson authored and mikeNG committed Jun 20, 2024
1 parent bddb3bf commit 1d1b131
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import androidx.core.widget.NestedScrollView
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
Expand All @@ -34,7 +33,6 @@ class LibraryFragment : Fragment(R.layout.fragment_library) {
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)

Expand All @@ -55,11 +53,6 @@ class LibraryFragment : Fragment(R.layout.fragment_library) {
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
Expand Down
15 changes: 0 additions & 15 deletions app/src/main/res/drawable/ic_search.xml

This file was deleted.

12 changes: 6 additions & 6 deletions app/src/main/res/layout/fragment_library.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -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"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down

0 comments on commit 1d1b131

Please sign in to comment.