From 14d492e9285e7985fd601b708c0488241906693d Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 18 Jul 2022 18:05:29 +0930 Subject: [PATCH] Android: Some basic clean up --- Android/app/src/main/AndroidManifest.xml | 2 + .../java/emu/project64/GalleryActivity.java | 7 +- .../main/java/emu/project64/MenuListView.java | 2 +- .../java/emu/project64/game/GameActivity.java | 1 + .../java/emu/project64/game/GameOverlay.java | 2 +- .../java/emu/project64/hack/MogaHack.java | 2 +- .../input/provider/AbstractProvider.java | 2 +- .../project64/settings/ListPreference.java | 4 +- .../src/main/res/layout/gallery_activity.xml | 3 +- .../layout/simple_list_item_single_choice.xml | 14 +++ Android/app/src/main/res/menu/gallery.xml | 11 ++- .../app/src/main/res/menu/game_activity.xml | 46 +++++----- .../main/res/xml/logging_project64core.xml | 91 ++++++++++++++----- .../app/src/main/res/xml/setting_gamelist.xml | 2 +- .../src/main/res/xml/setting_touch_screen.xml | 2 +- 15 files changed, 130 insertions(+), 61 deletions(-) create mode 100644 Android/app/src/main/res/layout/simple_list_item_single_choice.xml diff --git a/Android/app/src/main/AndroidManifest.xml b/Android/app/src/main/AndroidManifest.xml index 4b4921801..bb792079d 100644 --- a/Android/app/src/main/AndroidManifest.xml +++ b/Android/app/src/main/AndroidManifest.xml @@ -6,6 +6,8 @@ + + (getContext(), android.R.layout.simple_list_item_single_choice,mEntriesString); + ListAdapter adapter = new ArrayAdapter(getContext(), R.layout.simple_list_item_single_choice,mEntriesString); ListOptions.setAdapter(adapter); ListOptions.setChoiceMode(ListView.CHOICE_MODE_SINGLE); ListOptions.setItemChecked(mValueIndex,true); @@ -84,7 +84,7 @@ public class ListPreference extends Preference { private void updateSummary() { - if (mValueIndex < 0) + if (mValueIndex < 0 && mValueIndex < mEntries.length) { return; } diff --git a/Android/app/src/main/res/layout/gallery_activity.xml b/Android/app/src/main/res/layout/gallery_activity.xml index b0cbeae4e..c1786e38b 100644 --- a/Android/app/src/main/res/layout/gallery_activity.xml +++ b/Android/app/src/main/res/layout/gallery_activity.xml @@ -3,7 +3,8 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent" > + android:layout_height="match_parent" + android:orientation="vertical" > + \ No newline at end of file diff --git a/Android/app/src/main/res/menu/gallery.xml b/Android/app/src/main/res/menu/gallery.xml index 635c214c1..1960261bc 100644 --- a/Android/app/src/main/res/menu/gallery.xml +++ b/Android/app/src/main/res/menu/gallery.xml @@ -6,14 +6,17 @@ android:id="@+id/menuItem_GameDir" android:icon="@drawable/ic_folder" app:showAsAction="ifRoom|collapseActionView" - /> + android:title="Game Dir" /> + android:icon="@drawable/ic_settings" + android:title="Settings" /> + android:icon="@drawable/ic_discord" + android:title="Discord" /> + android:icon="@drawable/ic_about" + android:title="About" /> \ No newline at end of file diff --git a/Android/app/src/main/res/menu/game_activity.xml b/Android/app/src/main/res/menu/game_activity.xml index a5e1eb278..89c941890 100644 --- a/Android/app/src/main/res/menu/game_activity.xml +++ b/Android/app/src/main/res/menu/game_activity.xml @@ -1,35 +1,35 @@ - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - + + - - - - + + + + \ No newline at end of file diff --git a/Android/app/src/main/res/xml/logging_project64core.xml b/Android/app/src/main/res/xml/logging_project64core.xml index 1d40df02c..2b1140b73 100644 --- a/Android/app/src/main/res/xml/logging_project64core.xml +++ b/Android/app/src/main/res/xml/logging_project64core.xml @@ -1,69 +1,114 @@ - - + - - - - - - - - - - - - - - - - - - - - - diff --git a/Android/app/src/main/res/xml/setting_gamelist.xml b/Android/app/src/main/res/xml/setting_gamelist.xml index 5afbfd03c..ed86dbcc2 100644 --- a/Android/app/src/main/res/xml/setting_gamelist.xml +++ b/Android/app/src/main/res/xml/setting_gamelist.xml @@ -1,6 +1,6 @@