2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

android: Allow search bar to scroll offscreen

This commit is contained in:
Charles Lombardo 2023-04-28 19:04:31 -04:00 committed by bunnei
parent 3b9791d887
commit 71667e4d6d
3 changed files with 8 additions and 15 deletions

View file

@ -125,6 +125,7 @@ class GamesFragment : Fragment() {
TransitionState.HIDING -> {
gamesViewModel.setSearchedGames(emptyList())
searchHidden()
binding.appBarSearch.setExpanded(true)
}
}
}

View file

@ -75,11 +75,9 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
setUpNavigation(navHostFragment.navController)
binding.statusBarShade.setBackgroundColor(
ThemeHelper.getColorWithOpacity(
MaterialColors.getColor(
binding.root,
R.attr.colorSurface
), ThemeHelper.SYSTEM_BAR_ALPHA
MaterialColors.getColor(
binding.root,
R.attr.colorSurface
)
)

View file

@ -44,20 +44,14 @@
android:id="@+id/app_bar_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
app:liftOnScrollTargetViewId="@id/grid_games">
<FrameLayout
<com.google.android.material.search.SearchBar
android:id="@+id/search_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<com.google.android.material.search.SearchBar
android:id="@+id/search_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/home_search_games" />
</FrameLayout>
android:hint="@string/home_search_games" />
</com.google.android.material.appbar.AppBarLayout>