diff --git a/shell/android/AndroidManifest.xml b/shell/android/AndroidManifest.xml index e099d94e2..678137097 100644 --- a/shell/android/AndroidManifest.xml +++ b/shell/android/AndroidManifest.xml @@ -39,9 +39,7 @@ + android:theme="@style/AppTheme" > diff --git a/shell/android/src/com/reicast/emulator/config/OptionsFragment.java b/shell/android/src/com/reicast/emulator/config/OptionsFragment.java index 3860db077..e731fd0d6 100644 --- a/shell/android/src/com/reicast/emulator/config/OptionsFragment.java +++ b/shell/android/src/com/reicast/emulator/config/OptionsFragment.java @@ -552,17 +552,18 @@ public class OptionsFragment extends Fragment { i++; } FileUtils fileUtils = new FileUtils(); - Collection files = fileUtils.listFiles(storage, filter, 1); + Collection files = fileUtils.listFiles(storage, filter, 0); return (List) files; } @Override protected void onPostExecute(List items) { if (items != null && !items.isEmpty()) { - String[] themes = new String[items.size()]; + String[] themes = new String[items.size() + 1]; for (int i = 0; i < items.size(); i ++) { themes[i] = items.get(i).getName(); } + themes[items.size()] = "None"; ArrayAdapter themeAdapter = new ArrayAdapter( getActivity(), android.R.layout.simple_spinner_item, themes); themeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); @@ -571,8 +572,12 @@ public class OptionsFragment extends Fragment { @Override public void onItemSelected(AdapterView parentView, View selectedItemView, int position, long id) { String theme = String.valueOf(parentView.getItemAtPosition(position)); - String theme_path = home_directory + "/themes/" + theme; - mPrefs.edit().putString(Config.pref_theme, theme_path).commit(); + if (theme.equals("None")) { + mPrefs.edit().remove(Config.pref_theme).commit(); + } else { + String theme_path = home_directory + "/themes/" + theme; + mPrefs.edit().putString(Config.pref_theme, theme_path).commit(); + } } @Override public void onNothingSelected(AdapterView parentView) {