Explorar el Código

将注销异常弹窗改为定时关闭,

hy %!s(int64=3) %!d(string=hace) años
padre
commit
113674aae6

+ 0 - 1
app/src/main/java/com/electric/chargingpile/activity/LoginActivity.java

@ -325,7 +325,6 @@ public class LoginActivity extends Activity implements View.OnClickListener {
325 325
                        showTextToast("密码错误,请重新输入");
326 326
                    }else{
327 327
                        String rtnMsg = JsonUtils.getKeyResult(response, "rtnMsg");
328
329 328
                        showTextToast(rtnMsg);
330 329
                    }
331 330
                }

+ 8 - 3
app/src/main/java/com/electric/chargingpile/activity/RegisterActivity.java

@ -578,6 +578,10 @@ public class RegisterActivity extends Activity implements OnClickListener {
578 578
                    Log.e("url handler", "handleMessage: ");
579 579
                    Toast.makeText(RegisterActivity.this, "服务器处理错误", Toast.LENGTH_SHORT).show();
580 580
                    break;
581
                case 4:
582
                    String error = (String) msg.obj;
583
                    Toast.makeText(RegisterActivity.this, error+"", Toast.LENGTH_SHORT).show();
584
                    break;
581 585
                default:
582 586

583 587
                    break;
@ -706,11 +710,11 @@ public class RegisterActivity extends Activity implements OnClickListener {
706 710
                return;
707 711
            }
708 712
            response = OkHttpUtil.execute(request);
709
            Log.e("url json ---->", response.body().string());
713
            String responseStr = response.body().string();
710 714
            if (response.code() == 200) {
711 715
                String json = "";
712 716
                try {
713
                    json = response.body().string();
717
                    json = responseStr;
714 718
                    Message msg = new Message();
715 719
                    msg.obj = json;
716 720
                    msg.what = 1;
@ -726,7 +730,8 @@ public class RegisterActivity extends Activity implements OnClickListener {
726 730
                }
727 731
            }else{
728 732
                Message msg = new Message();
729
                msg.what = 3;
733
                msg.what = 4;
734
                msg.obj =responseStr;
730 735
                handler.sendMessage(msg);
731 736
            }
732 737
        } catch (Exception e) {

+ 3 - 2
app/src/main/java/com/electric/chargingpile/view/StateDialog.java

@ -76,12 +76,13 @@ public class StateDialog {
76 76
        return this;
77 77
    }
78 78
    public void show() {
79
        mDialog.show();
80 79
        stateText.postDelayed(()->{
81 80
            if (mDialog!=null && mDialog.isShowing()){
82 81
                mDialog.dismiss();
83 82
            }
84
        },2000);
83
        },1500);
84
85
        mDialog.show();
85 86
    }
86 87
87 88
}

+ 22 - 0
app/src/main/res/layout/activity_logout.xml

@ -145,6 +145,28 @@
145 145
                    android:textSize="12sp" />
146 146
147 147
            </LinearLayout>
148
            <LinearLayout
149
                android:padding="14dp"
150
                android:layout_width="match_parent"
151
                android:layout_height="wrap_content">
152
                <TextView
153
                    android:layout_gravity="center_vertical"
154
                    android:layout_width="wrap_content"
155
                    android:layout_height="wrap_content"
156
                    android:text="●"
157
                    android:textColor="@color/color_707070"
158
                    android:textSize="4dp"
159
                    />
160
161
                <TextView
162
                    android:layout_width="wrap_content"
163
                    android:layout_height="wrap_content"
164
                    android:layout_marginStart="6dp"
165
                    android:text="余额是否为0"
166
                    android:textColor="@color/color_707070"
167
                    android:textSize="12sp" />
168
169
            </LinearLayout>
148 170
            <View
149 171
                android:background="@color/color_f5f6f7"
150 172
                android:layout_marginEnd="14dp"