diff options
author | sjtufs <[email protected]> | 2013-09-03 16:07:42 +0800 |
---|---|---|
committer | sjtufs <[email protected]> | 2013-09-03 16:07:42 +0800 |
commit | cea9cded1837fbe9d1fafbf5689db10b2296116e (patch) | |
tree | 68abc0f3d58a9aa739cd161947598a1042d19a35 /client/Piztor | |
parent | e52889f656592cd5afb09439c112f5ad44a110dc (diff) |
game version. tested well todaygame
Diffstat (limited to 'client/Piztor')
-rw-r--r-- | client/Piztor/res/layout/activity_login.xml | 2 | ||||
-rw-r--r-- | client/Piztor/src/com/macaroon/piztor/AlertMaker.java | 1 | ||||
-rw-r--r-- | client/Piztor/src/com/macaroon/piztor/Login.java | 13 | ||||
-rw-r--r-- | client/Piztor/src/com/macaroon/piztor/Main.java | 19 | ||||
-rw-r--r-- | client/Piztor/src/com/macaroon/piztor/MapMaker.java | 4 | ||||
-rw-r--r-- | client/Piztor/src/com/macaroon/piztor/myApp.java | 4 |
6 files changed, 25 insertions, 18 deletions
diff --git a/client/Piztor/res/layout/activity_login.xml b/client/Piztor/res/layout/activity_login.xml index 16b11a0..078dccf 100644 --- a/client/Piztor/res/layout/activity_login.xml +++ b/client/Piztor/res/layout/activity_login.xml @@ -30,12 +30,14 @@ android:gravity="center" android:text="@string/app_name" android:textSize="30dip" + android:id="@+id/login_app_name" android:textColor="#FFFFFF"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" + android:id="@+id/login_game_version" android:text="Game version" android:textSize="15dip" android:textStyle="italic" /> diff --git a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java index a8d1138..ed376c3 100644 --- a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java +++ b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java @@ -79,6 +79,7 @@ public class AlertMaker { public void onClick(DialogInterface dialog, int which) { Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); context.startActivity(intent); + dialog.cancel(); } }); gpsDialog.show(); diff --git a/client/Piztor/src/com/macaroon/piztor/Login.java b/client/Piztor/src/com/macaroon/piztor/Login.java index e86b543..6cdd966 100644 --- a/client/Piztor/src/com/macaroon/piztor/Login.java +++ b/client/Piztor/src/com/macaroon/piztor/Login.java @@ -16,6 +16,7 @@ import android.view.animation.Animation; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; +import android.widget.TextView; import android.widget.Toast; public class Login extends PiztorAct { @@ -108,12 +109,18 @@ public class Login extends PiztorAct { id = "login"; super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); - ImageView imageView = (ImageView) findViewById(R.id.login_img); + TextView textView = (TextView) findViewById(R.id.login_app_name); AlphaAnimation alphaUp = new AlphaAnimation(0.0f, 1.0f); alphaUp.setDuration(2000); - alphaUp.setStartOffset(500); + alphaUp.setStartOffset(200); alphaUp.setFillAfter(true); - imageView.startAnimation(alphaUp); + textView.startAnimation(alphaUp); + TextView textView1 = (TextView) findViewById(R.id.login_game_version); + AlphaAnimation alphaUp1 = new AlphaAnimation(0.0f, 1.0f); + alphaUp1.setDuration(2000); + alphaUp1.setStartOffset(1000); + alphaUp1.setFillAfter(true); + textView1.startAnimation(alphaUp1); } @Override diff --git a/client/Piztor/src/com/macaroon/piztor/Main.java b/client/Piztor/src/com/macaroon/piztor/Main.java index bd6d709..f62ed0c 100644 --- a/client/Piztor/src/com/macaroon/piztor/Main.java +++ b/client/Piztor/src/com/macaroon/piztor/Main.java @@ -156,11 +156,11 @@ public class Main extends PiztorAct { break; case -1: EException e = (EException) m.obj; - if (e.Etype == EException.EPushFailedException) - out.receiveMessage("网络不稳定~"); - else if (e.Etype == EException.ECheckinFailedException) + if (e.Etype == EException.ECheckinFailedException) out.receiveMessage("路点已过期!"); - else out.actMgr.trigger(AppMgr.logout); + else if (e.Etype == EException.EStatusFailedException) + out.appMgr.trigger(AppMgr.logout); + else out.receiveMessage("网络不稳定~"); default: break; } @@ -205,7 +205,7 @@ public class Main extends PiztorAct { void receiveMessage(String msg) { Toast toast = Toast.makeText(getApplicationContext(), msg, 5000); - toast.setGravity(Gravity.TOP, 0, 80); + toast.setGravity(Gravity.TOP, 0, 100); toast.show(); } @@ -252,19 +252,19 @@ public class Main extends PiztorAct { int TMP = location.getLocType(); if (TMP == 61) { Toast toast = Toast.makeText(Main.this, - "Piztor : 由GPS更新 (刷新时间" + GPSrefreshrate + "s)", 2000); + "Piztor : 由GPS更新 (刷新时间" + GPSrefreshrate + "s)", 1000); toast.setGravity(Gravity.TOP, 0, 80); toast.show(); } if (TMP == 161) { Toast toast = Toast.makeText(Main.this, - "Piztor : 由网络更新 (刷新时间" + GPSrefreshrate + "s)", 2000); + "Piztor : 由网络更新 (刷新时间" + GPSrefreshrate + "s)", 1000); toast.setGravity(Gravity.TOP, 0, 80); toast.show(); } if (TMP == 65) { Toast toast = Toast.makeText(Main.this, - "Piztor : 由缓存更新 (刷新时间" + GPSrefreshrate + "s)",2000); + "Piztor : 由缓存更新 (刷新时间" + GPSrefreshrate + "s)",1000); toast.setGravity(Gravity.TOP, 0, 80); toast.show(); } @@ -334,8 +334,6 @@ public class Main extends PiztorAct { mid = i.markerId; } } - //TODO - if (minDis > 15.0 || mid == -1) { Toast toast = Toast.makeText(Main.this, String.format("请靠近路标,现在距离%.2f米",minDis), 4000); @@ -425,7 +423,6 @@ public class Main extends PiztorAct { if (app.mapInfo.myInfo.level >= 2 && !app.gameStarted) { app.gameStarted = true; settingsText.setText("得分"); - //TODO ReqGameStart req = new ReqGameStart(app.token, app.username, System.currentTimeMillis(), 10 * 1000); transam.send(req); } diff --git a/client/Piztor/src/com/macaroon/piztor/MapMaker.java b/client/Piztor/src/com/macaroon/piztor/MapMaker.java index 18eb524..1951ea9 100644 --- a/client/Piztor/src/com/macaroon/piztor/MapMaker.java +++ b/client/Piztor/src/com/macaroon/piztor/MapMaker.java @@ -137,8 +137,8 @@ public class MapMaker { OverlayItem item = getItem(index); UserInfo tmpInfo = app.mapInfo.getUserInfo(itemToUser .get(item)); - String itemInfo = tmpInfo.company + "连" + tmpInfo.section - + "班 " + tmpInfo.nickname; + String itemInfo = tmpInfo.section + + "队 " + tmpInfo.nickname; popupText.setText(itemInfo); Bitmap bitmap = BMapUtil.getBitmapFromView(popupInfo); popLay.showPopup(bitmap, item.getPoint(), 32); diff --git a/client/Piztor/src/com/macaroon/piztor/myApp.java b/client/Piztor/src/com/macaroon/piztor/myApp.java index d8cdc9c..ba36eb0 100644 --- a/client/Piztor/src/com/macaroon/piztor/myApp.java +++ b/client/Piztor/src/com/macaroon/piztor/myApp.java @@ -14,8 +14,8 @@ public class myApp extends Application { BMapManager mBMapManager; boolean isExiting = false; boolean isLogout = false; - String ip = "202.120.7.4"; -// static String ip = "69.85.86.42"; +// String ip = "202.120.7.4"; + static String ip = "69.85.86.42"; // static String ip = "192.168.1.171"; int port = 2224; String token = null; |