[Android] Put the directory activities into a separate package to keep them separate from the rest of the files. Do the same for preference classes as well.

This commit is contained in:
Lioncash 2013-10-08 19:50:23 -04:00
parent f1b6f95c40
commit 547219c244
18 changed files with 112 additions and 104 deletions

View File

@ -25,21 +25,21 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".browser.ReportIME"></activity>
<activity android:name=".browser.IMEActivity"></activity>
<activity android:name=".browser.HelpActivity"></activity>
<activity android:name=".browser.FileWrapper"></activity>
<activity android:name=".browser.DirectoryActivity"></activity>
<activity android:name=".browser.ROMActivity"></activity>
<activity android:name=".browser.RetroTVMode"></activity>
<activity android:name=".browser.ShaderActivity"></activity>
<activity android:name=".browser.OverlayActivity"></activity>
<activity android:name=".browser.ROMDirActivity"></activity>
<activity android:name=".browser.SRMDirActivity"></activity>
<activity android:name=".browser.StateDirActivity"></activity>
<activity android:name=".browser.SystemDirActivity"></activity>
<activity android:name=".browser.ReportIME"/>
<activity android:name=".browser.IMEActivity"/>
<activity android:name=".browser.HelpActivity"/>
<activity android:name=".browser.FileWrapper"/>
<activity android:name=".browser.RetroTVMode"/>
<activity android:name=".browser.diractivities.DirectoryActivity"/>
<activity android:name=".browser.diractivities.ROMActivity"/>
<activity android:name=".browser.diractivities.ROMDirActivity"/>
<activity android:name=".browser.diractivities.ShaderActivity"/>
<activity android:name=".browser.diractivities.OverlayActivity"/>
<activity android:name=".browser.diractivities.SRMDirActivity"/>
<activity android:name=".browser.diractivities.StateDirActivity"/>
<activity android:name=".browser.diractivities.SystemDirActivity"/>
<activity android:name=".browser.RetroActivity" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<meta-data android:name="android.app.lib_name" android:value="retroarch-activity" />
<meta-data android:name="android.app.func_name" android:value="ANativeActivity_onCreate" />

View File

@ -14,7 +14,7 @@
</PreferenceScreen>
<PreferenceScreen android:title="@string/load_game">
<intent
android:targetClass="org.retroarch.browser.ROMActivity"
android:targetClass="org.retroarch.browser.diractivities.ROMActivity"
android:targetPackage="org.retroarch" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/load_game_history">
@ -91,7 +91,7 @@
android:title="@string/glsl_shader"
android:dependency="video_shader_enable" >
<intent
android:targetClass="org.retroarch.browser.ShaderActivity"
android:targetClass="org.retroarch.browser.diractivities.ShaderActivity"
android:targetPackage="org.retroarch" />
</Preference>
</PreferenceCategory>
@ -206,10 +206,10 @@
android:title="@string/input_overlay"
android:dependency="input_overlay_enable" >
<intent
android:targetClass="org.retroarch.browser.OverlayActivity"
android:targetClass="org.retroarch.browser.diractivities.OverlayActivity"
android:targetPackage="org.retroarch" />
</Preference>
<org.retroarch.browser.SeekbarPreference
<org.retroarch.browser.preferences.SeekbarPreference
android:summary="@string/overlay_opacity_desc"
android:title="@string/overlay_opacity"
android:key="input_overlay_opacity"
@ -219,208 +219,208 @@
<PreferenceScreen
android:title="@string/player_1_custom_binds"
android:dependency="input_autodetect_enable" >
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_up_btn"
android:title="@string/up_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_down_btn"
android:title="@string/down_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_left_btn"
android:title="@string/left_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_right_btn"
android:title="@string/right_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_a_btn"
android:title="@string/a_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_b_btn"
android:title="@string/b_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_x_btn"
android:title="@string/x_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_y_btn"
android:title="@string/y_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_start_btn"
android:title="@string/start_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_select_btn"
android:title="@string/select_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_l_btn"
android:title="@string/l1_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_r_btn"
android:title="@string/r1_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_l2_btn"
android:title="@string/l2_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_r2_btn"
android:title="@string/r2_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_l3_btn"
android:title="@string/l3_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player1_r3_btn"
android:title="@string/r3_button" />
</PreferenceScreen>
<PreferenceScreen
android:title="@string/player_2_custom_binds"
android:dependency="input_autodetect_enable" >
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_up_btn"
android:title="@string/up_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_down_btn"
android:title="@string/down_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_left_btn"
android:title="@string/left_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_right_btn"
android:title="@string/right_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_a_btn"
android:title="@string/a_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_b_btn"
android:title="@string/b_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_x_btn"
android:title="@string/x_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_y_btn"
android:title="@string/y_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_start_btn"
android:title="@string/start_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_select_btn"
android:title="@string/select_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_l_btn"
android:title="@string/l1_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_r_btn"
android:title="@string/r1_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_l2_btn"
android:title="@string/l2_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_r2_btn"
android:title="@string/r2_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_l3_btn"
android:title="@string/l3_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player2_r3_btn"
android:title="@string/r3_button" />
</PreferenceScreen>
<PreferenceScreen
android:title="@string/player_3_custom_binds"
android:dependency="input_autodetect_enable" >
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_up_btn"
android:title="@string/up_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_down_btn"
android:title="@string/down_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_left_btn"
android:title="@string/left_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_right_btn"
android:title="@string/right_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_a_btn"
android:title="@string/a_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_b_btn"
android:title="@string/b_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_x_btn"
android:title="@string/x_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_y_btn"
android:title="@string/y_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_start_btn"
android:title="@string/start_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_select_btn"
android:title="@string/select_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_l_btn"
android:title="@string/l1_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_r_btn"
android:title="@string/r1_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_l2_btn"
android:title="@string/l2_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_r2_btn"
android:title="@string/r2_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_l3_btn"
android:title="@string/l3_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player3_r3_btn"
android:title="@string/r3_button" />
</PreferenceScreen>
<PreferenceScreen
android:title="@string/player_4_custom_binds"
android:dependency="input_autodetect_enable" >
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_up_btn"
android:title="@string/up_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_down_btn"
android:title="@string/down_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_left_btn"
android:title="@string/left_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_right_btn"
android:title="@string/right_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_a_btn"
android:title="@string/a_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_b_btn"
android:title="@string/b_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_x_btn"
android:title="@string/x_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_y_btn"
android:title="@string/y_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_start_btn"
android:title="@string/start_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_select_btn"
android:title="@string/select_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_l_btn"
android:title="@string/l1_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_r_btn"
android:title="@string/r1_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_l2_btn"
android:title="@string/l2_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_r2_btn"
android:title="@string/r2_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_l3_btn"
android:title="@string/l3_button" />
<org.retroarch.browser.KeyBindPreference
<org.retroarch.browser.preferences.KeyBindPreference
android:key="input_player4_r3_btn"
android:title="@string/r3_button" />
</PreferenceScreen>
@ -439,7 +439,7 @@
<Preference android:title="@string/rom_directory"
android:summary="@string/rom_directory_desc">
<intent
android:targetClass="org.retroarch.browser.ROMDirActivity"
android:targetClass="org.retroarch.browser.diractivities.ROMDirActivity"
android:targetPackage="org.retroarch" />
</Preference>
</PreferenceCategory>
@ -453,9 +453,9 @@
android:summary="@string/savefile_directory_desc"
android:dependency="savefile_directory_enable">
<intent
android:targetClass="org.retroarch.browser.SRMDirActivity"
android:targetClass="org.retroarch.browser.diractivities.SRMDirActivity"
android:targetPackage="org.retroarch" />
</Preference>
</Preference>
</PreferenceCategory>
<PreferenceCategory android:title="@string/save_states">
<CheckBoxPreference android:title="@string/enable_custom_dir"
@ -466,7 +466,7 @@
android:summary="@string/save_state_directory_desc"
android:dependency="savestate_directory_enable">
<intent
android:targetClass="org.retroarch.browser.StateDirActivity"
android:targetClass="org.retroarch.browser.diractivities.StateDirActivity"
android:targetPackage="org.retroarch" />
</Preference>
</PreferenceCategory>
@ -479,7 +479,7 @@
android:summary="@string/system_directory_desc"
android:dependency="system_directory_enable">
<intent
android:targetClass="org.retroarch.browser.SystemDirActivity"
android:targetClass="org.retroarch.browser.diractivities.SystemDirActivity"
android:targetPackage="org.retroarch" />
</Preference>
</PreferenceCategory>

View File

@ -1,6 +1,7 @@
package org.retroarch.browser;
import org.retroarch.R;
import org.retroarch.browser.preferences.ConfigFile;
import java.io.*;

View File

@ -6,7 +6,7 @@ import org.retroarch.R;
import android.graphics.drawable.Drawable;
final class FileWrapper implements IconAdapterItem {
public final class FileWrapper implements IconAdapterItem {
public final File file;
public final boolean parentItem;
public final boolean dirSelectItem;

View File

@ -16,7 +16,7 @@ interface IconAdapterItem {
public abstract Drawable getIconDrawable();
}
final class IconAdapter<T extends IconAdapterItem> extends ArrayAdapter<T> {
public final class IconAdapter<T extends IconAdapterItem> extends ArrayAdapter<T> {
private final int layout;
public IconAdapter(Activity aContext, int aLayout) {

View File

@ -3,6 +3,7 @@ package org.retroarch.browser;
import java.io.*;
import org.retroarch.R;
import org.retroarch.browser.preferences.ConfigFile;
import android.annotation.TargetApi;
import android.app.AlertDialog;
@ -772,7 +773,7 @@ public final class MainMenuActivity extends PreferenceActivity {
@Override
public void startActivity(Intent intent) {
if (intent.getComponent().getClassName()
.equals("org.retroarch.browser.ROMActivity")) {
.equals("org.retroarch.browser.diractivites.ROMActivity")) {
if (!new File(libretro_path).isDirectory()) {
super.startActivityForResult(intent, ACTIVITY_LOAD_ROM);
} else {

View File

@ -3,6 +3,8 @@ package org.retroarch.browser;
import java.io.File;
import java.io.IOException;
import org.retroarch.browser.preferences.ConfigFile;
import android.content.Context;
import android.graphics.drawable.Drawable;

View File

@ -1,6 +1,9 @@
package org.retroarch.browser;
package org.retroarch.browser.diractivities;
import org.retroarch.R;
import org.retroarch.browser.FileWrapper;
import org.retroarch.browser.IconAdapter;
import org.retroarch.browser.MainMenuActivity;
import java.util.*;
import java.io.*;
@ -13,8 +16,7 @@ import android.widget.*;
import android.view.*;
public class DirectoryActivity extends Activity implements
AdapterView.OnItemClickListener {
public class DirectoryActivity extends Activity implements AdapterView.OnItemClickListener {
private IconAdapter<FileWrapper> adapter;
private File listedDirectory;

View File

@ -1,4 +1,4 @@
package org.retroarch.browser;
package org.retroarch.browser.diractivities;
import java.io.File;

View File

@ -1,7 +1,9 @@
package org.retroarch.browser;
package org.retroarch.browser.diractivities;
import java.io.File;
import org.retroarch.browser.MainMenuActivity;
import android.content.SharedPreferences;
import android.os.Bundle;

View File

@ -1,4 +1,4 @@
package org.retroarch.browser;
package org.retroarch.browser.diractivities;
import android.os.Bundle;

View File

@ -1,4 +1,4 @@
package org.retroarch.browser;
package org.retroarch.browser.diractivities;
import android.os.Bundle;

View File

@ -1,4 +1,4 @@
package org.retroarch.browser;
package org.retroarch.browser.diractivities;
import java.io.File;

View File

@ -1,4 +1,4 @@
package org.retroarch.browser;
package org.retroarch.browser.diractivities;
import android.os.Bundle;

View File

@ -1,4 +1,4 @@
package org.retroarch.browser;
package org.retroarch.browser.diractivities;
import android.os.Bundle;

View File

@ -1,4 +1,4 @@
package org.retroarch.browser;
package org.retroarch.browser.preferences;
import java.io.BufferedReader;
import java.io.InputStream;

View File

@ -1,4 +1,4 @@
package org.retroarch.browser;
package org.retroarch.browser.preferences;
import android.content.Context;
import android.preference.DialogPreference;

View File

@ -1,4 +1,4 @@
package org.retroarch.browser;
package org.retroarch.browser.preferences;
import org.retroarch.R;