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
This commit is contained in:
parent
504c8e86ca
commit
27dec0710c
8 changed files with 25 additions and 31 deletions
|
@ -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">
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
|
@ -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>
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package com.scatours.services.jsonrpc;
|
||||
package scatours.jsonrpc;
|
||||
|
||||
import java.io.IOException;
|
||||
|
Loading…
Reference in a new issue