From 4c034740eacb17321bc83a848938c791d24549d0 Mon Sep 17 00:00:00 2001 From: TwistedUmbrella Date: Sun, 2 Mar 2014 22:48:36 -0500 Subject: [PATCH] Reference strings over hardcoded text, More documentation --- README.md | 10 ++++++++-- shell/android/jni/Application.mk | 4 ++-- shell/android/res/values/strings.xml | 2 ++ .../android/src/com/reicast/emulator/FileBrowser.java | 4 ++-- .../src/com/reicast/emulator/GL2JNIActivity.java | 1 - .../android/src/com/reicast/emulator/GL2JNINative.java | 1 - .../com/reicast/emulator/config/EditVJoyActivity.java | 4 ---- .../src/com/reicast/emulator/config/InputFragment.java | 3 +-- .../com/reicast/emulator/config/OptionsFragment.java | 3 +-- shell/android/xperia/jni/Application.mk | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 588100694..ec9b22658 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,15 @@ Let's try to keep everything under a single project :) To build for android -------------------- Tools required: -* Latest Android SDK and NDK -* Android 4.4 (API 19) or newer (http://developer.android.com/sdk/installing/adding-packages.html) +* Latest Android SDK + - http://developer.android.com/sdk/index.html +* NDK r8b or newer + - https://developer.android.com/tools/sdk/ndk/index.html + - If using r9c+, it is recommended you uncomment the "NDK_TOOLCHAIN_VERSION := 4.8" in shell/android/jni/Application.mk and shell/android/xperia/jni/Application.mk +* Android 4.4 (API 19) + - http://developer.android.com/sdk/installing/adding-packages.html * Ant + - http://ant.apache.org/ From project root directory: ``` diff --git a/shell/android/jni/Application.mk b/shell/android/jni/Application.mk index 8d449d9be..5ab713430 100644 --- a/shell/android/jni/Application.mk +++ b/shell/android/jni/Application.mk @@ -1,5 +1,5 @@ APP_STL := stlport_static #APP_ABI := armeabi-v7a x86 APP_ABI := armeabi-v7a -APP_PLATFORM := android-18 -NDK_TOOLCHAIN_VERSION := 4.8 \ No newline at end of file +APP_PLATFORM := android-19 +#NDK_TOOLCHAIN_VERSION := 4.8 \ No newline at end of file diff --git a/shell/android/res/values/strings.xml b/shell/android/res/values/strings.xml index 215743c28..0b2832182 100644 --- a/shell/android/res/values/strings.xml +++ b/shell/android/res/values/strings.xml @@ -6,6 +6,8 @@ Default System Path Storage Path (location of .gdi, .chd or .cdi images) Default Game Storage + Please configure a home directory + Please configure a games directory Boot Dreamcast Bios BIOS Missing. The Dreamcast BIOS is required for this emulator to work. Place the BIOS file in %1$s/data/dc_boot.bin diff --git a/shell/android/src/com/reicast/emulator/FileBrowser.java b/shell/android/src/com/reicast/emulator/FileBrowser.java index 7eb7336b2..08af1323c 100644 --- a/shell/android/src/com/reicast/emulator/FileBrowser.java +++ b/shell/android/src/com/reicast/emulator/FileBrowser.java @@ -148,7 +148,7 @@ public class FileBrowser extends Fragment { File home = new File(home_directory); if (!home.exists() || !home.isDirectory()) { - Toast.makeText(getActivity(), "Please configure a home directory", + Toast.makeText(getActivity(), R.string.config_home, Toast.LENGTH_LONG).show(); } @@ -217,7 +217,7 @@ public class FileBrowser extends Fragment { createListItem(list, games.get(i)); } } else { - Toast.makeText(parentActivity, "Please configure a games directory", + Toast.makeText(parentActivity, R.string.config_game, Toast.LENGTH_LONG).show(); } list.invalidate(); diff --git a/shell/android/src/com/reicast/emulator/GL2JNIActivity.java b/shell/android/src/com/reicast/emulator/GL2JNIActivity.java index c8d4feb96..64b9b9395 100644 --- a/shell/android/src/com/reicast/emulator/GL2JNIActivity.java +++ b/shell/android/src/com/reicast/emulator/GL2JNIActivity.java @@ -23,7 +23,6 @@ import android.view.ViewGroup.LayoutParams; import android.view.Window; import android.widget.LinearLayout; import android.widget.PopupWindow; -import android.widget.Toast; import com.reicast.emulator.config.Config; import com.reicast.emulator.emu.GL2JNIView; diff --git a/shell/android/src/com/reicast/emulator/GL2JNINative.java b/shell/android/src/com/reicast/emulator/GL2JNINative.java index 342edbb62..fc4750536 100644 --- a/shell/android/src/com/reicast/emulator/GL2JNINative.java +++ b/shell/android/src/com/reicast/emulator/GL2JNINative.java @@ -23,7 +23,6 @@ import android.view.ViewGroup.LayoutParams; import android.view.Window; import android.widget.LinearLayout; import android.widget.PopupWindow; -import android.widget.Toast; import com.reicast.emulator.config.Config; import com.reicast.emulator.emu.GL2JNIView; diff --git a/shell/android/src/com/reicast/emulator/config/EditVJoyActivity.java b/shell/android/src/com/reicast/emulator/config/EditVJoyActivity.java index b27fe0902..87ca455e4 100644 --- a/shell/android/src/com/reicast/emulator/config/EditVJoyActivity.java +++ b/shell/android/src/com/reicast/emulator/config/EditVJoyActivity.java @@ -18,7 +18,6 @@ import android.widget.ImageButton; import android.widget.ImageView.ScaleType; import android.widget.LinearLayout; import android.widget.PopupWindow; -import android.widget.Toast; import com.reicast.emulator.MainActivity; import com.reicast.emulator.R; @@ -70,9 +69,6 @@ public class EditVJoyActivity extends Activity { vjoy_d_cached = VJoy.readCustomVjoyValues(getApplicationContext()); JNIdc.show_osd(); - - Toast.makeText(getApplicationContext(), - "Press the back button for a menu", Toast.LENGTH_SHORT).show(); } @Override diff --git a/shell/android/src/com/reicast/emulator/config/InputFragment.java b/shell/android/src/com/reicast/emulator/config/InputFragment.java index 89526ac54..3b91eccdb 100644 --- a/shell/android/src/com/reicast/emulator/config/InputFragment.java +++ b/shell/android/src/com/reicast/emulator/config/InputFragment.java @@ -416,8 +416,7 @@ public class InputFragment extends Fragment { || descriptor.equals(deviceDescriptorPlayer2) || descriptor.equals(deviceDescriptorPlayer3) || descriptor.equals(deviceDescriptorPlayer4)) { - Toast.makeText(parentActivity, - getString(R.string.controller_already_in_use), + Toast.makeText(parentActivity, R.string.controller_already_in_use, Toast.LENGTH_SHORT).show(); return true; } diff --git a/shell/android/src/com/reicast/emulator/config/OptionsFragment.java b/shell/android/src/com/reicast/emulator/config/OptionsFragment.java index 35f2d9ff9..0b1d752fa 100644 --- a/shell/android/src/com/reicast/emulator/config/OptionsFragment.java +++ b/shell/android/src/com/reicast/emulator/config/OptionsFragment.java @@ -89,8 +89,7 @@ public class OptionsFragment extends Fragment { home_directory = editBrowse.getText().toString(); if (home_directory.endsWith("/data")) { home_directory.replace("/data", ""); - Toast.makeText(parentActivity, - parentActivity.getText(R.string.data_folder), + Toast.makeText(parentActivity, R.string.data_folder, Toast.LENGTH_SHORT).show(); } mPrefs.edit().putString("home_directory", home_directory) diff --git a/shell/android/xperia/jni/Application.mk b/shell/android/xperia/jni/Application.mk index 7f414647d..db4dd562f 100644 --- a/shell/android/xperia/jni/Application.mk +++ b/shell/android/xperia/jni/Application.mk @@ -1,4 +1,4 @@ #APP_ABI := armeabi-v7a x86 APP_ABI := armeabi-v7a APP_PLATFORM := android-9 -NDK_TOOLCHAIN_VERSION := 4.8 \ No newline at end of file +#NDK_TOOLCHAIN_VERSION := 4.8 \ No newline at end of file