Commit Graph

13 Commits

Author SHA1 Message Date
Lioncash 0300d7d840 DetectCoreDirectoryFragment: Fix indentation
Also make a class function private.
2014-11-06 10:24:55 -05:00
Lioncash 0bb3999e18 Android: Use apply instead of commit for applying SharedPreference changes
This will apply changes asynchronously, so it gets rid of some blocking IO.
It probably doesn't matter, but is considered good practice.
2014-11-06 09:45:22 -05:00
Lioncash 01789459d6 Android: Fix Javadoc references 2014-11-06 09:34:02 -05:00
twinaphex 272002310d Rename more references to 'roms' 2014-07-28 20:01:27 +02:00
twinaphex d6486df835 (Android frontend) Refactor RetroActivity launching 2014-06-13 05:48:13 +02:00
twinaphex 94cd38f628 (Android) Sets default savedir/savestate/system directory paths now to internal sandboxed
app dir (Android 4.4.2 and so on no longer allow writing to SD card)
2014-06-13 03:52:17 +02:00
Daehan Kim 962ee80909 Fixed zipFile resource leaking. 2014-01-07 02:41:50 -08:00
twinaphex c49985ce90 (Android) Build fix 2014-01-07 10:01:08 +01:00
Bezier89 f274a409c7 Allow auto detect core to work with mixed case extensions and zip files. 2014-01-05 12:50:38 -08:00
Lioncash 77fbe67dbe [Android] Fix a bug in the DetectCoreDirectoryFragment.
Would crash if an unsupported file was tapped twice because it would set the inFileBrowser boolean to false, thus leading to the attempt to launch said unsupported file. Fixes this.

Also made it display a brief toast if no cores support the extension of the file.
2013-12-20 12:47:39 -05:00
Lioncash 54d0911868 [Android] Implement core autodetect. 2013-12-18 20:00:20 -05:00
Lioncash 089d1a7c50 [Android] More documentation of DirectoryFragment. 2013-11-17 16:22:40 -05:00
Lioncash 114cf4e926 [Android] Initial huge underlying UI update:
- The UI is now mostly Fragment-centric (finally!)
- The Load Core, Load Game, Load Game (History) are now DialogFragments.
- The directory activities are killed off and consolidated into one fragment named DirectoryFragment.

DirectoryFragment is now a self-contained instantiable DirectoryFragment that can be instantiated anywhere by doing roughly the following.

DirectorFragment dFrag = DirectoryFragment.newInstance(/* Resource ID for a string title here*/);
dFrag.show(getFragmentManager(), "tag");

There are also other methods that were modified within the DirectoryFragment, such as addAllowedExt and disAllowedExt being changed to support a variable amount of arguments. This way, multiple calls of the same function aren't necessary in the case of adding multiple extensions, as well as supporting the case where only one extension is added.

DirectoryFragment also has a new interface added to it called OnDirectoryFragmentClosedListener. Say you have a DirectoryFragment instance, but want to use the selected item's path for something *after* the dialog has closed, with this interface, it is now possible. Just implement this interface within an Activity or Fragment, and then set the DirectoryFragment to use the listener through setOnDirectoryFragmentClosedListener() method.

Now what happens if this isn't set, wouldn't it be pointless to even use a DirectoryFragment in this case?
Not necessarily. What if you only wanted to save the selected item into the applications SharedPreferences?
This is a situation where it would be unnecessary to need that interface. So, to make a DirectoryFragment.java for the sole purpose of saving a selected directory/file path to the SharedPreferences, you would do this:

DirectoryFragment dFrag = DirectoryFragment.newInstance(/* Resource ID to a string title here*/);
dFrag.setPathSettingKey("key to store value in SharedPreferences at");
dFrag.show(getFragmentManager(), "tag");

Outside of these major changes, large portions of the code outside of this were simplified.
2013-11-17 02:37:33 -05:00