android: Allow search bar to scroll offscreen
This commit is contained in:
parent
3b9791d887
commit
71667e4d6d
3 changed files with 8 additions and 15 deletions
|
@ -125,6 +125,7 @@ class GamesFragment : Fragment() {
|
||||||
TransitionState.HIDING -> {
|
TransitionState.HIDING -> {
|
||||||
gamesViewModel.setSearchedGames(emptyList())
|
gamesViewModel.setSearchedGames(emptyList())
|
||||||
searchHidden()
|
searchHidden()
|
||||||
|
binding.appBarSearch.setExpanded(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,11 +75,9 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||||
setUpNavigation(navHostFragment.navController)
|
setUpNavigation(navHostFragment.navController)
|
||||||
|
|
||||||
binding.statusBarShade.setBackgroundColor(
|
binding.statusBarShade.setBackgroundColor(
|
||||||
ThemeHelper.getColorWithOpacity(
|
|
||||||
MaterialColors.getColor(
|
MaterialColors.getColor(
|
||||||
binding.root,
|
binding.root,
|
||||||
R.attr.colorSurface
|
R.attr.colorSurface
|
||||||
), ThemeHelper.SYSTEM_BAR_ALPHA
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -44,21 +44,15 @@
|
||||||
android:id="@+id/app_bar_search"
|
android:id="@+id/app_bar_search"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
app:liftOnScrollTargetViewId="@id/grid_games">
|
app:liftOnScrollTargetViewId="@id/grid_games">
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fitsSystemWindows="true">
|
|
||||||
|
|
||||||
<com.google.android.material.search.SearchBar
|
<com.google.android.material.search.SearchBar
|
||||||
android:id="@+id/search_bar"
|
android:id="@+id/search_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/home_search_games" />
|
android:hint="@string/home_search_games" />
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<com.google.android.material.search.SearchView
|
<com.google.android.material.search.SearchView
|
||||||
|
|
Loading…
Reference in a new issue