From 702659713c8f05d9ca83cfa440fc8fddd97a9f7b Mon Sep 17 00:00:00 2001 From: Ishan09811 <156402647+Ishan09811@users.noreply.github.com> Date: Fri, 26 Jan 2024 17:31:28 +0530 Subject: [PATCH] SingleSelectionPreferences : fx --- .../pandroid/view/preferences/SingleSelectionPreferences.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/view/preferences/SingleSelectionPreferences.java b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/view/preferences/SingleSelectionPreferences.java index df84b7812..a4cf70f9f 100644 --- a/src/pandroid/app/src/main/java/com/panda3ds/pandroid/view/preferences/SingleSelectionPreferences.java +++ b/src/pandroid/app/src/main/java/com/panda3ds/pandroid/view/preferences/SingleSelectionPreferences.java @@ -64,6 +64,10 @@ public void onAttached() { } } + public void setSelectedItem(int index) { + onPreferenceClick(getPreference(index)); + } + @Override public boolean onPreferenceClick(@NonNull Preference preference) { int index = findPreferenceIndex(preference);