summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjtufs <sjtu_fs@outlook.com>2013-08-30 22:33:16 +0800
committersjtufs <sjtu_fs@outlook.com>2013-08-30 22:33:16 +0800
commit6f38860cd5907501d90eb5518ac42978d7dec834 (patch)
tree6c461b109242e8c0bb59d1f1a1a0373261e8d88a
parent04cd785f24d779996df8672938372467af6c9a82 (diff)
update
-rw-r--r--client/Piztor/res/drawable/circle_blue.pngbin0 -> 1070 bytes
-rw-r--r--client/Piztor/res/drawable/circle_glass.pngbin0 -> 1173 bytes
-rw-r--r--client/Piztor/res/drawable/circle_metal.pngbin0 -> 894 bytes
-rw-r--r--client/Piztor/res/drawable/circle_paper.pngbin0 -> 965 bytes
-rw-r--r--client/Piztor/res/drawable/circle_red.pngbin690 -> 892 bytes
-rw-r--r--client/Piztor/res/drawable/circle_tan.pngbin0 -> 916 bytes
-rw-r--r--client/Piztor/res/drawable/circle_wood.pngbin0 -> 1359 bytes
-rw-r--r--client/Piztor/res/drawable/circle_yellow.pngbin0 -> 946 bytes
-rw-r--r--client/Piztor/res/drawable/footbar_checkin.pngbin3251 -> 1639 bytes
-rw-r--r--client/Piztor/res/layout/activity_settings.xml246
-rw-r--r--client/Piztor/res/layout/activity_updateinfo.xml121
-rw-r--r--client/Piztor/res/layout/main_footbar.xml10
-rw-r--r--client/Piztor/res/layout/settings_headbar.xml4
-rw-r--r--client/Piztor/res/values/strings.xml4
-rw-r--r--client/Piztor/src/com/macaroon/piztor/AlertMaker.java24
-rw-r--r--client/Piztor/src/com/macaroon/piztor/AppMgr.java8
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Convert.java63
-rw-r--r--client/Piztor/src/com/macaroon/piztor/EException.java75
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Infomation.java8
-rw-r--r--client/Piztor/src/com/macaroon/piztor/InitAct.java9
-rw-r--r--client/Piztor/src/com/macaroon/piztor/LogInfo.java12
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Login.java27
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Main.java227
-rw-r--r--client/Piztor/src/com/macaroon/piztor/MainActivity.java133
-rw-r--r--client/Piztor/src/com/macaroon/piztor/MapInfo.java9
-rw-r--r--client/Piztor/src/com/macaroon/piztor/MapMaker.java85
-rw-r--r--client/Piztor/src/com/macaroon/piztor/PushClient.java106
-rw-r--r--client/Piztor/src/com/macaroon/piztor/RGroup.java10
-rw-r--r--client/Piztor/src/com/macaroon/piztor/RUserInfo.java22
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Req.java100
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ReqLocation.java16
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ReqLogin.java16
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ReqLogout.java12
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ReqSendMessage.java14
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ReqStartPush.java12
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ReqUpdate.java16
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ReqUserInfo.java15
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ReqUserinfo.java15
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Res.java141
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ResLocation.java18
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ResLogin.java17
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ResLogout.java13
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ResPushLocation.java18
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ResPushMessage.java15
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ResSendMessage.java13
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ResStartPush.java13
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ResUpdate.java13
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ResUserInfo.java22
-rw-r--r--client/Piztor/src/com/macaroon/piztor/ResUserinfo.java20
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Settings.java131
-rw-r--r--client/Piztor/src/com/macaroon/piztor/SocketClient.java373
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Transam.java219
-rw-r--r--client/Piztor/src/com/macaroon/piztor/UpdateInfo.java5
53 files changed, 1418 insertions, 1032 deletions
diff --git a/client/Piztor/res/drawable/circle_blue.png b/client/Piztor/res/drawable/circle_blue.png
new file mode 100644
index 0000000..09c3658
--- /dev/null
+++ b/client/Piztor/res/drawable/circle_blue.png
Binary files differ
diff --git a/client/Piztor/res/drawable/circle_glass.png b/client/Piztor/res/drawable/circle_glass.png
new file mode 100644
index 0000000..826b2b7
--- /dev/null
+++ b/client/Piztor/res/drawable/circle_glass.png
Binary files differ
diff --git a/client/Piztor/res/drawable/circle_metal.png b/client/Piztor/res/drawable/circle_metal.png
new file mode 100644
index 0000000..d84e1ad
--- /dev/null
+++ b/client/Piztor/res/drawable/circle_metal.png
Binary files differ
diff --git a/client/Piztor/res/drawable/circle_paper.png b/client/Piztor/res/drawable/circle_paper.png
new file mode 100644
index 0000000..973787d
--- /dev/null
+++ b/client/Piztor/res/drawable/circle_paper.png
Binary files differ
diff --git a/client/Piztor/res/drawable/circle_red.png b/client/Piztor/res/drawable/circle_red.png
index 034cea8..fd0efb1 100644
--- a/client/Piztor/res/drawable/circle_red.png
+++ b/client/Piztor/res/drawable/circle_red.png
Binary files differ
diff --git a/client/Piztor/res/drawable/circle_tan.png b/client/Piztor/res/drawable/circle_tan.png
new file mode 100644
index 0000000..27d10ad
--- /dev/null
+++ b/client/Piztor/res/drawable/circle_tan.png
Binary files differ
diff --git a/client/Piztor/res/drawable/circle_wood.png b/client/Piztor/res/drawable/circle_wood.png
new file mode 100644
index 0000000..ea18f7a
--- /dev/null
+++ b/client/Piztor/res/drawable/circle_wood.png
Binary files differ
diff --git a/client/Piztor/res/drawable/circle_yellow.png b/client/Piztor/res/drawable/circle_yellow.png
new file mode 100644
index 0000000..7c1dfc7
--- /dev/null
+++ b/client/Piztor/res/drawable/circle_yellow.png
Binary files differ
diff --git a/client/Piztor/res/drawable/footbar_checkin.png b/client/Piztor/res/drawable/footbar_checkin.png
index 0a4b148..f514613 100644
--- a/client/Piztor/res/drawable/footbar_checkin.png
+++ b/client/Piztor/res/drawable/footbar_checkin.png
Binary files differ
diff --git a/client/Piztor/res/layout/activity_settings.xml b/client/Piztor/res/layout/activity_settings.xml
index 865cbc6..3bd6fef 100644
--- a/client/Piztor/res/layout/activity_settings.xml
+++ b/client/Piztor/res/layout/activity_settings.xml
@@ -11,121 +11,157 @@
<include layout="@layout/settings_headbar"></include>
- <TextView
- android:id="@+id/settings_GPSrefreshrate_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_marginTop="10dip"
- android:text="GPS refresh rate"
- android:textColor="@android:color/white"
- android:textSize="20dip" />
-
+ <RelativeLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dip"
+ android:orientation="horizontal">
+ <TextView
+ android:id="@+id/settings_GPSrefreshrate_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginTop="10dip"
+ android:layout_marginLeft="60dip"
+ android:text="GPS refresh rate"
+ android:textColor="@android:color/white"
+ android:textSize="20dip" />
+ <TextView
+ android:id="@+id/settings_GPSrefreshrate"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="20dip"
+ android:layout_marginTop="10dip"
+ android:layout_marginLeft="20dip"
+ android:layout_gravity="center_vertical"
+ android:textColor="@android:color/white"
+ android:layout_toRightOf="@+id/settings_GPSrefreshrate_text"
+ android:text="30s"/>
+
+ </RelativeLayout>
+
<SeekBar
- android:id="@+id/settings_GPSrefreshrate"
+ android:id="@+id/settings_GPSrefreshrate_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:max="60"
+ android:progress="30"
+ android:paddingLeft="18px"
+ android:paddingRight="18px"
android:layout_marginLeft="40px"
android:layout_marginRight="40px" />
+ <RelativeLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="40dip"
+ android:layout_marginRight="40dip">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@android:color/white"
+ android:layout_alignParentLeft="true"
+ android:text="fast"
+ android:textSize="12dip"/>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@android:color/white"
+ android:layout_alignParentRight="true"
+ android:text="slow"
+ android:textSize="12dip"/>
+ </RelativeLayout>
+
<View
android:layout_width="fill_parent"
android:layout_height="1.0px"
- android:layout_marginTop="40px"
- android:layout_marginBottom="40px"
- android:layout_marginLeft="20.0px"
- android:layout_marginRight="20.0px"
+ android:layout_marginTop="20dip"
+ android:layout_marginBottom="20dip"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
android:background="#ffc0c3c4" />
- <Button
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Button 2" />
-
- <Button
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Button 3" />
-
- <Button
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Button 4" />
-
- <Button
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Button 5" />
-
- <ProgressBar
- android:id="@+id/progressBar1"
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- <RadioButton
- android:id="@+id/radioButton2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="RadioButton 1" />
-
- <RadioButton
- android:id="@+id/radioButton1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="RadioButton 2" />
-
- <ToggleButton
- android:id="@+id/toggleButton1"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="ToggleButton" />
-
- <Button
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Button 6" />
-
- <SeekBar
- android:id="@+id/seekBar1"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- <Button
- android:id="@+id/button3"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Button 7" />
-
- <Button
- android:id="@+id/button4"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Button 8" />
-
- <CheckBox
- android:id="@+id/checkBox1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="CheckBox" />
-
- <Button
- android:id="@+id/button2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Button 9" />
-
- <Button
- android:id="@+id/button1"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Button 10" />
-
- <Button
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Button 11"
- android:id="@+id/settings_btn_logout" />
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:textSize="30dip"
+ android:textColor="@android:color/white"
+ android:text="@string/subscribe_info"/>
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:layout_marginTop="20dip"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:orientation="horizontal">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="#4D4D4D"
+ android:textColor="#FFFFFF"
+ android:textSize="25dip"
+ android:text="company"
+ android:id="@+id/settings_subscribe_company"
+ />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="#4D4D4D"
+ android:textColor="#FFFFFF"
+ android:textSize="25dip"
+ android:layout_marginLeft="20dip"
+ android:text="section"
+ android:id="@+id/settings_subscribe_section"
+ />
+
+ <Button
+ android:id="@+id/settings_btn_subscribe"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="20dip"
+ android:text="@string/change"
+ android:textSize="22dip" />
+
+ </LinearLayout>
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1.0px"
+ android:layout_marginTop="20dip"
+ android:layout_marginBottom="20dip"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:background="#ffc0c3c4" />
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="50dip"
+ android:layout_marginRight="50dip"
+ android:orientation="vertical">
+ <Button
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="5dip"
+ android:paddingBottom="5dip"
+ android:text="@string/update_info"
+ android:textSize="30dip"
+ android:textColor="@android:color/white"
+ android:background="#4285F4"
+ android:id="@+id/settings_btn_updateinfo" />
+ <Button
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="5dip"
+ android:paddingBottom="5dip"
+ android:layout_marginTop="20dip"
+ android:text="@string/logout"
+ android:textSize="30dip"
+ android:textColor="@android:color/white"
+ android:background="#DB4437"
+ android:id="@+id/settings_btn_logout" />
+ </LinearLayout>
</LinearLayout>
-
</ScrollView> \ No newline at end of file
diff --git a/client/Piztor/res/layout/activity_updateinfo.xml b/client/Piztor/res/layout/activity_updateinfo.xml
new file mode 100644
index 0000000..de9ecc6
--- /dev/null
+++ b/client/Piztor/res/layout/activity_updateinfo.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content" >
+
+ <LinearLayout
+
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_marginTop="20dip"
+ android:orientation="vertical" >
+
+ <include layout="@layout/settings_headbar"></include>
+
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginTop="10dip"
+ android:gravity="center"
+ android:textSize="20dip"
+ android:textColor="#FFFFFF"
+ android:text="haha"
+ android:id="@+id/username_text" />
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1.0px"
+ android:layout_marginTop="10dip"
+ android:layout_marginBottom="20dip"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:background="#ffc0c3c4" />
+
+ <EditText
+ android:id="@+id/editText1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="25dip"
+ android:layout_marginRight="25dip"
+ android:hint=" new nickname"
+ android:ems="10" >
+ </EditText>
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1.0px"
+ android:layout_marginTop="20dip"
+ android:layout_marginBottom="20dip"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:background="#ffc0c3c4" />
+
+ <EditText
+ android:id="@+id/editText2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="25dip"
+ android:layout_marginRight="25dip"
+ android:ems="10"
+ android:inputType="textPassword"
+ android:hint=" * old password"/>
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="25dip"
+ android:layout_marginRight="25dip"
+ android:layout_marginBottom="10dip"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:textSize="14dip"
+ android:text="Must enter your current password"
+ android:textColor="#808080"/>
+
+ <EditText
+ android:id="@+id/editText3"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="25dip"
+ android:layout_marginRight="25dip"
+ android:ems="10"
+ android:inputType="textPassword"
+ android:hint=" new password"/>
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="25dip"
+ android:layout_marginRight="25dip"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:textSize="14dip"
+ android:text="Keep this blank if you don't want to change"
+ android:textColor="#808080"/>
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1.0px"
+ android:layout_marginTop="20dip"
+ android:layout_marginBottom="20dip"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:background="#ffc0c3c4" />
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_gravity="center"
+ android:gravity="center">
+ <Button
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:paddingLeft="30dip"
+ android:paddingRight="30dip"
+ android:paddingTop="4dip"
+ android:paddingBottom="4dip"
+ android:background="#0F9D58"
+ android:textColor="#FFFFFF"
+ android:textSize="25dip"
+ android:text="Submit"/>
+ </LinearLayout>
+
+ </LinearLayout>
+</ScrollView> \ No newline at end of file
diff --git a/client/Piztor/res/layout/main_footbar.xml b/client/Piztor/res/layout/main_footbar.xml
index b4659ff..287fb4f 100644
--- a/client/Piztor/res/layout/main_footbar.xml
+++ b/client/Piztor/res/layout/main_footbar.xml
@@ -6,7 +6,7 @@
android:background="@drawable/footbar_background" android:baselineAligned="false">
<LinearLayout
- android:id="@+id/footbar_btn_search_layout"
+ android:id="@+id/footbar_btn_checkin_layout"
android:layout_width="64dip"
android:layout_height="match_parent"
android:orientation="vertical"
@@ -14,21 +14,21 @@
android:layout_gravity="center_vertical"
android:layout_weight="1">
<ImageButton
- android:id="@+id/footbar_btn_search"
+ android:id="@+id/footbar_btn_checkin"
android:layout_width="90dip"
android:layout_height="30dip"
android:layout_gravity="center"
android:contentDescription="@string/desc"
- android:background="@drawable/footbar_btn_search_style"/>
+ android:background="@drawable/footbar_btn_checkin_style"/>
<TextView
- android:id="@+id/footbar_btn_search_text"
+ android:id="@+id/footbar_btn_checkin_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textSize="10dip"
android:textColor="@android:color/white"
android:layout_gravity="center"
- android:text="@string/search"/>
+ android:text="@string/checkin"/>
</LinearLayout>
<LinearLayout
diff --git a/client/Piztor/res/layout/settings_headbar.xml b/client/Piztor/res/layout/settings_headbar.xml
index 606c172..3063b66 100644
--- a/client/Piztor/res/layout/settings_headbar.xml
+++ b/client/Piztor/res/layout/settings_headbar.xml
@@ -5,14 +5,14 @@
android:background="@drawable/topbar_background"
android:id="@+id/settings_headbar_layout" >
- <ImageButton
+ <!-- ImageButton
android:id="@+id/settings_btn_back"
android:layout_width="110dip"
android:layout_height="40dip"
android:layout_marginLeft="0dip"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
- android:background="@drawable/navigation_back"/>
+ android:background="@drawable/navigation_back"/-->
<TextView
android:id="@+id/settings_headbar_text"
diff --git a/client/Piztor/res/values/strings.xml b/client/Piztor/res/values/strings.xml
index 192d392..6ff1392 100644
--- a/client/Piztor/res/values/strings.xml
+++ b/client/Piztor/res/values/strings.xml
@@ -21,5 +21,9 @@
<string name="username">username</string>
<string name="login">login</string>
<string name="desc">desc</string>
+ <string name="logout">Logout</string>
+ <string name="update_info">My Account</string>
+ <string name="subscribe_info">Subscribe information</string>
+ <string name="change">更改</string>
</resources>
diff --git a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
index 839813a..cc70e62 100644
--- a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
+++ b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
@@ -96,7 +96,7 @@ public class AlertMaker {
mapMaker.DrawMarker(markerPoint);
else {
Toast toast = Toast.makeText