ui优化.
This commit is contained in:
parent
4d7060bcd2
commit
ff16bd4f99
|
|
@ -60,7 +60,7 @@ android {
|
|||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a","arm64-v8a","x86"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a", "x86"
|
||||
}
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
|
@ -86,11 +86,11 @@ android {
|
|||
implementation 'com.google.android.material:material:1.3.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0' //OKHttp优化策略依赖
|
||||
implementation 'com.squareup.okio:okio:1.13.0'
|
||||
implementation 'org.greenrobot:eventbus:3.1.1'
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0' //OKHttp优化策略依赖
|
||||
implementation 'com.squareup.okio:okio:1.13.0'
|
||||
implementation 'org.greenrobot:eventbus:3.1.1'
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
|
||||
//配置glide图片加载框架
|
||||
implementation 'com.github.bumptech.glide:glide:3.7.0'
|
||||
|
|
|
|||
BIN
android/app/libs/cloudgamelibrary-2.4.115.aar
Normal file
BIN
android/app/libs/cloudgamelibrary-2.4.115.aar
Normal file
Binary file not shown.
Binary file not shown.
|
|
@ -72,7 +72,7 @@
|
|||
|
||||
<receiver
|
||||
android:name="com.zjrx.common.reciver.UsbDeviceReciver"
|
||||
android:exported="false">
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
|
||||
<receiver
|
||||
android:name="com.zjrx.common.reciver.BluetoothReciver"
|
||||
android:exported="false">
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
|
||||
|
|
|
|||
|
|
@ -131,14 +131,14 @@ public class PlayGameActivity extends Activity {
|
|||
private String isReconPlay = "false";//是否是重连游戏
|
||||
public boolean btn_right_close = false;//右边摇杆是否关闭
|
||||
public int virtual_mode = 1;//1表示虚拟手柄,2表示自定义虚拟手柄,3表示虚拟键盘,4表示自定义虚拟键盘
|
||||
public int shubiao_mode = 2;//鼠标模式 1=点击模式 2=滑屏点击
|
||||
public int shubiao_mode = 1;//鼠标模式 1=点击模式 2=滑屏点击
|
||||
//操控输入
|
||||
tController player1 = new tController((byte) 0); //手柄
|
||||
MouseEvent mouseEvent = new MouseEvent(); //鼠标
|
||||
Timer keyEventTimer = null;
|
||||
TimerTask keyEventTimerTask = null;
|
||||
private boolean IsGameInput;//虚拟手柄
|
||||
private boolean IsKeyBoard;//虚拟键盘
|
||||
private boolean IsGameInput = true;//虚拟手柄
|
||||
private boolean IsKeyBoard = true;//虚拟键盘
|
||||
private boolean IsGameMouse;
|
||||
public int Ismode = 1;//1手柄 2键盘
|
||||
private boolean showKeyboard = false;
|
||||
|
|
@ -855,42 +855,42 @@ public class PlayGameActivity extends Activity {
|
|||
// setPictureQuality(10, speed5);
|
||||
// });
|
||||
handle1.setOnClickListener(v -> {
|
||||
if (IsGameInput) {
|
||||
handle1.setEnabled(false);
|
||||
handle1.setBackgroundResource(R.drawable.shape_blue_bg1);
|
||||
imgKeySet.setBackgroundResource(R.drawable.shape_blue_bg2);
|
||||
imgKeySet.setEnabled(true);
|
||||
if (MNKeyboard != null) {
|
||||
MNKeyboard.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (IsKeyBoard) {
|
||||
NetworkKeyboard.setVisibility(View.GONE);
|
||||
Ismode = 1;
|
||||
handle2.setEnabled(true);
|
||||
handle2.setBackgroundResource(R.drawable.bg_border_performance);
|
||||
custom_button_yg.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
// if (IsGameInput) {
|
||||
handle1.setEnabled(false);
|
||||
handle1.setBackgroundResource(R.drawable.shape_blue_bg1);
|
||||
imgKeySet.setBackgroundResource(R.drawable.shape_blue_bg2);
|
||||
imgKeySet.setEnabled(true);
|
||||
if (MNKeyboard != null) {
|
||||
MNKeyboard.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (IsKeyBoard) {
|
||||
NetworkKeyboard.setVisibility(View.GONE);
|
||||
Ismode = 1;
|
||||
handle2.setEnabled(true);
|
||||
handle2.setBackgroundResource(R.drawable.bg_border_performance);
|
||||
custom_button_yg.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
// }
|
||||
});
|
||||
handle2.setOnClickListener(v -> {
|
||||
if (IsKeyBoard) {
|
||||
handle2.setEnabled(false);
|
||||
handle2.setBackgroundResource(R.drawable.shape_blue_bg);
|
||||
NetworkKeyboard.setVisibility(View.VISIBLE);
|
||||
if (IsGameInput) {
|
||||
handle1.setBackgroundResource(R.drawable.bg_border_performance3);
|
||||
imgKeySet.setBackgroundResource(R.drawable.bg_border_performance4);
|
||||
handle1.setEnabled(true);
|
||||
imgKeySet.setEnabled(false);
|
||||
Ismode = 2;
|
||||
if (MNKeyboard != null) {
|
||||
MNKeyboard.setVisibility(View.GONE);
|
||||
}
|
||||
custom_button_yg.setVisibility(View.GONE);
|
||||
// if (IsKeyBoard) {
|
||||
handle2.setEnabled(false);
|
||||
handle2.setBackgroundResource(R.drawable.shape_blue_bg);
|
||||
NetworkKeyboard.setVisibility(View.VISIBLE);
|
||||
if (IsGameInput) {
|
||||
handle1.setBackgroundResource(R.drawable.bg_border_performance3);
|
||||
imgKeySet.setBackgroundResource(R.drawable.bg_border_performance4);
|
||||
handle1.setEnabled(true);
|
||||
imgKeySet.setEnabled(false);
|
||||
Ismode = 2;
|
||||
if (MNKeyboard != null) {
|
||||
MNKeyboard.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
custom_button_yg.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// }
|
||||
});
|
||||
handle3.setOnClickListener(v -> {
|
||||
if (shubiao_mode == 2) {
|
||||
|
|
@ -2639,6 +2639,54 @@ public class PlayGameActivity extends Activity {
|
|||
}
|
||||
|
||||
public void getGameSetting() {
|
||||
//有虚拟键盘
|
||||
if (IsKeyBoard) {
|
||||
//请求虚拟键盘
|
||||
//JSONArray keyboardList = new JSONArray(netHander.getGameVirKeyboard(PlayGameActivity.this));
|
||||
// netHander.getGameVirKeyboard(new DataResponseCallback<ResponseDao>() {
|
||||
// @Override
|
||||
// public void onResponseSuccess(ResponseDao response) {
|
||||
// if (response.getCode() == 0 && response.getResult() == 0) {
|
||||
// //JSONObject jo1 = null;
|
||||
// VirtualKey(response.getData().toString());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onResponseFail(String errorString) {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
mImageCursor.setVisibility(View.VISIBLE);
|
||||
mImageCursor.setFocusableInTouchMode(false);
|
||||
|
||||
handle3.setTextColor(getResources().getColor(R.color.white));
|
||||
// handle3.setBackgroundColor(getResources().getColor(R.color.handle2_gb));
|
||||
// handle4.setTextColor(getResources().getColor(R.color.colorAccent1));
|
||||
// handle4.setBackgroundColor(getResources().getColor(R.color.handle1_gb));
|
||||
|
||||
if (IsGameInput) {
|
||||
MNKeyboard.addView(handleView);
|
||||
NetworkKeyboard.setVisibility(View.GONE);
|
||||
Ismode = 1;
|
||||
// handle1.setBackgroundColor(getResources().getColor(R.color.handle1_gb));
|
||||
// handle2.setBackgroundColor(getResources().getColor(R.color.handle2_gb));
|
||||
handle2.setTextColor(Color.parseColor("#FFFFFF"));
|
||||
custom_button_yg.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
handle1.setEnabled(false);
|
||||
// handle1.setBackgroundColor(getResources().getColor(R.color.handle2_gb));
|
||||
handle1.setTextColor(Color.parseColor("#33FFFFFF"));
|
||||
|
||||
MNKeyboard.setVisibility(View.GONE);
|
||||
NetworkKeyboard.setVisibility(View.VISIBLE);
|
||||
Ismode = 2;
|
||||
// handle2.setBackgroundColor(getResources().getColor(R.color.handle1_gb));
|
||||
handle2.setTextColor(Color.parseColor("#FFFFFF"));
|
||||
custom_button_yg.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// netHander.getGameSetting(new DataResponseCallback<ResponseDao>() {
|
||||
// @Override
|
||||
|
|
@ -2735,16 +2783,16 @@ public class PlayGameActivity extends Activity {
|
|||
//
|
||||
// } else {
|
||||
// //没有虚拟键盘,直接加载默认手柄
|
||||
MNKeyboard.addView(handleView);
|
||||
NetworkKeyboard.setVisibility(View.GONE);
|
||||
|
||||
Ismode = 1;
|
||||
handle1.setBackgroundResource(R.drawable.shape_blue_bg1);
|
||||
imgKeySet.setBackgroundResource(R.drawable.shape_blue_bg2);
|
||||
handle2.setBackgroundResource(R.drawable.bg_border_performance2);
|
||||
handle2.setTextColor(Color.parseColor("#33FFFFFF"));
|
||||
handle3.setEnabled(false);
|
||||
handle4.setEnabled(false);
|
||||
// MNKeyboard.addView(handleView);
|
||||
// NetworkKeyboard.setVisibility(View.GONE);
|
||||
//
|
||||
// Ismode = 1;
|
||||
// handle1.setBackgroundResource(R.drawable.shape_blue_bg1);
|
||||
// imgKeySet.setBackgroundResource(R.drawable.shape_blue_bg2);
|
||||
//// handle2.setBackgroundResource(R.drawable.bg_border_performance2);
|
||||
//// handle2.setTextColor(Color.parseColor("#33FFFFFF"));
|
||||
// handle3.setEnabled(false);
|
||||
// handle4.setEnabled(false);
|
||||
// }
|
||||
//
|
||||
// } else {
|
||||
|
|
@ -2895,7 +2943,6 @@ public class PlayGameActivity extends Activity {
|
|||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
Log.i(TAG, "startGame onError: " + code + "| " + msg);
|
||||
// onGameError(code, msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -2991,7 +3038,7 @@ public class PlayGameActivity extends Activity {
|
|||
int userPlayGameTime = heartData.getInt("userPlayGameTime");//用户剩余游玩时间(分钟)
|
||||
int diamond = heartData.getInt("diamond");//钻石数
|
||||
|
||||
if (userPlayGameTime <= 1) {
|
||||
if (userPlayGameTime <= 3) {
|
||||
Toast.makeText(PlayGameActivity.this, "游玩时间不足,钻石耗尽将会自动退出游戏!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
|
|
@ -3011,45 +3058,11 @@ public class PlayGameActivity extends Activity {
|
|||
|
||||
}
|
||||
|
||||
private void closeGameNoTime(String errMessage, String errCategory) {
|
||||
closeGame();
|
||||
// new Thread() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// Config.is_CloseIng = true;
|
||||
// int count = 0;
|
||||
// Config.is_CloseGameHeartbeat = false;
|
||||
// while (!Config.is_CloseGameHeartbeat) {
|
||||
//
|
||||
// try {
|
||||
// Thread.sleep(60);
|
||||
// } catch (InterruptedException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// count++;
|
||||
// if (count == 1000) {
|
||||
// count = 0;
|
||||
// netHander.logErr(errMessage, errCategory, "sj");
|
||||
// closeGame();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }.start();
|
||||
}
|
||||
|
||||
|
||||
public void closeGame() {
|
||||
Log.d(TAG, "closeGame: ");
|
||||
ActivityCollector.removeActivity(this);
|
||||
// netHander.stopSession(Config.gamePara.sc_id);
|
||||
// Config.is_SolidHandle = String.valueOf(isHandelEnter());
|
||||
WhaleCloud.getInstance().stopGame();
|
||||
// Config.is_CloseGameHeartbeat = true;
|
||||
/*Intent intent = new Intent(this, MainActivity.class);
|
||||
intent.putExtra("GameType", "0");
|
||||
startActivity(intent);*/
|
||||
// EventBus.getDefault().post("ExitGame", EventBusParams.GAME);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3157,43 +3170,6 @@ public class PlayGameActivity extends Activity {
|
|||
//
|
||||
// }
|
||||
|
||||
//加入vip
|
||||
// private void showJoinVip() {
|
||||
// if (joinMembershipDialog != null) {
|
||||
// if (!joinMembershipDialog.isShowing()) {
|
||||
// joinMembershipDialog.show();
|
||||
// }
|
||||
// joinMembershipDialog.setJoinVip(new JoinMembershipDialog.JoinVip() {
|
||||
// @Override
|
||||
// public void pay(String data, String OrderCode, String price, String payType, String name, String productId) {
|
||||
// orderId = OrderCode;
|
||||
// payMoney = price;
|
||||
// payChannel = payType;
|
||||
// rechargeId = name;
|
||||
// ProductId = productId;
|
||||
// Pingpp.createPayment(PlayGameActivity.this, data);
|
||||
//
|
||||
//
|
||||
// try {
|
||||
// JSONObject ShowRecharge = new JSONObject();
|
||||
// ShowRecharge.put("recharge_type", "游戏内支付");
|
||||
// ShowRecharge.put("Front_page", Config.gamePara.game_key);
|
||||
// SensorsDataAPI.sharedInstance().track("Um_Event_ShowRecharge", ShowRecharge);
|
||||
// } catch (JSONException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void close() {
|
||||
// hideBottomUIMenu();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
public static int getNavigationBarHeight(Context var0) {
|
||||
boolean var1 = ViewConfiguration.get(var0).hasPermanentMenuKey();
|
||||
int var2;
|
||||
|
|
@ -3934,87 +3910,6 @@ public class PlayGameActivity extends Activity {
|
|||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
//支付页面返回处理
|
||||
// if (requestCode == Pingpp.REQUEST_CODE_PAYMENT) {
|
||||
// if (resultCode == Activity.RESULT_OK) {
|
||||
// String result = data.getExtras().getString("pay_result");
|
||||
// /* 处理返回值
|
||||
// * "success" - 支付
|
||||
// * 成功
|
||||
// * "fail" - 支付失败
|
||||
// * "cancel" - 取消支付
|
||||
// * "invalid" - 支付插件未安装(一般是微信客户端未安装的情况)
|
||||
// * "unknown" - app进程异常被杀死(一般是低内存状态下,app进程被杀死)
|
||||
// */
|
||||
// String errorMsg = data.getExtras().getString("error_msg"); // 错误信息
|
||||
// String extraMsg = data.getExtras().getString("extra_msg"); // 错误信息
|
||||
// switch (result) {
|
||||
// case "success":
|
||||
//
|
||||
// netHander.GetOrderStage2(orderId, QuickPaymentId);
|
||||
// netHander.logPay(payMoney, ProductId);
|
||||
//
|
||||
// showToast("支付成功");
|
||||
//
|
||||
// EventBus.getDefault().post("pay_success", EventBusParams.GAME);
|
||||
//
|
||||
// try {
|
||||
// JSONObject RechargeBuy = new JSONObject();
|
||||
// RechargeBuy.put("item_id", ProductId);
|
||||
// RechargeBuy.put("item_price", payMoney);
|
||||
// RechargeBuy.put("order_id", orderId);
|
||||
// RechargeBuy.put("recharge_id", rechargeId);
|
||||
// RechargeBuy.put("recharge_num", payMoney);
|
||||
// RechargeBuy.put("recharge_mode", payChannel);
|
||||
// RechargeBuy.put("recharge_type", "游戏内支付");
|
||||
// RechargeBuy.put("Front_page", Config.gamePara.game_key);
|
||||
//
|
||||
// SensorsDataAPI.sharedInstance().track("RechargeBuyFE", RechargeBuy);
|
||||
// } catch (JSONException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
//
|
||||
// conDiamond.setVisibility(View.GONE);
|
||||
// imgShowHide.setVisibility(View.GONE);
|
||||
// if (dialog != null) {
|
||||
// dialog.dismiss();
|
||||
// }
|
||||
// isInsufficientDialog = false;
|
||||
// if (refresh != null) {
|
||||
// refresh.cancel();
|
||||
// }
|
||||
//
|
||||
// break;
|
||||
// case "fail":
|
||||
// showToast("支付失败");
|
||||
// break;
|
||||
// case "cancel":
|
||||
// showToast("取消支付");
|
||||
//
|
||||
// try {
|
||||
// JSONObject ExisdRechargePage = new JSONObject();
|
||||
// ExisdRechargePage.put("B_Key_PageLowPosition", NetHander.B_Key_PageLowPosition);
|
||||
// ExisdRechargePage.put("WUID", CocosMethods.deviceId);
|
||||
// SensorsDataAPI.sharedInstance().track("Um_Event_ExisdRechargePage", ExisdRechargePage);
|
||||
// } catch (JSONException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// break;
|
||||
// case "invalid":
|
||||
// showToast("支付插件未安装");
|
||||
// break;
|
||||
// case "unknown":
|
||||
// showToast("系统异常,请重新启动app");
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// } else if (requestCode == 10012) {
|
||||
// String areaCode = data.getStringExtra("areaCode");
|
||||
// String name = data.getStringExtra("name");
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
public void showToast(final String toast) {
|
||||
|
|
|
|||
|
|
@ -127,14 +127,14 @@
|
|||
android:id="@+id/seting_g2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="scr_g2" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/seting_g3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="scr_g3" />
|
||||
|
||||
<!--g1-->
|
||||
|
|
@ -336,12 +336,12 @@
|
|||
android:layout_width="100dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="17dp"
|
||||
android:background="@drawable/bg_border_performance2"
|
||||
android:background="@drawable/bg_border_performance"
|
||||
android:gravity="center"
|
||||
android:text="虚拟键盘"
|
||||
android:textColor="#33FFFFFF"
|
||||
android:text="虚拟鼠标"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/img_key_set"
|
||||
app:layout_constraintLeft_toRightOf="@id/img_key_set"
|
||||
app:layout_constraintTop_toTopOf="@id/img_key_set" />
|
||||
|
|
@ -354,9 +354,9 @@
|
|||
android:layout_marginStart="38dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="鼠标模式"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
android:textColor="#FFA2A2A2"
|
||||
android:textSize="15sp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/handle1" />
|
||||
|
||||
|
|
@ -365,12 +365,12 @@
|
|||
android:layout_width="68dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/bg_border_performance2"
|
||||
android:background="@drawable/shape_blue_bg"
|
||||
android:gravity="center"
|
||||
android:text="点击模式"
|
||||
android:textColor="#33FFFFFF"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintLeft_toLeftOf="@id/operation8"
|
||||
app:layout_constraintTop_toBottomOf="@id/operation8" />
|
||||
|
||||
|
|
@ -379,12 +379,12 @@
|
|||
android:layout_width="68dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:background="@drawable/bg_border_performance2"
|
||||
android:background="@drawable/bg_border_performance"
|
||||
android:gravity="center"
|
||||
android:text="滑屏点击"
|
||||
android:textColor="#33FFFFFF"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintLeft_toRightOf="@+id/handle3"
|
||||
app:layout_constraintTop_toTopOf="@+id/handle3" />
|
||||
|
||||
|
|
@ -394,7 +394,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/handle1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/handle4">
|
||||
|
||||
|
|
@ -402,11 +402,10 @@
|
|||
android:id="@+id/tv_sensitivity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:gravity="center"
|
||||
android:text="鼠标灵敏度"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
android:textColor="#FFA2A2A2"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/sk_dpi"
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ class _GameInfoPageState extends State<GameInfoPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ class _GamePageState extends State<GamePage> with AutomaticKeepAliveClientMixin
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ class _GamePlaytimeState extends State<GamePlayTimePage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ class _MessageCenterPageState extends State<MessageCenterPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ class _MessageDetailsPageState extends State<MessageDetailsPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -116,8 +116,8 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -157,10 +157,9 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
SizedBox(
|
||||
width: size.width,
|
||||
height: h387,
|
||||
color: const Color(0xFFA4A4A4),
|
||||
child: Stack(
|
||||
children: [
|
||||
///banner
|
||||
|
|
@ -400,17 +399,10 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
!NetworkConfig.isChecking
|
||||
? GestureDetector(
|
||||
onTap: () {
|
||||
// EasyLoading.show(
|
||||
// indicator: Lottie.asset(
|
||||
// 'assets/animation/line_up.json',
|
||||
// repeat: true,
|
||||
// ),
|
||||
// );
|
||||
if (NetworkConfig.token == "") {
|
||||
Navigator.pushNamed(context, "/LoginPage");
|
||||
return;
|
||||
}
|
||||
|
||||
Navigator.pushNamed(context, "/MessageCenterPage").then((value) {
|
||||
_viewModel.getUserMessageNotReadCount();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ class _SearchPageState extends State<SearchPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
void _searchChanged(String str) {
|
||||
|
|
|
|||
|
|
@ -43,13 +43,15 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||
late StreamSubscription subscription;
|
||||
final HomeModel _viewModel = HomeModel();
|
||||
late Timer _timer;
|
||||
late BuildContext lineUpContext;
|
||||
// late BuildContext lineUpContext;
|
||||
|
||||
late ReconnectBean reconnectBean;
|
||||
bool isLineUp = false;
|
||||
|
||||
DateTime? _lastPressTime;
|
||||
|
||||
late OverlayEntry entry;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
|
|
@ -150,20 +152,19 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||
String gameId = event['gameId'];
|
||||
|
||||
if (!isLineUp) {
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (BuildContext context) {
|
||||
lineUpContext = context;
|
||||
return LineUpDialog(
|
||||
lineUpDialogKey,
|
||||
num: queueBean.queue_pos!,
|
||||
onTap: () {
|
||||
_timer.cancel();
|
||||
_viewModel.cancelQueue(gameId);
|
||||
},
|
||||
);
|
||||
});
|
||||
final overlay = Overlay.of(context);
|
||||
entry = OverlayEntry(builder: (BuildContext context) {
|
||||
return LineUpDialog(
|
||||
lineUpDialogKey,
|
||||
num: queueBean.queue_pos!,
|
||||
onTap: () {
|
||||
entry.remove();
|
||||
_timer.cancel();
|
||||
_viewModel.cancelQueue(gameId);
|
||||
},
|
||||
);
|
||||
});
|
||||
overlay.insert(entry);
|
||||
isLineUp = true;
|
||||
}
|
||||
|
||||
|
|
@ -190,7 +191,8 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||
///排队成功 开始游戏
|
||||
case "gameQueueSuccess":
|
||||
print("gameQueueSuccess");
|
||||
Navigator.pop(lineUpContext);
|
||||
entry.remove();
|
||||
// Navigator.pop(lineUpContext);
|
||||
_timer.cancel();
|
||||
_viewModel.playGame(NetworkConfig.gameId);
|
||||
break;
|
||||
|
|
@ -238,12 +240,12 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
super.dispose();
|
||||
_startGamesEvent.cancel();
|
||||
_tabSwitchEvent.cancel();
|
||||
_timer.cancel();
|
||||
_refreshUserEvent.cancel();
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void onPageChanged(int index) {
|
||||
|
|
|
|||
|
|
@ -62,11 +62,11 @@ class _LoginPageState extends State<LoginPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
super.dispose();
|
||||
_phoneController.dispose();
|
||||
_codeController.dispose();
|
||||
subscription.cancel();
|
||||
_timer?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
///获取验证码
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ class _EditInfoPageState extends State<EditInfoPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ class _FeedbackPageState extends State<FeedbackPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
_textController.dispose();
|
||||
_contactController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ class _GameHistoryPageState extends State<GameHistoryPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ class _MyCollectPageState extends State<MyCollectPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -79,9 +79,9 @@ class _MyPageState extends State<MyPage> with AutomaticKeepAliveClientMixin {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
_event.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ class _ExpensesPageState extends State<ExpensesPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ class _IncomePageState extends State<IncomePage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ class _AboutPageState extends State<AboutPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@ class _RealNamePageState extends State<RealNamePage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
_nameController.dispose();
|
||||
_codeController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -97,10 +97,10 @@ class _ShopPageState extends State<ShopPage> with AutomaticKeepAliveClientMixin
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
super.dispose();
|
||||
_paySuccess?.cancel();
|
||||
_refreshUserEvent.cancel();
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -133,8 +133,8 @@ class _StartPageState extends State<StartPage> {
|
|||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
subscription.cancel();
|
||||
super.dispose();
|
||||
subscription.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user