summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/scatours-android-ui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sandbox/travelsample/scatours-android-ui/AndroidManifest.xml2
-rw-r--r--sandbox/travelsample/scatours-android-ui/default.properties11
-rw-r--r--sandbox/travelsample/scatours-android-ui/gen/scatours/android/R.java (renamed from sandbox/travelsample/scatours-android-ui/gen/com/scatours/android/R.java)5
-rw-r--r--sandbox/travelsample/scatours-android-ui/res/layout/search.xml (renamed from sandbox/travelsample/scatours-android-ui/res/layout/main.xml)0
-rw-r--r--sandbox/travelsample/scatours-android-ui/res/layout/search_results.xml6
-rw-r--r--sandbox/travelsample/scatours-android-ui/src/scatours/SCAToursSearchProxy.java24
-rw-r--r--sandbox/travelsample/scatours-android-ui/src/scatours/android/TripSearch.java (renamed from sandbox/travelsample/scatours-android-ui/src/com/scatours/android/TripSearch.java)6
-rw-r--r--sandbox/travelsample/scatours-android-ui/src/scatours/jsonrpc/JSONRpc.java (renamed from sandbox/travelsample/scatours-android-ui/src/com/scatours/services/jsonrpc/JSONRpc.java)2
8 files changed, 25 insertions, 31 deletions
diff --git a/sandbox/travelsample/scatours-android-ui/AndroidManifest.xml b/sandbox/travelsample/scatours-android-ui/AndroidManifest.xml
index b80c5a4151..7bda31e187 100644
--- a/sandbox/travelsample/scatours-android-ui/AndroidManifest.xml
+++ b/sandbox/travelsample/scatours-android-ui/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.scatours.android"
+ package="scatours.android"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
diff --git a/sandbox/travelsample/scatours-android-ui/default.properties b/sandbox/travelsample/scatours-android-ui/default.properties
index 4513a1e4fd..6b8ae52b90 100644
--- a/sandbox/travelsample/scatours-android-ui/default.properties
+++ b/sandbox/travelsample/scatours-android-ui/default.properties
@@ -7,5 +7,16 @@
# "build.properties", and override values to adapt the script to your
# project structure.
+# apk configurations. This property allows creation of APK files with limited
+# resources. For example, if your application contains many locales and
+# you wish to release multiple smaller apks instead of a large one, you can
+# define configuration to create apks with limited language sets.
+# Format is a comma separated list of configuration names. For each
+# configuration, a property will declare the resource configurations to
+# include. Example:
+# apk-configurations=european,northamerica
+# apk-config-european=en,fr,it,de,es
+# apk-config-northamerica=en,es
+apk-configurations=
# Project target.
target=android-3
diff --git a/sandbox/travelsample/scatours-android-ui/gen/com/scatours/android/R.java b/sandbox/travelsample/scatours-android-ui/gen/scatours/android/R.java
index 12fdbfa624..cbc020bdba 100644
--- a/sandbox/travelsample/scatours-android-ui/gen/com/scatours/android/R.java
+++ b/sandbox/travelsample/scatours-android-ui/gen/scatours/android/R.java
@@ -5,7 +5,7 @@
* should not be modified by hand.
*/
-package com.scatours.android;
+package scatours.android;
public final class R {
public static final class attr {
@@ -22,7 +22,8 @@ public final class R {
public static final int edit_toLocation=0x7f050001;
}
public static final class layout {
- public static final int main=0x7f030000;
+ public static final int search=0x7f030000;
+ public static final int search_results=0x7f030001;
}
public static final class string {
public static final int alert_cancel=0x7f040003;
diff --git a/sandbox/travelsample/scatours-android-ui/res/layout/main.xml b/sandbox/travelsample/scatours-android-ui/res/layout/search.xml
index cb7ae6acb6..cb7ae6acb6 100644
--- a/sandbox/travelsample/scatours-android-ui/res/layout/main.xml
+++ b/sandbox/travelsample/scatours-android-ui/res/layout/search.xml
diff --git a/sandbox/travelsample/scatours-android-ui/res/layout/search_results.xml b/sandbox/travelsample/scatours-android-ui/res/layout/search_results.xml
new file mode 100644
index 0000000000..fe20d9d7ce
--- /dev/null
+++ b/sandbox/travelsample/scatours-android-ui/res/layout/search_results.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+</LinearLayout>
diff --git a/sandbox/travelsample/scatours-android-ui/src/scatours/SCAToursSearchProxy.java b/sandbox/travelsample/scatours-android-ui/src/scatours/SCAToursSearchProxy.java
index 6bc36651ed..d43d5f7029 100644
--- a/sandbox/travelsample/scatours-android-ui/src/scatours/SCAToursSearchProxy.java
+++ b/sandbox/travelsample/scatours-android-ui/src/scatours/SCAToursSearchProxy.java
@@ -28,11 +28,7 @@ import org.json.JSONObject;
import scatours.common.TripItem;
import scatours.common.TripLeg;
-
-import android.util.Log;
-
-import com.scatours.android.R;
-import com.scatours.services.jsonrpc.JSONRpc;
+import scatours.jsonrpc.JSONRpc;
public class SCAToursSearchProxy implements SCAToursSearch {
// see http://developer.android.com/guide/developing/tools/emulator.html
@@ -81,22 +77,4 @@ public class SCAToursSearchProxy implements SCAToursSearch {
tripCatalog.toArray(catalogArray);
return catalogArray;
}
-
- public static void main(String[] args) {
- SCAToursSearch searchProxy = new SCAToursSearchProxy();
- TripLeg tripLeg = new TripLeg();
-
- tripLeg.setFromLocation("LGW");
- tripLeg.setToLocation("FLR");
- tripLeg.setFromDate("06/12/09");
- tripLeg.setToDate("13/12/09");
- tripLeg.setNoOfPeople("2");
-
- TripItem[] tripsAvailable = searchProxy.search(tripLeg);
-
- int foundTrips = tripsAvailable.length;
- System.out.println(foundTrips);
-
- }
-
}
diff --git a/sandbox/travelsample/scatours-android-ui/src/com/scatours/android/TripSearch.java b/sandbox/travelsample/scatours-android-ui/src/scatours/android/TripSearch.java
index b1191f0077..e2eb98625b 100644
--- a/sandbox/travelsample/scatours-android-ui/src/com/scatours/android/TripSearch.java
+++ b/sandbox/travelsample/scatours-android-ui/src/scatours/android/TripSearch.java
@@ -1,12 +1,10 @@
-package com.scatours.android;
+package scatours.android;
import scatours.SCAToursSearch;
import scatours.SCAToursSearchProxy;
import scatours.common.TripItem;
import scatours.common.TripLeg;
import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.DialogInterface;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
@@ -41,7 +39,7 @@ public class TripSearch extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
+ setContentView(R.layout.search);
ArrayAdapter adapter = new ArrayAdapter(this,android.R.layout.simple_dropdown_item_1line, AIRPORT_CODES);
diff --git a/sandbox/travelsample/scatours-android-ui/src/com/scatours/services/jsonrpc/JSONRpc.java b/sandbox/travelsample/scatours-android-ui/src/scatours/jsonrpc/JSONRpc.java
index 819ab341f3..c6a9cd8702 100644
--- a/sandbox/travelsample/scatours-android-ui/src/com/scatours/services/jsonrpc/JSONRpc.java
+++ b/sandbox/travelsample/scatours-android-ui/src/scatours/jsonrpc/JSONRpc.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package com.scatours.services.jsonrpc;
+package scatours.jsonrpc;
import java.io.IOException;