diff options
Diffstat (limited to 'src/android/app/src/main/res')
7 files changed, 208 insertions, 1 deletions
diff --git a/src/android/app/src/main/res/layout/card_folder.xml b/src/android/app/src/main/res/layout/card_folder.xml new file mode 100644 index 000000000..4e0c04b6b --- /dev/null +++ b/src/android/app/src/main/res/layout/card_folder.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<com.google.android.material.card.MaterialCardView 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" + style="?attr/materialCardViewOutlinedStyle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginHorizontal="16dp" + android:layout_marginVertical="12dp" + android:focusable="true"> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:padding="16dp" + android:layout_gravity="center_vertical" + android:animateLayoutChanges="true"> + + <com.google.android.material.textview.MaterialTextView + android:id="@+id/path" + style="@style/TextAppearance.Material3.BodyLarge" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical|start" + android:ellipsize="none" + android:marqueeRepeatLimit="marquee_forever" + android:requiresFadingEdge="horizontal" + android:singleLine="true" + android:textAlignment="viewStart" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/button_layout" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:text="@string/select_gpu_driver_default" /> + + <LinearLayout + android:id="@+id/button_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <Button + android:id="@+id/button_edit" + style="@style/Widget.Material3.Button.IconButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@string/delete" + android:tooltipText="@string/edit" + app:icon="@drawable/ic_edit" + app:iconTint="?attr/colorControlNormal" /> + + <Button + android:id="@+id/button_delete" + style="@style/Widget.Material3.Button.IconButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@string/delete" + android:tooltipText="@string/delete" + app:icon="@drawable/ic_delete" + app:iconTint="?attr/colorControlNormal" /> + + </LinearLayout> + + </androidx.constraintlayout.widget.ConstraintLayout> + +</com.google.android.material.card.MaterialCardView> diff --git a/src/android/app/src/main/res/layout/dialog_add_folder.xml b/src/android/app/src/main/res/layout/dialog_add_folder.xml new file mode 100644 index 000000000..01f95e868 --- /dev/null +++ b/src/android/app/src/main/res/layout/dialog_add_folder.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="24dp" + android:orientation="vertical"> + + <com.google.android.material.textview.MaterialTextView + android:id="@+id/path" + style="@style/TextAppearance.Material3.BodyLarge" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_gravity="center_vertical|start" + android:layout_weight="1" + android:ellipsize="marquee" + android:marqueeRepeatLimit="marquee_forever" + android:requiresFadingEdge="horizontal" + android:singleLine="true" + android:textAlignment="viewStart" + tools:text="folder/folder/folder/folder" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:paddingTop="8dp"> + + <com.google.android.material.textview.MaterialTextView + style="@style/TextAppearance.Material3.BodyMedium" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical|start" + android:layout_weight="1" + android:text="@string/deep_scan" + android:textAlignment="viewStart" /> + + <com.google.android.material.checkbox.MaterialCheckBox + android:id="@+id/deep_scan_switch" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + </LinearLayout> + +</LinearLayout> diff --git a/src/android/app/src/main/res/layout/dialog_folder_properties.xml b/src/android/app/src/main/res/layout/dialog_folder_properties.xml new file mode 100644 index 000000000..248d048cb --- /dev/null +++ b/src/android/app/src/main/res/layout/dialog_folder_properties.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="24dp" + android:orientation="vertical"> + + <LinearLayout + android:id="@+id/deep_scan_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <com.google.android.material.textview.MaterialTextView + style="@style/TextAppearance.Material3.BodyMedium" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical|start" + android:layout_weight="1" + android:text="@string/deep_scan" + android:textAlignment="viewStart" /> + + <com.google.android.material.checkbox.MaterialCheckBox + android:id="@+id/deep_scan_switch" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + </LinearLayout> + +</LinearLayout> diff --git a/src/android/app/src/main/res/layout/fragment_folders.xml b/src/android/app/src/main/res/layout/fragment_folders.xml new file mode 100644 index 000000000..74f2f3754 --- /dev/null +++ b/src/android/app/src/main/res/layout/fragment_folders.xml @@ -0,0 +1,48 @@ +<?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" + android:id="@+id/coordinator_folders" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?attr/colorSurface"> + + <androidx.coordinatorlayout.widget.CoordinatorLayout + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar_folders" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:fitsSystemWindows="true" + app:liftOnScrollTargetViewId="@id/list_folders"> + + <com.google.android.material.appbar.MaterialToolbar + android:id="@+id/toolbar_folders" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + app:navigationIcon="@drawable/ic_back" + app:title="@string/game_folders" /> + + </com.google.android.material.appbar.AppBarLayout> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/list_folders" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:clipToPadding="false" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> + + </androidx.coordinatorlayout.widget.CoordinatorLayout> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/button_add" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="bottom|end" + android:contentDescription="@string/add_games" + app:srcCompat="@drawable/ic_add" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> + +</androidx.constraintlayout.widget.ConstraintLayout> 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 6d4c1f86d..cf70b4bc4 100644 --- a/src/android/app/src/main/res/navigation/home_navigation.xml +++ b/src/android/app/src/main/res/navigation/home_navigation.xml @@ -28,6 +28,9 @@ <action android:id="@+id/action_homeSettingsFragment_to_appletLauncherFragment" app:destination="@id/appletLauncherFragment" /> + <action + android:id="@+id/action_homeSettingsFragment_to_gameFoldersFragment" + app:destination="@id/gameFoldersFragment" /> </fragment> <fragment @@ -117,5 +120,9 @@ android:id="@+id/cabinetLauncherDialogFragment" android:name="org.yuzu.yuzu_emu.fragments.CabinetLauncherDialogFragment" android:label="CabinetLauncherDialogFragment" /> + <fragment + android:id="@+id/gameFoldersFragment" + android:name="org.yuzu.yuzu_emu.fragments.GameFoldersFragment" + android:label="GameFoldersFragment" /> </navigation> diff --git a/src/android/app/src/main/res/values/dimens.xml b/src/android/app/src/main/res/values/dimens.xml index ef855ea6f..380d14213 100644 --- a/src/android/app/src/main/res/values/dimens.xml +++ b/src/android/app/src/main/res/values/dimens.xml @@ -13,7 +13,7 @@ <dimen name="menu_width">256dp</dimen> <dimen name="card_width">165dp</dimen> <dimen name="icon_inset">24dp</dimen> - <dimen name="spacing_bottom_list_fab">72dp</dimen> + <dimen name="spacing_bottom_list_fab">76dp</dimen> <dimen name="spacing_fab">24dp</dimen> <dimen name="dialog_margin">20dp</dimen> diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 471af8795..fa9b153b6 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -38,6 +38,7 @@ <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="manage_game_folders">Manage game folders</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> <string name="add_games_warning_description">Games won\'t be displayed in the Games list if a folder isn\'t selected.</string> @@ -124,6 +125,11 @@ <string name="manage_yuzu_data_description">Import/export firmware, keys, user data, and more!</string> <string name="share_save_file">Share save file</string> <string name="export_save_failed">Failed to export save</string> + <string name="game_folders">Game folders</string> + <string name="deep_scan">Deep scan</string> + <string name="add_game_folder">Add game folder</string> + <string name="folder_already_added">This folder was already added!</string> + <string name="game_folder_properties">Game folder properties</string> <!-- Applet launcher strings --> <string name="applets">Applet launcher</string> @@ -257,6 +263,7 @@ <string name="cancelling">Cancelling</string> <string name="install">Install</string> <string name="delete">Delete</string> + <string name="edit">Edit</string> <string name="export_success">Exported successfully</string> <!-- GPU driver installation --> |