Android: Add game directory list editor
This commit is contained in:
10
android/app/src/main/res/drawable/ic_baseline_delete_24.xml
Normal file
10
android/app/src/main/res/drawable/ic_baseline_delete_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z" />
|
||||
</vector>
|
||||
10
android/app/src/main/res/drawable/ic_baseline_folder_24.xml
Normal file
10
android/app/src/main/res/drawable/ic_baseline_folder_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z" />
|
||||
</vector>
|
||||
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
|
||||
tools:context=".GameDirectoriesActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<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"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".MainActivity"
|
||||
tools:showIn="@layout/activity_main">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:backgroundTint="@color/fab_background"
|
||||
app:srcCompat="@android:drawable/ic_input_add" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/path"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:text="TextView"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recursive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_below="@id/path"
|
||||
android:layout_alignParentStart="true"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:text="TextView" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/remove"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="?android:selectableItemBackground"
|
||||
app:srcCompat="@drawable/ic_baseline_delete_24" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/toggle_recursive"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_toStartOf="@id/remove"
|
||||
android:background="?android:selectableItemBackground"
|
||||
app:srcCompat="@drawable/ic_baseline_folder_24" />
|
||||
</RelativeLayout>
|
||||
@ -15,8 +15,8 @@
|
||||
</group>
|
||||
<group android:id="@+id/game_list">
|
||||
<item
|
||||
android:id="@+id/action_add_game_directory"
|
||||
android:title="@string/menu_main_add_game_directory" />
|
||||
android:id="@+id/action_edit_game_directories"
|
||||
android:title="@string/menu_main_edit_game_directories" />
|
||||
<item
|
||||
android:id="@+id/action_scan_for_new_games"
|
||||
android:title="@string/menu_main_scan_for_new_games" />
|
||||
|
||||
@ -112,7 +112,7 @@
|
||||
<string name="menu_main_resume_last_session">Resume Last Session</string>
|
||||
<string name="menu_main_start_file">Start File</string>
|
||||
<string name="menu_main_start_bios">Start BIOS</string>
|
||||
<string name="menu_main_add_game_directory">Add Game Directory</string>
|
||||
<string name="menu_main_edit_game_directories">Edit Game Directories</string>
|
||||
<string name="menu_main_scan_for_new_games">Scan For New Games</string>
|
||||
<string name="menu_main_rescan_all_games">Rescan All Games</string>
|
||||
<string name="menu_main_import_bios">Import BIOS</string>
|
||||
@ -195,4 +195,9 @@
|
||||
<string name="settings_summary_general_sync_to_host_refresh_rate">Adjusts the emulation speed so the console\'s refresh rate matches the host\'s refresh rate, when VSync and Audio Resampling is enabled. This results in the smoothest animations possible, at the cost of potentially increasing the emulation speed by less than 1%.</string>
|
||||
<string name="settings_sustained_performance_mode">Sustained Performance Mode</string>
|
||||
<string name="settings_summary_sustained_performance_mode">Enables Android\'s sustained performance mode. May result in more consistent framerates for long sessions on some devices.</string>
|
||||
<string name="title_activity_game_directories">Edit Game Directories</string>
|
||||
<string name="settings_game_directories">Game Directories</string>
|
||||
<string name="settings_summary_game_directories">Change the list of directories used to search for games.</string>
|
||||
<string name="game_directories_scanning_subdirectories">Scanning subdirectories.</string>
|
||||
<string name="game_directories_not_scanning_subdirectories">Not scanning subdirectories.</string>
|
||||
</resources>
|
||||
|
||||
@ -14,8 +14,17 @@
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Preference
|
||||
app:title="@string/settings_game_directories"
|
||||
app:summary="@string/settings_summary_game_directories"
|
||||
app:iconSpaceReserved="false">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:targetClass="com.github.stenzek.duckstation.GameDirectoriesActivity"
|
||||
android:targetPackage="com.github.stenzek.duckstation" />
|
||||
</Preference>
|
||||
<ListPreference
|
||||
app:key="Main/EmulationSpeed"
|
||||
app:title="@string/settings_emulation_speed"
|
||||
|
||||
Reference in New Issue
Block a user