Ray Zhang 12 yıl önce
ebeveyn
işleme
6cd06a656a

+ 2 - 0
Apex/AndroidManifest.xml

@@ -56,6 +56,7 @@
             android:name="com.usai.apex.ApexActivity"
             android:label="@string/title_activity_apex"
             android:screenOrientation="portrait"
+            android:logo="@drawable/apexlogo_2"
             android:windowSoftInputMode="adjustPan" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -77,6 +78,7 @@
         <activity
             android:name="com.usai.apex.FunctionSelectActivity"
             android:label="@string/title_activity_function_select"
+            android:logo="@drawable/apexlogo_2"
             android:screenOrientation="portrait" >
         </activity>
         <activity

BIN
Apex/res/drawable-hdpi/bg_1.jpg


BIN
Apex/res/drawable-hdpi/bg_1.png


BIN
Apex/res/drawable-hdpi/bg_2.jpg


+ 32 - 0
Apex/res/drawable/bg_gardient.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+    <item android:id="@android:id/background">
+        <shape>
+            <corners android:radius="40dip" />
+
+            <gradient
+                android:angle="270"
+                android:centerColor="#ff0000"
+                android:centerY="0.5"
+                android:endColor="#ffcccc"
+                android:startColor="#ff0000" />
+        </shape>
+    </item>
+    <item
+        android:id="@android:id/background"
+        android:bottom="15dp"
+        android:left="7dp"
+        android:right="7dp"
+        android:top="3dp">
+        <shape>
+            <corners android:radius="40dip" />
+
+            <gradient
+                android:angle="90"
+                android:endColor="#FFcccc"
+                android:startColor="#ff0000" />
+        </shape>
+    </item>
+
+</layer-list>

+ 3 - 1
Apex/res/layout/activity_apex.xml

@@ -13,7 +13,9 @@
             android:layout_height="wrap_content"
             android:layout_alignParentTop="true"
             android:scaleType="fitXY"
-            android:src="@drawable/bg_1" />
+            android:src="@drawable/bg_2" 
+            
+            />
 
         <TabWidget
             android:id="@android:id/tabs"

+ 2 - 1
Apex/res/layout/fragment_login.xml

@@ -10,7 +10,8 @@
         android:id="@+id/login_status"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_centerInParent="true"
+        android:layout_alignTop="@+id/login_form"
+        android:layout_centerHorizontal="true"
         android:layout_gravity="center"
         android:gravity="center_horizontal"
         android:orientation="vertical"

+ 23 - 17
Apex/res/layout/new_function_select.xml

@@ -12,27 +12,32 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="Container Status"
-        android:textStyle="bold" />
+        android:textAppearance="?android:attr/textAppearanceMedium"/>
 
     <RadioGroup
         android:id="@+id/radioGroup1"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content" >
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:layout_marginTop="5dp" 
+        android:layout_marginBottom="5dp">
 
-        <RadioButton
-            android:id="@+id/radio0"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:checked="true"
-            android:textSize="12sp"
-            android:text="H_BOL" />
+            <RadioButton
+                android:id="@+id/radio0"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:checked="true"
+                android:text="H_BOL"
+                android:layout_weight="1"
+                />
 
-        <RadioButton
-            android:id="@+id/radio1"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textSize="12sp"
-            android:text="Container#" />
+            <RadioButton
+                android:id="@+id/radio1"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Container#"
+                android:layout_weight="1"
+               />
     </RadioGroup>
 
     <EditText
@@ -42,7 +47,8 @@
         android:hint="@string/prompt_search_criterion"
         android:inputType="textAutoComplete"
         android:maxLines="1"
-        android:singleLine="true" >
+        android:singleLine="true" 
+        >
 
         <requestFocus />
     </EditText>

+ 3 - 0
Apex/src/com/usai/apex/ApexActivity.java

@@ -2,6 +2,7 @@ package com.usai.apex;
 
 //import com.google.android.gms.maps.SupportMapFragment;
 
+import android.app.ActionBar;
 import android.os.Bundle;
 //import android.app.Fragment;
 //import android.app.FragmentTransaction;
@@ -39,6 +40,8 @@ public class ApexActivity extends FragmentActivity /*
 	{
 		super.onCreate(savedInstanceState);
 		setContentView(R.layout.activity_apex);
+		ActionBar bar = getActionBar();
+		bar.setTitle("");
 		setupTabs();
 	}
 

+ 38 - 0
Apex/src/com/usai/apex/FunctionSelectActivity.java

@@ -1,13 +1,18 @@
 package com.usai.apex;
 
+import android.app.ActionBar;
 import android.content.Intent;
 import android.os.Bundle;
 import android.support.v4.app.FragmentActivity;
+import android.text.TextUtils;
 import android.util.Log;
 import android.view.Menu;
 import android.view.View;
 import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.EditText;
 import android.widget.ImageButton;
+import android.widget.RadioGroup;
 import android.widget.TextView;
 
 public class FunctionSelectActivity extends FragmentActivity implements OnClickListener
@@ -23,6 +28,9 @@ public class FunctionSelectActivity extends FragmentActivity implements OnClickL
 		password= getIntent().getStringExtra("password");
 		super.onCreate(savedInstanceState);
 		setContentView(R.layout.new_function_select);
+		
+		ActionBar bar = getActionBar();
+		bar.setTitle("");
 //		
 		TextView tv_booking = (TextView)findViewById(R.id.tv_booking);
 		tv_booking.setOnClickListener(this);
@@ -40,6 +48,8 @@ public class FunctionSelectActivity extends FragmentActivity implements OnClickL
 		tv_exit.setOnClickListener(this);
 		TextView tv_loc = (TextView)findViewById(R.id.tv_location);
 		tv_loc.setOnClickListener(this);
+		Button btn_search = (Button) findViewById(R.id.btn_search);
+		btn_search.setOnClickListener(this);
 	}
 
 	@Override
@@ -58,6 +68,34 @@ public class FunctionSelectActivity extends FragmentActivity implements OnClickL
 		Log.d(TAG, "ID="+v.getId());
 		switch (v.getId())
 		{
+		case R.id.btn_search:
+			EditText et = (EditText) findViewById(R.id.et_criterion);
+			String cargo_criterion = et.getText().toString();
+			if (TextUtils.isEmpty(cargo_criterion))
+			{
+				et.setError(getString(R.string.error_field_required));
+				et.requestFocus();
+			}
+			else
+			{
+				Intent intent = new Intent();
+				intent.setClass(this, DetailActivity.class);
+
+				intent.putExtra("action0" , "Tracking");
+				intent.putExtra("function_name", "Cargo Tracking");
+				intent.putExtra("cargo_criterion", cargo_criterion);
+				intent.putExtra("actions_count", 1);
+				intent.putExtra("_id", "dumb");
+				RadioGroup rg = (RadioGroup) findViewById(R.id.radioGroup1);
+				if(rg.getCheckedRadioButtonId ()==R.id.radio0)
+					intent.putExtra("criterion_type", 0);
+				else
+					intent.putExtra("criterion_type", 1);
+//				hbol
+//				container_no
+				startActivity(intent);
+			}
+			break;			
 		case R.id.tv_booking:
 		{
 			Intent intent = new Intent();