diff options
| author | 2023-04-28 19:04:31 -0400 | |
|---|---|---|
| committer | 2023-06-03 00:05:55 -0700 | |
| commit | 71667e4d6d8dcdb7bf52b9b0dcafec21f4bda98b (patch) | |
| tree | 4a18b9ec7562c8d61c84dd9e0bc5955f76ef0a98 /src/android | |
| parent | android: Update app icon (diff) | |
| download | yuzu-71667e4d6d8dcdb7bf52b9b0dcafec21f4bda98b.tar.gz yuzu-71667e4d6d8dcdb7bf52b9b0dcafec21f4bda98b.tar.xz yuzu-71667e4d6d8dcdb7bf52b9b0dcafec21f4bda98b.zip | |
android: Allow search bar to scroll offscreen
Diffstat (limited to 'src/android')
3 files changed, 8 insertions, 15 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt index 5c58dd255..3ca529b20 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt | |||
| @@ -125,6 +125,7 @@ class GamesFragment : Fragment() { | |||
| 125 | TransitionState.HIDING -> { | 125 | TransitionState.HIDING -> { |
| 126 | gamesViewModel.setSearchedGames(emptyList()) | 126 | gamesViewModel.setSearchedGames(emptyList()) |
| 127 | searchHidden() | 127 | searchHidden() |
| 128 | binding.appBarSearch.setExpanded(true) | ||
| 128 | } | 129 | } |
| 129 | } | 130 | } |
| 130 | } | 131 | } |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt index a33469644..e8284471a 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt | |||
| @@ -75,11 +75,9 @@ class MainActivity : AppCompatActivity(), ThemeProvider { | |||
| 75 | setUpNavigation(navHostFragment.navController) | 75 | setUpNavigation(navHostFragment.navController) |
| 76 | 76 | ||
| 77 | binding.statusBarShade.setBackgroundColor( | 77 | binding.statusBarShade.setBackgroundColor( |
| 78 | ThemeHelper.getColorWithOpacity( | 78 | MaterialColors.getColor( |
| 79 | MaterialColors.getColor( | 79 | binding.root, |
| 80 | binding.root, | 80 | R.attr.colorSurface |
| 81 | R.attr.colorSurface | ||
| 82 | ), ThemeHelper.SYSTEM_BAR_ALPHA | ||
| 83 | ) | 81 | ) |
| 84 | ) | 82 | ) |
| 85 | 83 | ||
diff --git a/src/android/app/src/main/res/layout/fragment_games.xml b/src/android/app/src/main/res/layout/fragment_games.xml index 5cfe76de3..c4c3eacf4 100644 --- a/src/android/app/src/main/res/layout/fragment_games.xml +++ b/src/android/app/src/main/res/layout/fragment_games.xml | |||
| @@ -44,20 +44,14 @@ | |||
| 44 | android:id="@+id/app_bar_search" | 44 | android:id="@+id/app_bar_search" |
| 45 | android:layout_width="match_parent" | 45 | android:layout_width="match_parent" |
| 46 | android:layout_height="wrap_content" | 46 | android:layout_height="wrap_content" |
| 47 | android:fitsSystemWindows="true" | ||
| 47 | app:liftOnScrollTargetViewId="@id/grid_games"> | 48 | app:liftOnScrollTargetViewId="@id/grid_games"> |
| 48 | 49 | ||
| 49 | <FrameLayout | 50 | <com.google.android.material.search.SearchBar |
| 51 | android:id="@+id/search_bar" | ||
| 50 | android:layout_width="match_parent" | 52 | android:layout_width="match_parent" |
| 51 | android:layout_height="wrap_content" | 53 | android:layout_height="wrap_content" |
| 52 | android:fitsSystemWindows="true"> | 54 | android:hint="@string/home_search_games" /> |
| 53 | |||
| 54 | <com.google.android.material.search.SearchBar | ||
| 55 | android:id="@+id/search_bar" | ||
| 56 | android:layout_width="match_parent" | ||
| 57 | android:layout_height="wrap_content" | ||
| 58 | android:hint="@string/home_search_games" /> | ||
| 59 | |||
| 60 | </FrameLayout> | ||
| 61 | 55 | ||
| 62 | </com.google.android.material.appbar.AppBarLayout> | 56 | </com.google.android.material.appbar.AppBarLayout> |
| 63 | 57 | ||