Android: Reorder options in main menu

This commit is contained in:
Connor McLaughlin 2021-02-27 14:30:32 +10:00
parent e53ec0cc73
commit d0ace6ed5a
2 changed files with 19 additions and 21 deletions

View file

@ -205,9 +205,7 @@ public class MainActivity extends AppCompatActivity {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_resume) {
startEmulation(null, true);
} else if (id == R.id.action_start_bios) {
if (id == R.id.action_start_bios) {
startEmulation(null, false);
} else if (id == R.id.action_start_file) {
startStartFile();

View file

@ -3,9 +3,6 @@
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.github.stenzek.duckstation.MainActivity">
<group android:id="@+id/start_menu">
<item
android:id="@+id/action_resume"
android:title="@string/menu_main_resume_last_session" />
<item
android:id="@+id/action_start_file"
android:title="@string/menu_main_start_file" />
@ -13,19 +10,33 @@
android:id="@+id/action_start_bios"
android:title="@string/menu_main_start_bios" />
</group>
<group android:id="@+id/game_list">
<group android:id="@+id/settings">
<item
android:id="@+id/action_settings"
android:icon="@drawable/ic_baseline_settings_24"
android:orderInCategory="100"
android:title="@string/action_settings"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_controller_mapping"
android:icon="@drawable/ic_baseline_gamepad_24"
android:title="@string/action_controller_mapping" />
<item
android:id="@+id/action_edit_game_directories"
android:title="@string/menu_main_edit_game_directories" />
<item
android:id="@+id/action_import_bios"
android:title="@string/menu_main_import_bios" />
</group>
<group android:id="@+id/game_list">
<item
android:id="@+id/action_scan_for_new_games"
android:title="@string/menu_main_scan_for_new_games" />
<item
android:id="@+id/action_rescan_all_games"
android:title="@string/menu_main_rescan_all_games" />
<item
android:id="@+id/action_import_bios"
android:title="@string/menu_main_import_bios" />
</group>
<group android:id="@+id/support">
<item
android:id="@+id/action_show_version"
android:title="@string/menu_main_show_version" />
@ -36,15 +47,4 @@
android:id="@+id/action_discord_server"
android:title="@string/menu_main_discord_server" />
</group>
<item
android:id="@+id/action_controller_mapping"
android:icon="@drawable/ic_baseline_gamepad_24"
android:orderInCategory="100"
android:title="@string/action_controller_mapping" />
<item
android:id="@+id/action_settings"
android:icon="@drawable/ic_baseline_settings_24"
android:orderInCategory="100"
android:title="@string/action_settings"
app:showAsAction="ifRoom" />
</menu>