- 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.
If a number formatting problem occurred, [type object].parse[type]() methods would throw a NumberFormatException.
Also fixed a slight typo in CoreManagerActivity.
This is pretty pointless at the moment actually.
This reverts commit bfdc1e0e60.
- Keeps some modifications to the MainMenuActivity. Most notably the title string retains itself upon orientation changes.
- Also fix some bugs in the PreferenceListFragment. Most notably, the handler message not being removed.
- Added JavaDoc to ModuleWrapper and ConfigFile as well.
- Did some tiny simplifications with ConfigFile.java
- Handle the IOExceptions with the parameterized constructor. The only reason this could fail is fail is if the InputStream suddenly closed for an arbitrary reason.