From: kenstir Date: Mon, 9 Dec 2013 02:59:59 +0000 (-0500) Subject: cwmars_app builds using library project 'core' but does not run yet due to missing... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c2317ef7a554174fbeaaeb1bd7ba4ddf9cb828a3;p=working%2FEvergreen.git cwmars_app builds using library project 'core' but does not run yet due to missing assets/fm_IDL.xml. --- diff --git a/Open-ILS/src/Android/core/.idea/modules.xml b/Open-ILS/src/Android/core/.idea/modules.xml index dbe6f3a39b..2a3008e220 100644 --- a/Open-ILS/src/Android/core/.idea/modules.xml +++ b/Open-ILS/src/Android/core/.idea/modules.xml @@ -2,7 +2,7 @@ - + diff --git a/Open-ILS/src/Android/core/EvergreenApp.iml b/Open-ILS/src/Android/core/EvergreenApp.iml deleted file mode 100644 index 28915001b9..0000000000 --- a/Open-ILS/src/Android/core/EvergreenApp.iml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Open-ILS/src/Android/core/EvergreenCore.iml b/Open-ILS/src/Android/core/EvergreenCore.iml new file mode 100644 index 0000000000..da3c1686af --- /dev/null +++ b/Open-ILS/src/Android/core/EvergreenCore.iml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/Android/core/core.iml b/Open-ILS/src/Android/core/core.iml new file mode 100644 index 0000000000..125395143e --- /dev/null +++ b/Open-ILS/src/Android/core/core.iml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/Android/core/project.properties b/Open-ILS/src/Android/core/project.properties index fb2466aef3..8e4bc5fdce 100644 --- a/Open-ILS/src/Android/core/project.properties +++ b/Open-ILS/src/Android/core/project.properties @@ -9,4 +9,4 @@ # Project target. target=android-19 -android.library=false +android.library=true diff --git a/Open-ILS/src/Android/core/res/values-sw600dp/dimens.xml b/Open-ILS/src/Android/core/res/values-sw600dp/dimens.xml new file mode 100644 index 0000000000..44f01db75f --- /dev/null +++ b/Open-ILS/src/Android/core/res/values-sw600dp/dimens.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/Open-ILS/src/Android/core/res/values-sw720dp-land/dimens.xml b/Open-ILS/src/Android/core/res/values-sw720dp-land/dimens.xml new file mode 100644 index 0000000000..61e3fa8fbc --- /dev/null +++ b/Open-ILS/src/Android/core/res/values-sw720dp-land/dimens.xml @@ -0,0 +1,9 @@ + + + + 128dp + + diff --git a/Open-ILS/src/Android/core/src/org/evergreen/android/barcodescan/CaptureActivityHandler.java b/Open-ILS/src/Android/core/src/org/evergreen/android/barcodescan/CaptureActivityHandler.java index 8981f648b8..a594c2778d 100755 --- a/Open-ILS/src/Android/core/src/org/evergreen/android/barcodescan/CaptureActivityHandler.java +++ b/Open-ILS/src/Android/core/src/org/evergreen/android/barcodescan/CaptureActivityHandler.java @@ -56,50 +56,45 @@ public final class CaptureActivityHandler extends Handler { } @Override public void handleMessage(Message message) { - switch (message.what) { - case R.id.auto_focus: - //Log.d(TAG, "Got auto-focus message"); - // When one auto focus pass finishes, start another. This is the closest thing to - - - break; - case R.id.decode_succeeded: - Log.d(TAG, "Got decode succeeded message"); - state = State.SUCCESS; - - - Bundle bundle = message.getData(); - Bitmap barcode = bundle == null ? null : - (Bitmap) bundle.getParcelable(DecodeThread.BARCODE_BITMAP); - - activity.handleDecode((Result) message.obj, barcode); - - break; - case R.id.restart_preview: - restartPreviewAndDecode(); - - break; - - case R.id.decode_failed: - // We're decoding as fast as possible, so when one decode fails, start another. - state = State.PREVIEW; - cameraManager.requestPreviewFrame(decodeThread.getHandler(), R.id.decode); - activity.removePoints(); - - break; - case R.id.return_scan_result: - Log.d(TAG, "Got return scan result message"); - activity.setResult(Activity.RESULT_OK, (Intent) message.obj); - activity.finish(); - break; - case R.id.launch_product_query: - Log.d(TAG, "Got product query message"); - String url = (String) message.obj; - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); - intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); - activity.startActivity(intent); - break; - } + if (message.what == R.id.auto_focus) {//Log.d(TAG, "Got auto-focus message"); + // When one auto focus pass finishes, start another. This is the closest thing to + + + } else if (message.what == R.id.decode_succeeded) { + Log.d(TAG, "Got decode succeeded message"); + state = State.SUCCESS; + + + Bundle bundle = message.getData(); + Bitmap barcode = bundle == null ? null : + (Bitmap) bundle.getParcelable(DecodeThread.BARCODE_BITMAP); + + activity.handleDecode((Result) message.obj, barcode); + + + } else if (message.what == R.id.restart_preview) { + restartPreviewAndDecode(); + + + } else if (message.what == R.id.decode_failed) {// We're decoding as fast as possible, so when one decode fails, start another. + state = State.PREVIEW; + cameraManager.requestPreviewFrame(decodeThread.getHandler(), R.id.decode); + activity.removePoints(); + + + } else if (message.what == R.id.return_scan_result) { + Log.d(TAG, "Got return scan result message"); + activity.setResult(Activity.RESULT_OK, (Intent) message.obj); + activity.finish(); + + } else if (message.what == R.id.launch_product_query) { + Log.d(TAG, "Got product query message"); + String url = (String) message.obj; + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); + activity.startActivity(intent); + + } } public void quitSynchronously() { diff --git a/Open-ILS/src/Android/core/src/org/evergreen/android/barcodescan/DecodeHandler.java b/Open-ILS/src/Android/core/src/org/evergreen/android/barcodescan/DecodeHandler.java index 8063700037..9c49472cce 100755 --- a/Open-ILS/src/Android/core/src/org/evergreen/android/barcodescan/DecodeHandler.java +++ b/Open-ILS/src/Android/core/src/org/evergreen/android/barcodescan/DecodeHandler.java @@ -63,16 +63,14 @@ final class DecodeHandler extends Handler { return; //if thread is not running do nothing } - switch (message.what) { - case R.id.decode: - decode((byte[]) message.obj, message.arg1, message.arg2); - break; - case R.id.quit: - //quit, set running false - running = false; - Looper.myLooper().quit(); - break; - } + if (message.what == R.id.decode) { + decode((byte[]) message.obj, message.arg1, message.arg2); + + } else if (message.what == R.id.quit) {//quit, set running false + running = false; + Looper.myLooper().quit(); + + } } diff --git a/Open-ILS/src/Android/core/src/org/evergreen/android/utils/ui/BaseSampleActivity.java b/Open-ILS/src/Android/core/src/org/evergreen/android/utils/ui/BaseSampleActivity.java index 5fda8e67ff..72c5f843e6 100644 --- a/Open-ILS/src/Android/core/src/org/evergreen/android/utils/ui/BaseSampleActivity.java +++ b/Open-ILS/src/Android/core/src/org/evergreen/android/utils/ui/BaseSampleActivity.java @@ -44,20 +44,18 @@ public abstract class BaseSampleActivity extends FragmentActivity { @Override public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.random: + int i = item.getItemId(); + if (i == R.id.random) { final int page = RANDOM.nextInt(mAdapter.getCount()); Toast.makeText(this, "Changing to page " + page, Toast.LENGTH_SHORT); mPager.setCurrentItem(page); return true; - - case R.id.add_page: + } else if (i == R.id.add_page) { if (mAdapter.getCount() < 10) { mIndicator.notifyDataSetChanged(); } return true; - - case R.id.remove_page: + } else if (i == R.id.remove_page) { if (mAdapter.getCount() > 1) { mIndicator.notifyDataSetChanged(); } diff --git a/Open-ILS/src/Android/core/src/org/evergreen/android/views/AccountScreenDashboard.java b/Open-ILS/src/Android/core/src/org/evergreen/android/views/AccountScreenDashboard.java index 9d98f5f17d..723951c2b5 100644 --- a/Open-ILS/src/Android/core/src/org/evergreen/android/views/AccountScreenDashboard.java +++ b/Open-ILS/src/Android/core/src/org/evergreen/android/views/AccountScreenDashboard.java @@ -158,26 +158,21 @@ public class AccountScreenDashboard extends Activity { public void onClickFeature(View v) { int id = v.getId(); - switch (id) { - - case R.id.account_btn_check_out: + if (id == R.id.account_btn_check_out) { startActivity(new Intent(getApplicationContext(), ItemsCheckOutListView.class)); - break; - case R.id.account_btn_holds: + + } else if (id == R.id.account_btn_holds) { startActivity(new Intent(getApplicationContext(), HoldsListView.class)); - break; - case R.id.account_btn_fines: + + } else if (id == R.id.account_btn_fines) { startActivity(new Intent(getApplicationContext(), FinesActivity.class)); - break; - case R.id.account_btn_book_bags: + + } else if (id == R.id.account_btn_book_bags) { startActivity(new Intent(getApplicationContext(), BookbagsListView.class)); - break; - default: - break; } diff --git a/Open-ILS/src/Android/cwmars_app/.gitignore b/Open-ILS/src/Android/cwmars_app/.gitignore new file mode 100644 index 0000000000..9d93ab6e4d --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.gitignore @@ -0,0 +1,9 @@ +*.class +*.dex +.idea/workspace.xml +.idea/tasks.xml +bin/ +gen/ +.settings +local.properties +proguard-project.txt diff --git a/Open-ILS/src/Android/cwmars_app/.idea/.name b/Open-ILS/src/Android/cwmars_app/.idea/.name new file mode 100644 index 0000000000..eb09bdf00c --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.idea/.name @@ -0,0 +1 @@ +cwmars \ No newline at end of file diff --git a/Open-ILS/src/Android/cwmars_app/.idea/compiler.xml b/Open-ILS/src/Android/cwmars_app/.idea/compiler.xml new file mode 100644 index 0000000000..217af471a9 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.idea/compiler.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/Open-ILS/src/Android/cwmars_app/.idea/copyright/profiles_settings.xml b/Open-ILS/src/Android/cwmars_app/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000000..3572571ad8 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.idea/copyright/profiles_settings.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Open-ILS/src/Android/cwmars_app/.idea/encodings.xml b/Open-ILS/src/Android/cwmars_app/.idea/encodings.xml new file mode 100644 index 0000000000..e206d70d85 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.idea/encodings.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/Open-ILS/src/Android/cwmars_app/.idea/libraries/dexedLibs.xml b/Open-ILS/src/Android/cwmars_app/.idea/libraries/dexedLibs.xml new file mode 100644 index 0000000000..b2d809db95 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.idea/libraries/dexedLibs.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Open-ILS/src/Android/cwmars_app/.idea/libraries/libs.xml b/Open-ILS/src/Android/cwmars_app/.idea/libraries/libs.xml new file mode 100644 index 0000000000..26f91dc1c2 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.idea/libraries/libs.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Open-ILS/src/Android/cwmars_app/.idea/misc.xml b/Open-ILS/src/Android/cwmars_app/.idea/misc.xml new file mode 100644 index 0000000000..4742f8a179 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Open-ILS/src/Android/cwmars_app/.idea/modules.xml b/Open-ILS/src/Android/cwmars_app/.idea/modules.xml new file mode 100644 index 0000000000..6e7bbd4d6f --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.idea/modules.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Open-ILS/src/Android/cwmars_app/.idea/scopes/scope_settings.xml b/Open-ILS/src/Android/cwmars_app/.idea/scopes/scope_settings.xml new file mode 100644 index 0000000000..922003b843 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/Open-ILS/src/Android/cwmars_app/.idea/uiDesigner.xml b/Open-ILS/src/Android/cwmars_app/.idea/uiDesigner.xml new file mode 100644 index 0000000000..3b00020308 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.idea/uiDesigner.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/Android/cwmars_app/.idea/vcs.xml b/Open-ILS/src/Android/cwmars_app/.idea/vcs.xml new file mode 100644 index 0000000000..def6a6a184 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Open-ILS/src/Android/cwmars_app/AndroidManifest.xml b/Open-ILS/src/Android/cwmars_app/AndroidManifest.xml new file mode 100644 index 0000000000..e325857e4d --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/AndroidManifest.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/Android/cwmars_app/ant.properties b/Open-ILS/src/Android/cwmars_app/ant.properties new file mode 100644 index 0000000000..b0971e891e --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/ant.properties @@ -0,0 +1,17 @@ +# This file is used to override default values used by the Ant build system. +# +# This file must be checked into Version Control Systems, as it is +# integral to the build system of your project. + +# This file is only used by the Ant script. + +# You can use this to override default values such as +# 'source.dir' for the location of your java source folder and +# 'out.dir' for the location of your output folder. + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. + diff --git a/Open-ILS/src/Android/cwmars_app/build.xml b/Open-ILS/src/Android/cwmars_app/build.xml new file mode 100644 index 0000000000..730f317f54 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/build.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/Android/cwmars_app/cwmars.iml b/Open-ILS/src/Android/cwmars_app/cwmars.iml new file mode 100644 index 0000000000..b366ef5d18 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/cwmars.iml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/Android/cwmars_app/out/production/cwmars/cwmars.apk b/Open-ILS/src/Android/cwmars_app/out/production/cwmars/cwmars.apk new file mode 100644 index 0000000000..03f5bd39d7 Binary files /dev/null and b/Open-ILS/src/Android/cwmars_app/out/production/cwmars/cwmars.apk differ diff --git a/Open-ILS/src/Android/cwmars_app/out/production/cwmars/cwmars.unaligned.apk b/Open-ILS/src/Android/cwmars_app/out/production/cwmars/cwmars.unaligned.apk new file mode 100644 index 0000000000..2197c7eabe Binary files /dev/null and b/Open-ILS/src/Android/cwmars_app/out/production/cwmars/cwmars.unaligned.apk differ diff --git a/Open-ILS/src/Android/cwmars_app/project.properties b/Open-ILS/src/Android/cwmars_app/project.properties new file mode 100644 index 0000000000..99b4254480 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/project.properties @@ -0,0 +1,15 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-19 +android.library.reference.1=../core diff --git a/Open-ILS/src/Android/cwmars_app/res/drawable-hdpi/ic_launcher.png b/Open-ILS/src/Android/cwmars_app/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000000..96a442e5b8 Binary files /dev/null and b/Open-ILS/src/Android/cwmars_app/res/drawable-hdpi/ic_launcher.png differ diff --git a/Open-ILS/src/Android/cwmars_app/res/drawable-ldpi/ic_launcher.png b/Open-ILS/src/Android/cwmars_app/res/drawable-ldpi/ic_launcher.png new file mode 100644 index 0000000000..99238729d8 Binary files /dev/null and b/Open-ILS/src/Android/cwmars_app/res/drawable-ldpi/ic_launcher.png differ diff --git a/Open-ILS/src/Android/cwmars_app/res/drawable-mdpi/ic_launcher.png b/Open-ILS/src/Android/cwmars_app/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000000..359047dfa4 Binary files /dev/null and b/Open-ILS/src/Android/cwmars_app/res/drawable-mdpi/ic_launcher.png differ diff --git a/Open-ILS/src/Android/cwmars_app/res/drawable-xhdpi/ic_launcher.png b/Open-ILS/src/Android/cwmars_app/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..71c6d760f0 Binary files /dev/null and b/Open-ILS/src/Android/cwmars_app/res/drawable-xhdpi/ic_launcher.png differ diff --git a/Open-ILS/src/Android/cwmars_app/res/values/ou.xml b/Open-ILS/src/Android/cwmars_app/res/values/ou.xml new file mode 100644 index 0000000000..9b5b79ff35 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/res/values/ou.xml @@ -0,0 +1,11 @@ + + + + + http://bark.cwmars.org + C/W Mars Library + C/W Mars + Welcome + C/W Mars Library + Sign in to your\nC/W Mars Library Account + diff --git a/Open-ILS/src/Android/cwmars_app/res/values/strings.xml b/Open-ILS/src/Android/cwmars_app/res/values/strings.xml new file mode 100644 index 0000000000..0c875d97e8 --- /dev/null +++ b/Open-ILS/src/Android/cwmars_app/res/values/strings.xml @@ -0,0 +1,4 @@ + + + cwmars +