summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjtufs <sjtu_fs@outlook.com>2013-09-01 05:57:40 +0800
committersjtufs <sjtu_fs@outlook.com>2013-09-01 05:57:40 +0800
commit49d2e9d74fbf95e5b287dc8e9179e8d3d977a527 (patch)
tree57c672ed1bb809ed1bea8c852f61f464c5c1b74c
parent0410d0b9c6bb502f8467c3f2c62183e9a74e69fc (diff)
stable version
-rw-r--r--client/Piztor/AndroidManifest.xml7
-rw-r--r--client/Piztor/project.properties2
-rw-r--r--client/Piztor/res/drawable/circle_blue.pngbin1070 -> 3236 bytes
-rw-r--r--client/Piztor/res/drawable/circle_glass.pngbin1173 -> 3253 bytes
-rw-r--r--client/Piztor/res/drawable/circle_green.pngbin1079 -> 3242 bytes
-rw-r--r--client/Piztor/res/drawable/circle_metal.pngbin894 -> 3196 bytes
-rw-r--r--client/Piztor/res/drawable/circle_paper.pngbin965 -> 3187 bytes
-rw-r--r--client/Piztor/res/drawable/circle_tan.pngbin916 -> 3189 bytes
-rw-r--r--client/Piztor/res/drawable/circle_wood.pngbin1359 -> 3237 bytes
-rw-r--r--client/Piztor/res/drawable/circle_yellow.pngbin946 -> 3186 bytes
-rw-r--r--client/Piztor/res/layout/activity_login.xml2
-rw-r--r--client/Piztor/res/layout/activity_settings.xml15
-rw-r--r--client/Piztor/res/layout/activity_updateinfo.xml188
-rw-r--r--client/Piztor/res/layout/checkindialog.xml2
-rw-r--r--client/Piztor/res/layout/subscribe_item.xml26
-rw-r--r--client/Piztor/res/layout/subscribe_settings.xml22
-rw-r--r--client/Piztor/res/menu/update_info.xml9
-rw-r--r--client/Piztor/res/values/strings.xml34
-rw-r--r--client/Piztor/src/com/macaroon/piztor/AccountSettings.java5
-rw-r--r--client/Piztor/src/com/macaroon/piztor/AlertMaker.java16
-rw-r--r--client/Piztor/src/com/macaroon/piztor/AppMgr.java41
-rw-r--r--client/Piztor/src/com/macaroon/piztor/CopyMap.java50
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Infomation.java7
-rw-r--r--client/Piztor/src/com/macaroon/piztor/InitAct.java13
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Login.java19
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Main.java38
-rw-r--r--client/Piztor/src/com/macaroon/piztor/MainActivity.java133
-rw-r--r--client/Piztor/src/com/macaroon/piztor/MapMaker.java80
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Rlocation.java13
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Settings.java9
-rw-r--r--client/Piztor/src/com/macaroon/piztor/SubscribeSettings.java119
-rw-r--r--client/Piztor/src/com/macaroon/piztor/UpdateInfo.java141
-rw-r--r--client/Piztor/src/com/macaroon/piztor/myApp.java6
33 files changed, 532 insertions, 465 deletions
diff --git a/client/Piztor/AndroidManifest.xml b/client/Piztor/AndroidManifest.xml
index f81ece8..8e9973c 100644
--- a/client/Piztor/AndroidManifest.xml
+++ b/client/Piztor/AndroidManifest.xml
@@ -39,7 +39,7 @@
<uses-permission android:name="android.permission.ACCESS_GPS" />
<application
- android:name=".myApp"
+ android:name="com.macaroon.piztor.myApp"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
@@ -81,6 +81,11 @@
android:enabled="true"
android:process=":remote" >
</service>
+
+ <activity
+ android:name="com.macaroon.piztor.UpdateInfo"
+ android:label="@string/title_activity_update_info" >
+ </activity>
</application>
<supports-screens
diff --git a/client/Piztor/project.properties b/client/Piztor/project.properties
index b7c2081..ce39f2d 100644
--- a/client/Piztor/project.properties
+++ b/client/Piztor/project.properties
@@ -11,4 +11,4 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
-target=android-10
+target=android-18
diff --git a/client/Piztor/res/drawable/circle_blue.png b/client/Piztor/res/drawable/circle_blue.png
index 09c3658..d174635 100644
--- a/client/Piztor/res/drawable/circle_blue.png
+++ 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
index 826b2b7..d5dbec4 100644
--- a/client/Piztor/res/drawable/circle_glass.png
+++ b/client/Piztor/res/drawable/circle_glass.png
Binary files differ
diff --git a/client/Piztor/res/drawable/circle_green.png b/client/Piztor/res/drawable/circle_green.png
index ded6938..3ab51d4 100644
--- a/client/Piztor/res/drawable/circle_green.png
+++ b/client/Piztor/res/drawable/circle_green.png
Binary files differ
diff --git a/client/Piztor/res/drawable/circle_metal.png b/client/Piztor/res/drawable/circle_metal.png
index d84e1ad..07c72f0 100644
--- a/client/Piztor/res/drawable/circle_metal.png
+++ 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
index 973787d..b8d7b0d 100644
--- a/client/Piztor/res/drawable/circle_paper.png
+++ b/client/Piztor/res/drawable/circle_paper.png
Binary files differ
diff --git a/client/Piztor/res/drawable/circle_tan.png b/client/Piztor/res/drawable/circle_tan.png
index 27d10ad..667cc25 100644
--- a/client/Piztor/res/drawable/circle_tan.png
+++ 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
index ea18f7a..b2752de 100644
--- a/client/Piztor/res/drawable/circle_wood.png
+++ 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
index 7c1dfc7..c596806 100644
--- a/client/Piztor/res/drawable/circle_yellow.png
+++ b/client/Piztor/res/drawable/circle_yellow.png
Binary files differ
diff --git a/client/Piztor/res/layout/activity_login.xml b/client/Piztor/res/layout/activity_login.xml
index 232f1e7..c408a1d 100644
--- a/client/Piztor/res/layout/activity_login.xml
+++ b/client/Piztor/res/layout/activity_login.xml
@@ -76,7 +76,7 @@
android:layout_marginLeft="70.0dip"
android:layout_marginRight="70.0dip"
android:layout_marginTop="12.0dip"
- android:text="login"
+ android:text="@string/login"
android:layout_below="@id/user_layout" />
</RelativeLayout> \ No newline at end of file
diff --git a/client/Piztor/res/layout/activity_settings.xml b/client/Piztor/res/layout/activity_settings.xml
index 49e8dfe..e1712aa 100644
--- a/client/Piztor/res/layout/activity_settings.xml
+++ b/client/Piztor/res/layout/activity_settings.xml
@@ -16,14 +16,21 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:orientation="horizontal">
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_centerVertical="true"
+ android:layout_centerHorizontal="true"
+ >
<TextView
android:id="@+id/settings_GPSrefreshrate_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
+ android:gravity="center"
android:layout_marginTop="10dip"
- android:layout_marginLeft="60dip"
- android:text="GPS refresh rate"
+ android:text="@string/GPSrefreshrate"
android:textColor="@android:color/white"
android:textSize="20dip" />
<TextView
@@ -32,12 +39,12 @@
android:layout_height="wrap_content"
android:textSize="20dip"
android:layout_marginTop="10dip"
- android:layout_marginLeft="20dip"
+ android:layout_marginLeft="10dip"
android:layout_gravity="center_vertical"
android:textColor="@android:color/white"
android:layout_toRightOf="@+id/settings_GPSrefreshrate_text"
android:text="30s"/>
-
+ </LinearLayout>
</RelativeLayout>
<SeekBar
diff --git a/client/Piztor/res/layout/activity_updateinfo.xml b/client/Piztor/res/layout/activity_updateinfo.xml
index de9ecc6..5d0c66c 100644
--- a/client/Piztor/res/layout/activity_updateinfo.xml
+++ b/client/Piztor/res/layout/activity_updateinfo.xml
@@ -7,7 +7,7 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:layout_marginTop="20dip"
+ android:layout_marginTop="20dip"
android:orientation="vertical" >
<include layout="@layout/settings_headbar"></include>
@@ -17,105 +17,105 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dip"
- android:gravity="center"
+ android:gravity="center"
android:textSize="20dip"
android:textColor="#FFFFFF"
- android:text="haha"
- android:id="@+id/username_text" />
+ android:id="@+id/username" />
<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" />
+ 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" />
+ <TextView
+ android:id="@+id/nickname"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:layout_marginLeft="25dip"
+ android:layout_marginRight="25dip"
+ android:textSize="20dip"
+ android:ems="10" >
+ </TextView>
+ <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/password_old"
+ 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="@string/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: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" />
+ <EditText
+ android:id="@+id/password_new"
+ 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="@string/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: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
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_gravity="center"
+ android:gravity="center">
+ <Button
+ android:id="@+id/btn_submit"
+ 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="@string/submit"/>
+ </LinearLayout>
+
</LinearLayout>
</ScrollView> \ No newline at end of file
diff --git a/client/Piztor/res/layout/checkindialog.xml b/client/Piztor/res/layout/checkindialog.xml
index d72f223..b84404b 100644
--- a/client/Piztor/res/layout/checkindialog.xml
+++ b/client/Piztor/res/layout/checkindialog.xml
@@ -8,7 +8,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
- android:text="Checking in..."
+ android:text="正在签到..."
android:id="@+id/checkin_info"/>
<ProgressBar
diff --git a/client/Piztor/res/layout/subscribe_item.xml b/client/Piztor/res/layout/subscribe_item.xml
index 902da5a..2d53865 100644
--- a/client/Piztor/res/layout/subscribe_item.xml
+++ b/client/Piztor/res/layout/subscribe_item.xml
@@ -4,33 +4,39 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal">
+ <View
+ android:id="@+id/seperator"
+ android:layout_width="fill_parent"
+ android:layout_height="1.0px"
+ android:layout_alignParentTop="true"
+ android:layout_marginTop="10dip"
+ android:layout_marginBottom="10dip"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:background="#ffc0c3c4" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView1"
+ android:layout_below="@+id/seperator"
android:textSize="20dip"
android:layout_marginLeft="10dip"
android:layout_alignParentLeft="true"
android:text="company section"/>
<Button
- android:text="remove"
+ android:text="@string/remove"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="10dip"
+ android:paddingTop="3dip"
+ android:paddingBottom="3dip"
+ android:layout_below="@+id/seperator"
android:textColor="#FFFFFF"
android:background="#DB4437"
android:id="@+id/button_delete"
android:textSize="20dip"
/>
- <View
- android:layout_width="fill_parent"
- android:layout_height="1.0px"
- android:layout_below="@+id/button_delete"
- android:layout_marginTop="20dip"
- android:layout_marginBottom="20dip"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:background="#ffc0c3c4" />
+
</RelativeLayout>
diff --git a/client/Piztor/res/layout/subscribe_settings.xml b/client/Piztor/res/layout/subscribe_settings.xml
index c27e3c8..1bfd975 100644
--- a/client/Piztor/res/layout/subscribe_settings.xml
+++ b/client/Piztor/res/layout/subscribe_settings.xml
@@ -4,6 +4,14 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/textView1"
+ android:text="TextView"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:layout_marginBottom="10dp"/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -16,7 +24,7 @@
android:layout_alignParentLeft="true"
android:layout_marginLeft="10dip"
android:textSize="20dip"
- android:hint="company"
+ android:hint="@string/company"
android:phoneNumber="true"
android:id="@+id/subscribe_company"/>
<EditText
@@ -25,7 +33,7 @@
android:layout_marginLeft="10dip"
android:layout_toRightOf="@+id/subscribe_company"
android:textSize="20dip"
- android:hint="section"
+ android:hint="@string/section"
android:phoneNumber="true"
android:id="@+id/subscribe_section"/>
<Button
@@ -33,7 +41,7 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="10dip"
- android:text="add"
+ android:text="@string/add"
android:textColor="#FFFFFF"
android:background="#0F9D58"
android:textSize="20dip"
@@ -55,12 +63,4 @@
android:focusable="true">
</ListView>
</LinearLayout>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/textView1"
- android:text="TextView"
- android:layout_alignParentBottom="true"
- android:layout_centerHorizontal="true"
- android:layout_marginBottom="10dp"/>
</LinearLayout>
diff --git a/client/Piztor/res/menu/update_info.xml b/client/Piztor/res/menu/update_info.xml
new file mode 100644
index 0000000..c002028
--- /dev/null
+++ b/client/Piztor/res/menu/update_info.xml
@@ -0,0 +1,9 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item
+ android:id="@+id/action_settings"
+ android:orderInCategory="100"
+ android:showAsAction="never"
+ android:title="@string/action_settings"/>
+
+</menu>
diff --git a/client/Piztor/res/values/strings.xml b/client/Piztor/res/values/strings.xml
index 8752b0d..7cf728c 100644
--- a/client/Piztor/res/values/strings.xml
+++ b/client/Piztor/res/values/strings.xml
@@ -4,11 +4,11 @@
<string name="app_name">Piztor</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
- <string name="settings">Settings</string>
- <string name="search">Search</string>
- <string name="fetch">Fetch</string>
- <string name="checkin">Checkin</string>
- <string name="focus">Focus</string>
+ <string name="settings">设置</string>
+ <string name="search">搜索</string>
+ <string name="fetch">获取</string>
+ <string name="checkin">签到</string>
+ <string name="focus">聚焦</string>
<string name="show_sex">Show sex: </string>
<string name="male">Male</string>
<string name="female">Female</string>
@@ -18,15 +18,25 @@
<string name="title_activity_login">Login</string>
<string name="title_activity_main">Main</string>
<string name="title_activity_settings">Settings</string>
- <string name="password">password</string>
- <string name="username">username</string>
- <string name="login">login</string>
+ <string name="password">密码</string>
+ <string name="username">用户名</string>
+ <string name="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">Check &amp; Update</string>
+ <string name="logout">注销</string>
+ <string name="update_info">修改密码</string>
+ <string name="subscribe_info">关注信息</string>
+ <string name="change">查看及修改</string>
<string name="title_activity_subscribesettings">SubscribeSettings</string>
<string name="title_activity_subscribe_settings">SubscribeSettings</string>
+ <string name="title_activity_update_info">UpdateInfo</string>
+ <string name="cancel">取消</string>
+ <string name="remove">移除</string>
+ <string name="company">连队</string>
+ <string name="section">班级</string>
+ <string name="add">添加</string>
+ <string name="GPSrefreshrate">GPS刷新率</string>
+ <string name="old_password">旧密码</string>
+ <string name="new_password">新密码</string>
+ <string name="submit">提交</string>
</resources>
diff --git a/client/Piztor/src/com/macaroon/piztor/AccountSettings.java b/client/Piztor/src/com/macaroon/piztor/AccountSettings.java
deleted file mode 100644
index 150bc64..0000000
--- a/client/Piztor/src/com/macaroon/piztor/AccountSettings.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.macaroon.piztor;
-
-public class AccountSettings extends PiztorAct{
-
-}
diff --git a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
index 7e36310..bc8e138 100644
--- a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
+++ b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
@@ -70,16 +70,16 @@ public class AlertMaker {
closeBoard(context);
AlertDialog.Builder gpsDialog = new AlertDialog.Builder(context);
- gpsDialog.setTitle("GPS settings");
- gpsDialog.setMessage("GPS is not enabled. Please turn it on.");
- gpsDialog.setPositiveButton("Settings",
+ gpsDialog.setTitle("GPS设置");
+ gpsDialog.setMessage("GPS未开启,是否前去打开?");
+ gpsDialog.setPositiveButton("设置",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
context.startActivity(intent);
}
});
- gpsDialog.setNegativeButton("Go without GPS",
+ gpsDialog.setNegativeButton("不使用GPS",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
@@ -131,7 +131,7 @@ public class AlertMaker {
Log.d("marker", "marker alert calls drawmarker");
} else if (!flag) {
Toast toast = Toast.makeText(context,
- "Too early! Give me at least 2 minutes!", Toast.LENGTH_LONG);
+ "太早了!多给一点时间", Toast.LENGTH_LONG);
toast.show();
closeBoard(context);
showMarkerAlert(markerPoint);
@@ -149,7 +149,7 @@ public class AlertMaker {
LayoutInflater infaler = LayoutInflater.from(context);
final LinearLayout layout = (LinearLayout)infaler.inflate(R.layout.checkindialog, null);
checkinDialog.setView(layout);
- checkinDialog.setNeutralButton("cancel", new DialogInterface.OnClickListener() {
+ checkinDialog.setNeutralButton("取消", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
InputMethodManager im = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
im.hideSoftInputFromWindow(layout.getWindowToken(), 0);
@@ -171,10 +171,10 @@ public class AlertMaker {
//TODO
pbar.setVisibility(View.GONE);
mapMaker.removeMarker();
- Toast toast = Toast.makeText(context, "Marker checked!", 2000);
+ Toast toast = Toast.makeText(context, "已签到!", 2000);
toast.setGravity(Gravity.TOP, 0, 80);
toast.show();
- checkinInfo.setText("Success!");
+ checkinInfo.setText("成功!");
}
}.start();
}
diff --git a/client/Piztor/src/com/macaroon/piztor/AppMgr.java b/client/Piztor/src/com/macaroon/piztor/AppMgr.java
index f1a3445..a7f1af0 100644
--- a/client/Piztor/src/com/macaroon/piztor/AppMgr.java
+++ b/client/Piztor/src/com/macaroon/piztor/AppMgr.java
@@ -1,11 +1,10 @@
package com.macaroon.piztor;
import java.util.HashMap;
-import java.util.HashSet;
+import java.util.Stack;
import android.annotation.SuppressLint;
import android.content.Intent;
-import com.baidu.mapapi.BMapManager;
@SuppressLint("UseSparseArrays")
public class AppMgr {
@@ -18,31 +17,33 @@ public class AppMgr {
final static int logout = 106;
final static int subscribe = 107;
final static int account = 108;
+ final static int finish = 109;
+
public enum ActivityStatus {
create, start, resume, restart, stop, pause, destroy
}
+
myApp app;
HashMap<Class<?>, HashMap<Integer, Class<?>>> mp;
- HashSet<PiztorAct> acts;
+ Stack<PiztorAct> acts;
ActivityStatus status;
PiztorAct nowAct;
void addAct(PiztorAct act) {
if (acts == null)
- acts = new HashSet<PiztorAct>();
- acts.add(act);
+ acts = new Stack<PiztorAct>();
+ acts.push(act);
}
- void removeAct(PiztorAct act) {
- if (acts.contains(act))
- acts.remove(act);
- else
- System.out.println("Piztor has a bug!!!!");
- }
+ /*
+ * void removeAct(PiztorAct act) { if (acts.contains(act)) acts.remove(act);
+ *