summaryrefslogtreecommitdiffstats
path: root/src/android/app/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/app/src/main/res')
-rw-r--r--src/android/app/src/main/res/drawable/ic_clear.xml9
-rw-r--r--src/android/app/src/main/res/drawable/ic_search.xml9
-rw-r--r--src/android/app/src/main/res/layout/activity_main.xml1
-rw-r--r--src/android/app/src/main/res/layout/fragment_games.xml74
-rw-r--r--src/android/app/src/main/res/layout/fragment_search.xml180
-rw-r--r--src/android/app/src/main/res/menu/menu_navigation.xml5
-rw-r--r--src/android/app/src/main/res/navigation/home_navigation.xml5
-rw-r--r--src/android/app/src/main/res/values/dimens.xml7
-rw-r--r--src/android/app/src/main/res/values/strings.xml9
9 files changed, 236 insertions, 63 deletions
diff --git a/src/android/app/src/main/res/drawable/ic_clear.xml b/src/android/app/src/main/res/drawable/ic_clear.xml
new file mode 100644
index 000000000..b6edb1d32
--- /dev/null
+++ b/src/android/app/src/main/res/drawable/ic_clear.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="?attr/colorControlNormal"
+ android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" />
+</vector>
diff --git a/src/android/app/src/main/res/drawable/ic_search.xml b/src/android/app/src/main/res/drawable/ic_search.xml
new file mode 100644
index 000000000..bb0726851
--- /dev/null
+++ b/src/android/app/src/main/res/drawable/ic_search.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="?attr/colorControlNormal"
+ 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/src/android/app/src/main/res/layout/activity_main.xml b/src/android/app/src/main/res/layout/activity_main.xml
index 59812ab8e..6ca426b54 100644
--- a/src/android/app/src/main/res/layout/activity_main.xml
+++ b/src/android/app/src/main/res/layout/activity_main.xml
@@ -29,6 +29,7 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/menu_navigation"
+ app:labelVisibilityMode="selected"
tools:visibility="visible" />
<View
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 c4c3eacf4..8b6d0b3b6 100644
--- a/src/android/app/src/main/res/layout/fragment_games.xml
+++ b/src/android/app/src/main/res/layout/fragment_games.xml
@@ -1,74 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.coordinatorlayout.widget.CoordinatorLayout
+<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/coordinator_main"
+ android:id="@+id/swipe_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?attr/colorSurface">
+ android:background="?attr/colorSurface"
+ android:clipToPadding="false">
- <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
- android:id="@+id/swipe_refresh"
+ <RelativeLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:clipToPadding="false"
- app:layout_behavior="@string/searchbar_scrolling_view_behavior">
+ android:layout_height="match_parent">
- <RelativeLayout
+ <com.google.android.material.textview.MaterialTextView
+ android:id="@+id/notice_text"
+ style="@style/TextAppearance.Material3.BodyLarge"
android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <com.google.android.material.textview.MaterialTextView
- android:id="@+id/notice_text"
- style="@style/TextAppearance.Material3.BodyLarge"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:padding="@dimen/spacing_large"
- android:text="@string/empty_gamelist"
- tools:visibility="gone" />
-
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/grid_games"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:clipToPadding="false"
- tools:listitem="@layout/card_game" />
-
- </RelativeLayout>
-
- </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
-
- <com.google.android.material.appbar.AppBarLayout
- android:id="@+id/app_bar_search"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:fitsSystemWindows="true"
- app:liftOnScrollTargetViewId="@id/grid_games">
-
- <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" />
-
- </com.google.android.material.appbar.AppBarLayout>
-
- <com.google.android.material.search.SearchView
- android:id="@+id/search_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:hint="@string/home_search_games"
- app:layout_anchor="@id/search_bar">
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:padding="@dimen/spacing_large"
+ android:text="@string/empty_gamelist"
+ tools:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView
- android:id="@+id/grid_search"
+ android:id="@+id/grid_games"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
tools:listitem="@layout/card_game" />
- </com.google.android.material.search.SearchView>
+ </RelativeLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
+</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
diff --git a/src/android/app/src/main/res/layout/fragment_search.xml b/src/android/app/src/main/res/layout/fragment_search.xml
new file mode 100644
index 000000000..3b1aefdfb
--- /dev/null
+++ b/src/android/app/src/main/res/layout/fragment_search.xml
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="?attr/colorSurface">
+
+ <RelativeLayout
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/divider">
+
+ <LinearLayout
+ android:id="@+id/no_results_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:gravity="center">
+
+ <ImageView
+ android:id="@+id/icon_no_results"
+ android:layout_width="match_parent"
+ android:layout_height="80dp"
+ android:src="@drawable/ic_search" />
+
+ <com.google.android.material.textview.MaterialTextView
+ android:id="@+id/notice_text"
+ style="@style/TextAppearance.Material3.TitleLarge"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:paddingTop="8dp"
+ android:text="@string/search_and_filter_games"
+ tools:visibility="visible" />
+
+ </LinearLayout>
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/grid_games_search"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:clipToPadding="false" />
+
+ </RelativeLayout>
+
+ <FrameLayout
+ android:id="@+id/frame_search"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="20dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
+
+ <com.google.android.material.card.MaterialCardView
+ android:id="@+id/search_background"
+ style="?attr/materialCardViewFilledStyle"
+ android:layout_width="match_parent"
+ android:layout_height="56dp"
+ app:cardCornerRadius="28dp">
+
+ <LinearLayout
+ android:id="@+id/search_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginStart="24dp"
+ android:layout_marginEnd="56dp"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:layout_width="28dp"
+ android:layout_height="28dp"
+ android:layout_gravity="center_vertical"
+ android:layout_marginEnd="24dp"
+ android:src="@drawable/ic_search"
+ app:tint="?attr/colorOnSurfaceVariant" />
+
+ <EditText
+ android:id="@+id/search_text"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@android:color/transparent"
+ android:hint="@string/home_search_games"
+ android:inputType="text"
+ android:maxLines="1"
+ android:imeOptions="flagNoFullscreen" />
+
+ </LinearLayout>
+
+ <ImageView
+ android:id="@+id/clear_button"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center_vertical|end"
+ android:layout_marginEnd="24dp"
+ android:background="?attr/selectableItemBackground"
+ android:src="@drawable/ic_clear"
+ android:visibility="invisible"
+ app:tint="?attr/colorOnSurfaceVariant"
+ tools:visibility="visible" />
+
+ </com.google.android.material.card.MaterialCardView>
+
+ </FrameLayout>
+
+ <HorizontalScrollView
+ android:id="@+id/horizontalScrollView"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:fadingEdge="horizontal"
+ android:scrollbars="none"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/frame_search">
+
+ <com.google.android.material.chip.ChipGroup
+ android:id="@+id/chip_group"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clipToPadding="false"
+ android:paddingVertical="4dp"
+ app:chipSpacingHorizontal="12dp"
+ app:singleLine="true"
+ app:singleSelection="true">
+
+ <com.google.android.material.chip.Chip
+ android:id="@+id/chip_recently_played"
+ style="@style/Widget.Material3.Chip.Suggestion.Elevated"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:checked="false"
+ android:text="@string/search_recently_played"
+ app:chipCornerRadius="28dp" />
+
+ <com.google.android.material.chip.Chip
+ android:id="@+id/chip_recently_added"
+ style="@style/Widget.Material3.Chip.Suggestion.Elevated"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:checked="false"
+ android:text="@string/search_recently_added"
+ app:chipCornerRadius="28dp" />
+
+ <com.google.android.material.chip.Chip
+ android:id="@+id/chip_retail"
+ style="@style/Widget.Material3.Chip.Suggestion.Elevated"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:checked="false"
+ android:text="@string/search_retail"
+ app:chipCornerRadius="28dp" />
+
+ <com.google.android.material.chip.Chip
+ android:id="@+id/chip_homebrew"
+ style="@style/Widget.Material3.Chip.Suggestion.Elevated"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:checked="false"
+ android:text="@string/search_homebrew"
+ app:chipCornerRadius="28dp" />
+
+ </com.google.android.material.chip.ChipGroup>
+
+ </HorizontalScrollView>
+
+ <com.google.android.material.divider.MaterialDivider
+ android:id="@+id/divider"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginHorizontal="20dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/horizontalScrollView" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/src/android/app/src/main/res/menu/menu_navigation.xml b/src/android/app/src/main/res/menu/menu_navigation.xml
index e46133604..ed10e6e51 100644
--- a/src/android/app/src/main/res/menu/menu_navigation.xml
+++ b/src/android/app/src/main/res/menu/menu_navigation.xml
@@ -7,6 +7,11 @@
android:title="@string/home_games" />
<item
+ android:id="@+id/searchFragment"
+ android:icon="@drawable/ic_search"
+ android:title="@string/home_search" />
+
+ <item
android:id="@+id/homeSettingsFragment"
android:icon="@drawable/ic_settings"
android:title="@string/home_settings" />
diff --git a/src/android/app/src/main/res/navigation/home_navigation.xml b/src/android/app/src/main/res/navigation/home_navigation.xml
index d500d165b..0f43ba556 100644
--- a/src/android/app/src/main/res/navigation/home_navigation.xml
+++ b/src/android/app/src/main/res/navigation/home_navigation.xml
@@ -25,4 +25,9 @@
app:popUpToInclusive="true" />
</fragment>
+ <fragment
+ android:id="@+id/searchFragment"
+ android:name="org.yuzu.yuzu_emu.fragments.SearchFragment"
+ android:label="SearchFragment" />
+
</navigation>
diff --git a/src/android/app/src/main/res/values/dimens.xml b/src/android/app/src/main/res/values/dimens.xml
index ab2583938..28a6d25cf 100644
--- a/src/android/app/src/main/res/values/dimens.xml
+++ b/src/android/app/src/main/res/values/dimens.xml
@@ -5,11 +5,10 @@
<dimen name="spacing_large">16dp</dimen>
<dimen name="spacing_xtralarge">32dp</dimen>
<dimen name="spacing_list">64dp</dimen>
+ <dimen name="spacing_chip">20dp</dimen>
<dimen name="spacing_navigation">80dp</dimen>
- <dimen name="spacing_search">88dp</dimen>
- <dimen name="spacing_refresh_slingshot">80dp</dimen>
- <dimen name="spacing_refresh_start">32dp</dimen>
- <dimen name="spacing_refresh_end">96dp</dimen>
+ <dimen name="spacing_search">128dp</dimen>
+ <dimen name="spacing_refresh_end">72dp</dimen>
<dimen name="menu_width">256dp</dimen>
<dimen name="card_width">165dp</dimen>
diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml
index c55b9e06b..9c7ab3c26 100644
--- a/src/android/app/src/main/res/values/strings.xml
+++ b/src/android/app/src/main/res/values/strings.xml
@@ -32,7 +32,10 @@
<!-- Home strings -->
<string name="home_games">Games</string>
+ <string name="home_search">Search</string>
<string name="home_settings">Settings</string>
+ <string name="empty_gamelist">No files were found or no game directory has been selected yet.</string>
+ <string name="search_and_filter_games">Search and filter games</string>
<string name="select_games_folder">Select games folder</string>
<string name="select_games_folder_description">Allows yuzu to populate the games list</string>
<string name="add_games_warning">Skip selecting games folder?</string>
@@ -58,6 +61,10 @@
<string name="install_gpu_driver_description">Install alternative drivers for potentially better performance or accuracy</string>
<string name="advanced_settings">Advanced settings</string>
<string name="settings_description">Configure emulator settings</string>
+ <string name="search_recently_played">Recently Played</string>
+ <string name="search_recently_added">Recently Added</string>
+ <string name="search_retail">Retail</string>
+ <string name="search_homebrew">Homebrew</string>
<string name="open_user_folder">Open yuzu folder</string>
<string name="open_user_folder_description">Manage yuzu\'s internal files</string>
<string name="no_file_manager">No file manager found</string>
@@ -151,8 +158,6 @@
<string name="load_settings">Loading Settings…</string>
- <string name="empty_gamelist">No files were found or no game directory has been selected yet.</string>
-
<!-- Software keyboard -->
<string name="software_keyboard">Software Keyboard</string>