mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 06:15:38 +00:00
Android: Hook up game list long press menu
This commit is contained in:
parent
dd0ae0fc9d
commit
c5044768a8
|
@ -85,6 +85,14 @@ public class MainActivity extends AppCompatActivity {
|
|||
menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
if (id == R.id.game_list_entry_menu_start_game) {
|
||||
startEmulation(mGameList.getEntry(position).getPath(), false);
|
||||
return true;
|
||||
} else if (id == R.id.game_list_entry_menu_resume_game) {
|
||||
startEmulation(mGameList.getEntry(position).getPath(), true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,22 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/game_list_entry_menu_info"
|
||||
android:title="Show Information" />
|
||||
android:id="@+id/game_list_entry_menu_start_game"
|
||||
android:title="Start Game" />
|
||||
<item
|
||||
android:id="@+id/game_list_entry_menu_fast_boot"
|
||||
android:title="@string/settings_console_fast_boot" />
|
||||
<item
|
||||
android:id="@+id/game_list_entry_menu_slow_boot"
|
||||
android:title="Slow Boot" />
|
||||
<item
|
||||
android:id="@+id/game_list_entry_menu_load_state"
|
||||
android:title="Load State">
|
||||
<menu>
|
||||
<item android:title="Item" />
|
||||
<item android:title="Item" />
|
||||
</menu>
|
||||
</item>
|
||||
android:id="@+id/game_list_entry_menu_resume_game"
|
||||
android:title="Resume Game" />
|
||||
</menu>
|
Loading…
Reference in a new issue