Ray Zhang il y a 12 ans
Parent
commit
04c97c6460

+ 54 - 0
Apex/assets/detail.json

@@ -0,0 +1,54 @@
+{
+    "result": 1,
+    "count":3, 
+    "group0": {
+    	"_name": "Details",	
+        "_type": "mapping", 
+        "_count": 24,
+        "item0":{"Service": "CY/DOOR"}, 
+        "item1":{"CARRIER": "MAEU"}, 
+        "item2":{"ETA": "2014-03-24"}, 
+        "item3":{"Consignee": "TRAINT78001"}, 
+        "item4":{"FINAL DESINATION": "OKLAHOMA CITY, OK"}, 
+        "item5":{"PLACE OF DELIVERY": "OKLAHOMA CITY, OK"}, 
+        "item6":{"VOY": "1404"}, 
+        "item7":{"ETD": "2014-02-14"}, 
+        "item8":{"PLACE OF RECEIPT": "XINGANG, CHINA"}, 
+        "item9":{"Sales_Rep": "C03"}, 
+        "item10":{"M_BOL": "MAEU867344030"}, 
+        "item11":{"HBOL": "A1402490050"}, 
+        "item12":{"AGENT": "APEXORD"}, 
+        "item13":{"Create_Time": "2014-02-10 18:20:20.145"}, 
+        "item14":{"Carrier_Booking#": "867344030"}, 
+        "item15":{"Create_By": "WINNIE.FAN"}, 
+        "item16":{"Other_Info": "COLLECT"}, 
+        "item17":{"VESSEL": "EUGEN MAERSK"}, 
+        "item18":{"Shipper": "SHIGLO49001"}, 
+        "item19":{"ORIGIN": "APEXTJN"}, 
+        "item20":{"Quote_No": ""}, 
+        "item21":{"WK": "7"}, 
+        "item22":{"BOOKING NO": ""}, 
+        "item23":{"MBL_Dest": "NEWARK, NJ"}
+    }, 
+    "group1": {
+    	"_name": "Container",
+  		"_type": "table", 
+        "content": "<table border=1> <tbody> <tr><th>Description</th><th>CBM</th><th>KGS</th><th>Marks</th><th>QTY</th><th>SCH_B</th><th>Size</th><th>Unit</th><th>PO#</th></tr><tr><td>VINYL GLOVES<br><br>H.S.CODE: 392620<br><br>SC#S3NSE058</td><td>60.480</td><td>17064.000</td><td>AS ADDRESSED</td><td>1</td><td></td><td>40SD</td><td>CTN-CARTON</td><td>0022394</td></tr> </tbody></table>"
+    },
+    "group2":{
+    	"_type":"list",
+    	"_name": "Logs",
+    	"_count":11,
+    	"line0":"11/08/2013 16:26:00 @ 7I (FOR ENTIRE HBOL) NII/CET HOLD/ATSMNT/DR/10-23-13 ( NYK ATLAS )",
+    	"line1":"10/23/2013 19:58:00 @ 7H (FOR ENTIRE HBOL) NII/CET HOLD/ATSMNT/DR/10-23-13 ( NYK ATLAS )",
+    	"line2":"10/09/2013 06:51:00 @ 1Y (FOR ENTIRE HBOL) MVOC - NVOC BL MATCH ( NYK ATLAS )",
+    	"line3":"10/07/2013 07:14:37 @ CBP ACCEPTED( NYK ATLAS )",
+    	"line4":"10/07/2013 07:14:00 @ 1Y (FOR ENTIRE HBOL) MVOC - NVOC BL MATCH ( NYK ATLAS )",
+    	"line5":"10/07/2013 07:14:00 @ 55 (FOR ENTIRE HBOL) CARR AMEND ADD ( NYK ATLAS )",
+    	"line6":"10/07/2013 07:14:00 @ 54 (FOR ENTIRE HBOL) CARR BILL DELETE ( NYK ATLAS )",
+    	"line7":"10/07/2013 07:12:42 @ AMEND @: 2013-10-07 07:12:42( NYK ATLAS )",
+    	"line8":"10/03/2013 11:48:00 @ 3Z (FOR ENTIRE HBOL) SECURITY FILING ON FILE ( NYK ATLAS )",
+    	"line9":"10/03/2013 06:33:09 @ CBP ACCEPTED( NYK ATLAS )",
+    	"line10":"10/03/2013 06:33:00 @ 1Y (FOR ENTIRE HBOL) MVOC - NVOC BL MATCH ( NYK ATLAS )"
+    }
+}

+ 48 - 0
Apex/json/detail.json

@@ -0,0 +1,48 @@
+{
+    "result": 1, 
+    "Details": {
+        "_type": "mapping", 
+        "Service": "CY/DOOR", 
+        "CARRIER": "MAEU", 
+        "ETA": "2014-03-24", 
+        "Consignee": "TRAINT78001", 
+        "FINAL DESINATION": "OKLAHOMA CITY, OK", 
+        "PLACE OF DELIVERY": "OKLAHOMA CITY, OK", 
+        "VOY": "1404", 
+        "ETD": "2014-02-14", 
+        "PLACE OF RECEIPT": "XINGANG, CHINA", 
+        "Sales_Rep": "C03", 
+        "M_BOL": "MAEU867344030", 
+        "HBOL": "A1402490050", 
+        "AGENT": "APEXORD", 
+        "Create_Time": "2014-02-10 18:20:20.145", 
+        "Carrier_Booking#": "867344030", 
+        "Create_By": "WINNIE.FAN", 
+        "Other_Info": "COLLECT", 
+        "VESSEL": "EUGEN MAERSK", 
+        "Shipper": "SHIGLO49001", 
+        "ORIGIN": "APEXTJN", 
+        "Quote_No": "", 
+        "WK": "7", 
+        "BOOKING NO": "", 
+        "MBL_Dest": "NEWARK, NJ"
+    }, 
+    "Container": {
+        "_type": "table", 
+        "content": "<table border=1> <tbody> <tr><th>Description</th><th>CBM</th><th>KGS</th><th>Marks</th><th>QTY</th><th>SCH_B</th><th>Size</th><th>Unit</th><th>PO#</th></tr><tr><td>VINYL GLOVES<br><br>H.S.CODE: 392620<br><br>SC#S3NSE058</td><td>60.480</td><td>17064.000</td><td>AS ADDRESSED</td><td>1</td><td></td><td>40SD</td><td>CTN-CARTON</td><td>0022394</td></tr> </tbody></table>"
+    },
+    "Log":{
+    	"_type":"list",
+    	"11/08/2013 16:26:00 @ 7I (FOR ENTIRE HBOL) NII/CET HOLD/ATSMNT/DR/10-23-13 ( NYK ATLAS )":null,
+    	"10/23/2013 19:58:00 @ 7H (FOR ENTIRE HBOL) NII/CET HOLD/ATSMNT/DR/10-23-13 ( NYK ATLAS )":null,
+    	"10/09/2013 06:51:00 @ 1Y (FOR ENTIRE HBOL) MVOC - NVOC BL MATCH ( NYK ATLAS )":null,
+    	"10/07/2013 07:14:37 @ CBP ACCEPTED( NYK ATLAS )":null,
+    	"10/07/2013 07:14:00 @ 1Y (FOR ENTIRE HBOL) MVOC - NVOC BL MATCH ( NYK ATLAS )":null,
+    	"10/07/2013 07:14:00 @ 55 (FOR ENTIRE HBOL) CARR AMEND ADD ( NYK ATLAS )":null,
+    	"10/07/2013 07:14:00 @ 54 (FOR ENTIRE HBOL) CARR BILL DELETE ( NYK ATLAS )":null,
+    	"10/07/2013 07:12:42 @ AMEND @: 2013-10-07 07:12:42( NYK ATLAS )":null,
+    	"10/03/2013 11:48:00 @ 3Z (FOR ENTIRE HBOL) SECURITY FILING ON FILE ( NYK ATLAS )":null,
+    	"10/03/2013 06:33:09 @ CBP ACCEPTED( NYK ATLAS )":null,
+    	"10/03/2013 06:33:00 @ 1Y (FOR ENTIRE HBOL) MVOC - NVOC BL MATCH ( NYK ATLAS )":null
+    }
+}

+ 16 - 0
Apex/res/drawable/detail_item.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" >
+
+    <solid android:color="#FFFFFFFF" />
+
+    <stroke
+        android:width="1dp"
+        android:color="#00000000" />
+
+    <padding
+        android:bottom="10dp"
+        android:left="10dp"
+        android:right="10dp"
+        android:top="10dp" />
+
+</shape>

+ 16 - 0
Apex/res/drawable/detail_tag.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" >
+
+  
+
+    <stroke
+        android:width="1dp"
+        android:color="@android:color/holo_blue_light" />
+
+    <padding
+        android:bottom="10dp"
+        android:left="10dp"
+        android:right="10dp"
+        android:top="10dp" />
+
+</shape>

+ 9 - 8
Apex/res/drawable/tablehead.xml

@@ -1,18 +1,19 @@
 <?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android" >
-        <gradient
+
+    <gradient
         android:angle="0"
-        android:endColor="#80808080"
-        android:startColor="#80808080" />
+        android:endColor="@android:color/holo_blue_light"
+        android:startColor="@android:color/holo_blue_light" />
 
     <stroke
         android:width="1dp"
         android:color="#00000000" />
 
-    <padding 
-        android:left="10dp" 
+    <padding
+        android:bottom="10dp"
+        android:left="10dp"
         android:right="10dp"
-        android:top="10dp"
-        android:bottom="10dp"/>
+        android:top="10dp" />
 
-</shape>
+</shape>

+ 1 - 0
Apex/res/layout/activity_detail.xml

@@ -12,6 +12,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:scrollbars="none" 
+            android:fillViewport="true"
             android:layout_alignParentBottom="true" >
 
             <TabWidget

+ 2 - 2
Apex/res/layout/activity_result.xml

@@ -10,7 +10,7 @@
         android:layout_height="fill_parent"
         android:layout_centerInParent="true"
         android:layout_gravity="center"
-        android:background="#80808080"
+        
         android:orientation="vertical"
         android:visibility="gone" >
 
@@ -50,7 +50,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="fill_parent"
                 android:padding="2dp"
-                android:background="#80808080" >
+                android:background="@android:color/holo_blue_bright" >
 
                 <TableRow
                     android:id="@+id/tr_header"

+ 20 - 2
Apex/res/layout/detail_fragment.xml

@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    
     android:layout_width="match_parent"
     android:layout_height="match_parent" >
 
-    <TextView
+<!--     <TextView
         android:id="@+id/textView1"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
@@ -28,6 +29,23 @@
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
       
-        android:layout_centerHorizontal="true" />
+        android:layout_centerHorizontal="true" /> -->
+
+    <ScrollView
+        
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentTop="true"
+        android:fillViewport="true" >
+
+        <LinearLayout
+            android:id="@+id/ll_root"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical" 
+            android:background="@android:color/holo_blue_bright">
+        </LinearLayout>
+    </ScrollView>
 
 </RelativeLayout>

+ 18 - 0
Apex/res/layout/group_tag.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" 
+    android:background="@drawable/detail_tag">
+    
+
+    <TextView
+        android:id="@+id/tv_group"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentTop="true"
+        android:drawableLeft="@android:drawable/arrow_down_float"
+        android:text="TextView"
+        android:textAppearance="?android:attr/textAppearanceMedium" />
+
+</RelativeLayout>

+ 8 - 0
Apex/res/layout/key_mapping.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical" >
+    
+
+</LinearLayout>

+ 24 - 0
Apex/res/layout/keymapping_item.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="horizontal" >
+
+    <TextView
+        android:id="@+id/tv_key"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="Key"
+        android:layout_weight="1" 
+        android:textStyle="bold"
+        android:background="@drawable/detail_item"/>
+
+    <TextView
+        android:id="@+id/tv_value"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="Value" 
+        android:layout_weight="1"
+        android:background="@drawable/detail_item"/>
+
+</LinearLayout>

+ 8 - 0
Apex/res/layout/list_content.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical" >
+    
+
+</LinearLayout>

+ 15 - 0
Apex/res/layout/list_item.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" >
+
+    <TextView
+        android:id="@+id/tv_item"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentTop="true"
+        android:text="TextView" 
+        android:background="@drawable/detail_item"/>
+
+</RelativeLayout>

+ 8 - 0
Apex/res/layout/web_content.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WebView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" 
+    android:background="#00000000">
+    
+
+</WebView>

+ 1 - 1
Apex/src/com/usai/apex/ApexActivity.java

@@ -68,7 +68,7 @@ public class ApexActivity extends FragmentActivity /*
 
 		// Instantiate a new fragment.
 		Fragment loginFragment = new LoginFragment();
-		Fragment dtFragement = new DirectTrackingFragment();
+//		Fragment dtFragement = new DirectTrackingFragment();
 		Fragment slFragment = new ServiceLocationFragment();
 		// Add the fragment to the activity, pushing this transaction
 		// on to the back stack.

+ 1 - 1
Apex/src/com/usai/apex/DetailActivity.java

@@ -157,7 +157,7 @@ public class DetailActivity extends FragmentActivity implements
 		// FrameLayout tab1 = new FrameLayout(this);
 		mTabHost.setup();
 
-		Iterator iter = tabmap.keySet().iterator();
+		Iterator<String> iter = tabmap.keySet().iterator();
 		while (iter.hasNext())
 		{
 			String name = (String) iter.next();

+ 211 - 20
Apex/src/com/usai/apex/DetailFragment.java

@@ -1,42 +1,233 @@
 package com.usai.apex;
 
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import com.usai.util.commonUtil;
+
+import android.content.res.AssetManager;
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
-import android.text.Html;
-import android.text.method.LinkMovementMethod;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.View.OnClickListener;
 import android.view.ViewGroup;
 import android.webkit.WebView;
+import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
-public class DetailFragment extends Fragment
+public class DetailFragment extends Fragment implements OnClickListener
 {
+	LinearLayout ll_root;
+	String mimeType = "text/html";
+	
+	HashMap<Integer, Integer> control = new HashMap<Integer, Integer>() ;
 
 	@Override
 	public View onCreateView(LayoutInflater inflater, ViewGroup container,
 			Bundle savedInstanceState)
 	{
 		View view = inflater.inflate(R.layout.detail_fragment, null);
-		String url = "<a href='http://www.google.com'>A1401330351H.pdf</a>";
-		
-		
-		String url1="<table border=1><tr><th>Test A</th><th>Test b</th></tr><tr><td>a</td><td>b</td></tr></table>";
-        TextView t2 = (TextView) view.findViewById(R.id.text2);
-        t2.setMovementMethod(LinkMovementMethod.getInstance());
-        TextView t1 = (TextView) view.findViewById(R.id.textView1);
-        
-        t1.setText(Html.fromHtml(url1));
-        t1.setMovementMethod(LinkMovementMethod.getInstance());
-        
-        
-        final String mimeType = "text/html";	
-        WebView wv;
-        
-        wv = (WebView) view.findViewById(R.id.webView1);
-        wv.loadData(url1, mimeType, null);
+
+		ll_root = (LinearLayout) view.findViewById(R.id.ll_root);
+
+		// TextView tv= new TextView(getActivity());
+		// tv.setText("test12345");
+		//
+		// ll_root.addView(tv);
+
+		String jstr = null;
+		AssetManager am = null;
+		am = getActivity().getAssets();
+		try
+		{
+			String TAG = "DetailFragment fake json";
+			InputStream is = am.open("detail.json");
+
+			BufferedReader br = new BufferedReader(new InputStreamReader(is,
+					"utf-8"), 8);
+			StringBuilder sb = new StringBuilder();
+			String line = null;
+			while ((line = br.readLine()) != null)
+			{
+				sb.append(line + "\n");
+			}
+
+			Log.d(TAG, "Response: content begin");
+			Log.d(TAG, sb.toString());
+			Log.d(TAG, "Response: content end");
+
+			if (sb.length() <= 0)
+			{
+
+				jstr = null;
+			}
+			jstr = sb.toString();
+		}
+		catch (IOException e)
+		{
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+
+		init(jstr, inflater);
+		// String url = "<a href='http://www.google.com'>A1401330351H.pdf</a>";
+
+		// String
+		// url1="<table border=1><tr><th>Test A</th><th>Test b</th></tr><tr><td>a</td><td>b</td></tr></table>";
+		// TextView t2 = (TextView) view.findViewById(R.id.text2);
+		// t2.setMovementMethod(LinkMovementMethod.getInstance());
+		// TextView t1 = (TextView) view.findViewById(R.id.textView1);
+		//
+		// t1.setText(Html.fromHtml(url1));
+		// t1.setMovementMethod(LinkMovementMethod.getInstance());
+		//
+		//
+		// final
+		// WebView wv;
+		//
+		// wv = (WebView) view.findViewById(R.id.webView1);
+		// wv.loadData(url1, mimeType, null);
 
 		return view;
 	}
 
+	void init(String jstr, LayoutInflater inflater)
+	{
+		try
+		{
+			JSONObject jsonObj = new JSONObject(jstr);
+			int group_count = jsonObj.getInt("count");
+			for (int i = 0; i < group_count; i++)
+			{
+				// String key = (String) it.next();
+				// if (key.equals("result"))
+				// continue;
+				JSONObject groupobj = jsonObj.getJSONObject("group" + i);
+				View v = inflater.inflate(R.layout.group_tag, null);
+				v.setOnClickListener(this);
+			
+				TextView tvgroup = (TextView) v.findViewById(R.id.tv_group);
+				String group_name = groupobj.getString("_name");
+				tvgroup.setText(group_name);
+				v.setId(commonUtil.generateViewId());
+				ll_root.addView(v);
+				String grouptype = groupobj.getString("_type");
+//				groupobj.remove("_type");
+				if (grouptype.equals("mapping"))
+				{
+					LinearLayout mappingview = (LinearLayout) inflater.inflate(
+							R.layout.key_mapping, null);
+					mappingview.setId(commonUtil.generateViewId());
+					control.put(v.getId(), mappingview.getId());
+					ll_root.addView(mappingview);
+
+					int map_count = groupobj.getInt("_count");
+					for(int j=0;j<map_count;j++)
+					{
+//						String keygroup = (String) itgroup.next();
+						JSONObject itemobj= groupobj.getJSONObject("item"+j);
+						String key = (String)itemobj.keys().next();
+						String val = itemobj.getString(key);
+						LinearLayout mappingitem = (LinearLayout) inflater
+								.inflate(R.layout.keymapping_item, null);
+						TextView tvkey = (TextView) mappingitem
+								.findViewById(R.id.tv_key);
+						tvkey.setText(key);
+						// tvkey.setBackgroundResource(R.drawable.detail_item);
+						TextView tvval = (TextView) mappingitem
+								.findViewById(R.id.tv_value);
+						tvval.setText(val);
+						// tvval.setBackgroundResource(R.drawable.detail_item);
+						mappingview.addView(mappingitem);	
+					}
+//					Iterator itgroup = groupobj.keys();
+//					while (itgroup.hasNext())
+//					{
+//					
+//
+//					}
+				}
+				else
+					if (grouptype.equals("table"))
+					{
+						String content = groupobj.getString("content");
+						WebView wv;
+
+						wv = (WebView) inflater.inflate(R.layout.web_content,
+								null);
+						wv.setId(commonUtil.generateViewId());
+						control.put(v.getId(), wv.getId());
+						wv.loadData(content, mimeType, null);
+						ll_root.addView(wv);
+
+					}
+				if (grouptype.equals("list"))
+				{
+					LinearLayout listview = (LinearLayout) inflater.inflate(
+							R.layout.list_content, null);
+					listview.setId(commonUtil.generateViewId());
+					control.put(v.getId(), listview.getId());
+					ll_root.addView(listview);
+					long list_count = groupobj.getInt("_count");
+					for (int j = 0; j < list_count; j++)
+					{
+						RelativeLayout listitem = (RelativeLayout) inflater
+								.inflate(R.layout.list_item, null);
+
+						TextView tvitem = (TextView) listitem
+								.findViewById(R.id.tv_item);
+						String val=groupobj.getString("line"+j);
+						tvitem.setText(val);
+						// tvitem.setBackgroundResource(R.drawable.detail_item);
+						listitem.removeView(tvitem);
+
+						listview.addView(tvitem);
+					}
+//					Iterator itgroup = groupobj.keys();
+//					while (itgroup.hasNext())
+//					{
+//						String keygroup = (String) itgroup.next();
+//
+//					}
+				}
+				// String value = obj.getString(key);
+				// JSONArray array = obj.getJSONArray(key);
+				// for(int i=0;i<array.length();i++){
+				// JSONObject jsonobject = array.getJSONObject(i);
+				// jsonobject.put("name", key);
+				// jsonobject.put("exp", key+"="+jsonobject.getString("value"));
+				// newArray.put(jsonobject);
+
+			}
+			// Iterator it = jsonObj.keys();
+			// while (it.hasNext())
+			// {
+			//
+			// }
+		}
+		catch (JSONException e)
+		{
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+	@Override
+	public void onClick(View v)
+	{
+		View view = ll_root.findViewById(control.get(v.getId()));
+		if (view.getVisibility() == View.VISIBLE)
+			view.setVisibility(View.GONE);
+		else
+			view.setVisibility(View.VISIBLE);
+		
+	}
 }

+ 0 - 2
Apex/src/com/usai/apex/DragListView.java

@@ -4,7 +4,6 @@ import com.usai.apex.CustomizeFieldsActivity.DragListAdapter;
 import com.usai.apex.CustomizeFieldsActivity.fieldedit;
 
 import android.content.Context;
-import android.content.Intent;
 import android.graphics.Bitmap;
 import android.graphics.PixelFormat;
 import android.util.AttributeSet;
@@ -17,7 +16,6 @@ import android.view.WindowManager;
 import android.widget.AdapterView;
 import android.widget.ImageView;
 import android.widget.ListView;
-import android.widget.Toast;
 
 public class DragListView extends ListView
 {

+ 0 - 5
Apex/src/com/usai/apex/LoginFragment.java

@@ -2,13 +2,8 @@ package com.usai.apex;
 
 //import android.app.Fragment;
 
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
 import com.usai.util.Network;
 
-import android.R.integer;
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
 //import android.app.Fragment;

+ 0 - 2
Apex/src/com/usai/apex/ResultActivity.java

@@ -12,14 +12,12 @@ import com.usai.util.dbUtil;
 import android.os.AsyncTask;
 import android.os.Build;
 import android.os.Bundle;
-import android.R.integer;
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
 import android.app.Activity;
 import android.content.Intent;
 import android.database.Cursor;
 import android.database.sqlite.SQLiteDatabase;
-import android.graphics.Color;
 import android.util.Log;
 import android.view.ContextMenu;
 import android.view.Gravity;

+ 0 - 10
Apex/src/com/usai/apex/SearchActivity.java

@@ -2,13 +2,9 @@ package com.usai.apex;
 
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.Map;
-
 import com.usai.util.Network;
 import com.usai.util.dbUtil;
 
-import android.R.string;
-import android.nfc.Tag;
 import android.os.Bundle;
 import android.app.ListActivity;
 import android.content.Context;
@@ -21,21 +17,15 @@ import android.text.Editable;
 import android.text.InputType;
 import android.text.TextWatcher;
 import android.util.Log;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.View.OnClickListener;
-import android.view.inputmethod.EditorInfo;
-import android.view.inputmethod.InputMethodManager;
-import android.view.ViewGroup;
 import android.widget.Button;
 import android.widget.EditText;
 import android.widget.ListView;
 import android.widget.SimpleCursorAdapter;
 import android.widget.Switch;
-import android.widget.TextView;
 
 public class SearchActivity extends ListActivity implements OnClickListener
 {

+ 0 - 7
Apex/src/com/usai/apex/ServiceLocationFragment.java

@@ -11,18 +11,12 @@ import com.google.android.gms.maps.GoogleMap;
 import com.google.android.gms.maps.GoogleMap.OnInfoWindowClickListener;
 import com.google.android.gms.maps.GoogleMap.OnMarkerClickListener;
 import com.google.android.gms.maps.CameraUpdateFactory;
-import com.google.android.gms.maps.MapFragment;
 import com.google.android.gms.maps.SupportMapFragment;
 import com.google.android.gms.maps.model.CameraPosition;
 import com.google.android.gms.maps.model.LatLng;
-import com.google.android.gms.maps.model.LatLngBounds;
 import com.google.android.gms.maps.model.Marker;
 import com.google.android.gms.maps.model.MarkerOptions;
-import com.usai.util.Network;
-
-import android.annotation.SuppressLint;
 import android.content.Intent;
-import android.os.Build;
 //import android.app.Fragment;
 //import android.app.FragmentManager;
 //import android.app.FragmentManager;
@@ -37,7 +31,6 @@ import android.support.v4.app.FragmentManager;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.Toast;
 
 public class ServiceLocationFragment extends Fragment implements
 		OnMarkerClickListener, OnInfoWindowClickListener

+ 0 - 2
Apex/src/com/usai/util/dbUtil.java

@@ -9,8 +9,6 @@ import android.database.sqlite.SQLiteDatabase;
 import android.database.sqlite.SQLiteDatabase.CursorFactory;
 import android.database.sqlite.SQLiteException;
 import android.net.Uri;
-import android.provider.ContactsContract;
-import android.telephony.PhoneNumberUtils;
 import android.util.Log;
 
 public class dbUtil