diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-02 06:56:59 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-02 06:56:59 +0000 |
commit | 27dec0710cc7da2d2eda9b49178ca1334fc756d5 (patch) | |
tree | b0e12db11cea63f1c01253bc49e34ee114780867 | |
parent | 504c8e86cada492c4532aa09f145e87c344270c5 (diff) |
Refactoring to follow the same package naming used in other modules + renaming main activity to become search activity and introducing search results view
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@780957 13f79535-47bb-0310-9956-ffa450edef68
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; |