td class="lines-num lines-num-new">
15
import android.os.Bundle;
|
|
15
|
16
|
import android.os.Handler;
|
|
|
17
|
import android.os.Looper;
|
|
16
|
18
|
import android.os.Message;
|
|
|
19
|
|
|
|
20
|
import androidx.annotation.NonNull;
|
|
17
|
21
|
import androidx.appcompat.app.AlertDialog;
|
|
|
22
|
import androidx.core.content.FileProvider;
|
|
|
23
|
|
|
|
24
|
import android.os.Process;
|
|
18
|
25
|
import android.text.TextUtils;
|
|
19
|
26
|
import android.util.Log;
|
|
20
|
27
|
import android.view.Display;
|
|
|
@ -32,6 +39,8 @@ import android.widget.TextView;
|
|
32
|
39
|
import android.widget.Toast;
|
|
33
|
40
|
|
|
34
|
41
|
import com.alibaba.fastjson.JSON;
|
|
|
42
|
import com.blankj.utilcode.util.AppUtils;
|
|
|
43
|
import com.blankj.utilcode.util.LogUtils;
|
|
35
|
44
|
import com.electric.chargingpile.R;
|
|
36
|
45
|
import com.electric.chargingpile.application.MainApplication;
|
|
37
|
46
|
import com.electric.chargingpile.manager.ProfileManager;
|
|
|
@ -42,43 +51,59 @@ import com.electric.chargingpile.util.ImageTools;
|
|
42
|
51
|
import com.electric.chargingpile.util.JsonUtils;
|
|
43
|
52
|
import com.electric.chargingpile.util.LoadingDialog;
|
|
44
|
53
|
import com.electric.chargingpile.util.OkHttpUtil;
|
|
|
54
|
import com.electric.chargingpile.util.PhotoUtils;
|
|
|
55
|
import com.electric.chargingpile.util.ToastUtil;
|
|
|
56
|
import com.electric.chargingpile.view.AlertDialogUpdate;
|
|
|
57
|
import com.electric.chargingpile.view.UpdateDialog;
|
|
45
|
58
|
import com.squareup.okhttp.Request;
|
|
46
|
59
|
import com.squareup.okhttp.Response;
|
|
47
|
60
|
import com.umeng.analytics.MobclickAgent;
|
|
48
|
61
|
import com.zhy.http.okhttp.OkHttpUtils;
|
|
|
62
|
import com.zhy.http.okhttp.callback.FileCallBack;
|
|
49
|
63
|
import com.zhy.http.okhttp.callback.StringCallback;
|
|
|
64
|
import com.zhy.http.okhttp.request.RequestCall;
|
|
50
|
65
|
|
|
51
|
66
|
import org.json.JSONException;
|
|
52
|
67
|
import org.json.JSONObject;
|
|
53
|
68
|
|
|
54
|
69
|
import java.io.BufferedReader;
|
|
55
|
70
|
import java.io.BufferedWriter;
|
|
|
71
|
import java.io.File;
|
|
56
|
72
|
import java.io.InputStreamReader;
|
|
57
|
73
|
import java.io.OutputStreamWriter;
|
|
58
|
74
|
import java.io.PrintWriter;
|
|
59
|
75
|
import java.net.Socket;
|
|
60
|
76
|
import java.net.URLEncoder;
|
|
61
|
77
|
import java.security.MessageDigest;
|
|
|
78
|
import java.text.NumberFormat;
|
|
62
|
79
|
|
|
63
|
80
|
import okhttp3.Call;
|
|
|
81
|
import pub.devrel.easypermissions.AfterPermissionGranted;
|
|
64
|
82
|
import pub.devrel.easypermissions.EasyPermissions;
|
|
65
|
83
|
|
|
66
|
84
|
public class UserCenterMoreActivity extends Activity implements View.OnClickListener {
|
|
67
|
85
|
private static final String TAG = "UserCenterMoreActivity";
|
|
|
86
|
private static final int RC_READ_EXTERNAL_PERM = 127;
|
|
68
|
87
|
private RelativeLayout rl_recommend, rl_feedback, rl_about, rl_message, rl_update, rl_alter_password;
|
|
69
|
88
|
private ImageView iv_back, iv_message, iv_fen;
|
|
70
|
89
|
private String now_version, app_version;
|
|
71
|
90
|
private TextView tv_exit;
|
|
72
|
|
private String now_versionCode, now_versionName;
|
|
|
91
|
private String now_versionCode, now_versionName,title;
|
|
73
|
92
|
private android.view.animation.Animation animation;
|
|
74
|
93
|
private ImageView point, iv_message_f;
|
|
|
94
|
private LinearLayout logOutLayout;
|
|
|
95
|
|
|
75
|
96
|
private Socket socket;
|
|
76
|
97
|
private String Token = "";
|
|
77
|
98
|
static String token = "";
|
|
78
|
99
|
public static long cha;
|
|
79
|
100
|
LoadingDialog dialog;
|
|
|
101
|
Context context;
|
|
|
102
|
private AlertDialogUpdate alterDialog;
|
|
|
103
|
private UpdateDialog updateDialog;
|
|
80
|
104
|
Dialog et_dialog;
|
|
81
|
|
private Handler handler = new Handler() {
|
|
|
105
|
private RequestCall downloadCall;
|
|
|
106
|
private Handler handler = new Handler(Looper.getMainLooper()) {
|
|
82
|
107
|
// 主线程通过这个方法处理消息
|
|
83
|
108
|
@Override
|
|
84
|
109
|
public void handleMessage(Message msg) {
|
|
|
@ -117,6 +142,8 @@ public class UserCenterMoreActivity extends Activity implements View.OnClickList
|
|
117
|
142
|
|
|
118
|
143
|
now_versionCode = JsonUtils.getKeyResult(android, "versionCode");
|
|
119
|
144
|
now_versionName = JsonUtils.getKeyResult(android, "versionName");
|
|
|
145
|
title = JsonUtils.getKeyResult(jsonArray.toJSONString(), "title");
|
|
|
146
|
title = title.replace("\\n", "\n");
|
|
120
|
147
|
} catch (Exception e) {
|
|
121
|
148
|
e.printStackTrace();
|
|
122
|
149
|
}
|
|
|
@ -131,7 +158,7 @@ public class UserCenterMoreActivity extends Activity implements View.OnClickList
|
|
131
|
158
|
}
|
|
132
|
159
|
//
|
|
133
|
160
|
if (new_versionCode - getVersionCode(getApplication()) > 0) {
|
|
134
|
|
dialogup();
|
|
|
161
|
permissionTask();
|
|
135
|
162
|
} else {
|
|
136
|
163
|
Toast.makeText(UserCenterMoreActivity.this, "当前为最新版本" + now_versionName, Toast.LENGTH_SHORT).show();
|
|
137
|
164
|
}
|
|
|
@ -160,7 +187,33 @@ public class UserCenterMoreActivity extends Activity implements View.OnClickList
|
|
160
|
187
|
}
|
|
161
|
188
|
}
|
|
162
|
189
|
};
|
|
163
|
|
private LinearLayout logOutLayout;
|
|
|
190
|
private Handler myHandler = new Handler(Looper.getMainLooper()) {
|
|
|
191
|
|
|
|
192
|
@Override
|
|
|
193
|
public void handleMessage(Message msg) {
|
|
|
194
|
super.handleMessage(msg);
|
|
|
195
|
|
|
|
196
|
switch (msg.what) {
|
|
|
197
|
|
|
|
198
|
case 0x01:
|
|
|
199
|
|
|
|
200
|
Bundle data = msg.getData();
|
|
|
201
|
String format = data.getString("format");
|
|
|
202
|
String f = data.getString("progress");
|
|
|
203
|
String s = f.substring(0, f.indexOf("."));
|
|
|
204
|
// LogUtils.e(s);
|
|
|
205
|
|
|
|
206
|
updateDialog.updateMsg("当前已下载:" + format);
|
|
|
207
|
updateDialog.updateProgress(Integer.parseInt(s));
|
|
|
208
|
|
|
|
209
|
break;
|
|
|
210
|
|
|
|
211
|
}
|
|
|
212
|
|
|
|
213
|
}
|
|
|
214
|
};
|
|
|
215
|
|
|
|
216
|
|
|
164
|
217
|
|
|
165
|
218
|
@Override
|
|
166
|
219
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
@ -169,6 +222,7 @@ public class UserCenterMoreActivity extends Activity implements View.OnClickList
|
|
169
|
222
|
BarColorUtil.initStatusBarColor(UserCenterMoreActivity.this);
|
|
170
|
223
|
dialog = new LoadingDialog(this);
|
|
171
|
224
|
dialog.setCanceledOnTouchOutside(false);
|
|
|
225
|
context = this;
|
|
172
|
226
|
initView();
|
|
173
|
227
|
}
|
|
174
|
228
|
|
|
|
@ -718,12 +772,8 @@ public class UserCenterMoreActivity extends Activity implements View.OnClickList
|
|
718
|
772
|
.setPositiveButton("要,马上要", new View.OnClickListener() {
|
|
719
|
773
|
@Override
|
|
720
|
774
|
public void onClick(View v) {
|
|
721
|
|
Intent intent = new Intent();
|
|
722
|
|
intent.setAction("android.intent.action.VIEW");
|
|
723
|
|
intent.addCategory(Intent.CATEGORY_BROWSABLE);
|
|
724
|
|
Uri content_url = Uri.parse("http://cdz.evcharge.cc/app/app.apk");
|
|
725
|
|
intent.setData(content_url);
|
|
726
|
|
startActivity(Intent.createChooser(intent, "请选择浏览器"));
|
|
|
775
|
ToastUtil.showToast(getApplicationContext(), "正在下载中", Toast.LENGTH_SHORT);
|
|
|
776
|
downLoadFile();
|
|
727
|
777
|
}
|
|
728
|
778
|
}).setNegativeButton("先退下", new View.OnClickListener() {
|
|
729
|
779
|
@Override
|
|
|
@ -850,8 +900,106 @@ public class UserCenterMoreActivity extends Activity implements View.OnClickList
|
|
850
|
900
|
}
|
|
851
|
901
|
});
|
|
852
|
902
|
}
|
|
|
903
|
private void showProgressWindow() {
|
|
|
904
|
updateDialog = new UpdateDialog(UserCenterMoreActivity.this);
|
|
|
905
|
updateDialog.builder().setMsg("")
|
|
|
906
|
.setBtnCancel(v->{
|
|
|
907
|
if (downloadCall!=null){
|
|
|
908
|
downloadCall.cancel();
|
|
|
909
|
}
|
|
|
910
|
})
|
|
|
911
|
.setCancelable(false).show();
|
|
|
912
|
}
|
|
|
913
|
|
|
|
914
|
private void downLoadFile() {
|
|
|
915
|
showProgressWindow();
|
|
|
916
|
ToastUtil.showToast(getApplicationContext(), "正在下载中", Toast.LENGTH_SHORT);
|
|
|
917
|
downloadCall = OkHttpUtils.get().url("http://cdz.evcharge.cc/app/app.apk").build();
|
|
|
918
|
downloadCall.execute(new FileCallBack(PhotoUtils.DOWNLOADS, "cdz_install") {
|
|
|
919
|
@Override
|
|
|
920
|
public void inProgress(final float progress, long total) {
|
|
|
921
|
|
|
|
922
|
NumberFormat numberFormat = NumberFormat.getInstance();
|
|
|
923
|
|
|
|
924
|
// 设置精确到小数点后2位
|
|
853
|
925
|
|
|
|
926
|
numberFormat.setMaximumFractionDigits(2);
|
|
|
927
|
String format = numberFormat.format(progress * 100);
|
|
854
|
928
|
|
|
|
929
|
Message message = new Message();
|
|
|
930
|
message.what = 0x01;
|
|
|
931
|
|
|
|
932
|
Bundle bundle = new Bundle();
|
|
|
933
|
bundle.putString("format", format + "%");
|
|
|
934
|
// LogUtils.e("当前:" + format);
|
|
|
935
|
if (!format.contains(".")) {
|
|
|
936
|
bundle.putString("progress", format + ".");
|
|
|
937
|
} else {
|
|
|
938
|
bundle.putString("progress", format);
|
|
|
939
|
}
|
|
|
940
|
|
|
|
941
|
|
|
|
942
|
message.setData(bundle);
|
|
|
943
|
myHandler.sendMessage(message);
|
|
|
944
|
|
|
|
945
|
|
|
|
946
|
}
|
|
|
947
|
|
|
|
948
|
@Override
|
|
|
949
|
public void onError(Call call, Exception e) {
|
|
|
950
|
LogUtils.e(e.getMessage());
|
|
|
951
|
}
|
|
|
952
|
|
|
|
953
|
@Override
|
|
|
954
|
public void onResponse(File response) {
|
|
|
955
|
String path = getDatabasePath("zhan_list").getPath();
|
|
|
956
|
com.blankj.utilcode.util.LogUtils.e(path);
|
|
|
957
|
AppUtils.cleanAppData(path);
|
|
|
958
|
Log.e("hyc","**------**"+response.getAbsolutePath());
|
|
|
959
|
Log.e("hyc","**------**"+!response.exists());
|
|
|
960
|
if (!response.exists()){
|
|
|
961
|
Toast.makeText(context, "文件不存在", Toast.LENGTH_SHORT).show();
|
|
|
962
|
return ;
|
|
|
963
|
}
|
|
|
964
|
|
|
|
965
|
Intent intent = new Intent();
|
|
|
966
|
intent.setAction(android.content.Intent.ACTION_VIEW);
|
|
|
967
|
Uri uri;
|
|
|
968
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
|
|
969
|
Uri contentUri = FileProvider.getUriForFile(context,
|
|
|
970
|
context.getApplicationContext().getPackageName() + ".provider",
|
|
|
971
|
response);
|
|
|
972
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
973
|
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
|
|
974
|
intent.setDataAndType(contentUri, "application/vnd.android.package-archive");
|
|
|
975
|
} else {
|
|
|
976
|
uri = Uri.fromFile(response);
|
|
|
977
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
978
|
intent.setDataAndType(uri, "application/vnd.android.package-archive");
|
|
|
979
|
}
|
|
|
980
|
context.startActivity(intent);
|
|
|
981
|
android.os.Process.killProcess(android.os.Process.myPid());
|
|
|
982
|
}
|
|
|
983
|
});
|
|
|
984
|
}
|
|
|
985
|
|
|
|
986
|
@AfterPermissionGranted(RC_READ_EXTERNAL_PERM)
|
|
|
987
|
public void permissionTask() {
|
|
|
988
|
if (isPermissionOK()) {
|
|
|
989
|
dialogup();
|
|
|
990
|
} else {
|
|
|
991
|
EasyPermissions.requestPermissions(
|
|
|
992
|
this, "充电桩想要获取您的图片读取权限,是否允许?",
|
|
|
993
|
RC_READ_EXTERNAL_PERM,
|
|
|
994
|
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
|
|
995
|
Manifest.permission.READ_EXTERNAL_STORAGE);
|
|
|
996
|
}
|
|
|
997
|
}
|
|
|
998
|
@Override
|
|
|
999
|
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
|
|
1000
|
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
|
|
1001
|
EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
|
|
|
1002
|
}
|
|
855
|
1003
|
@Override
|
|
856
|
1004
|
protected void onPause() {
|
|
857
|
1005
|
super.onPause();
|
|
|
@ -8,7 +8,9 @@ import android.view.LayoutInflater;
|
|
8
|
8
|
import android.view.View;
|
|
9
|
9
|
import android.view.WindowManager;
|
|
10
|
10
|
import android.widget.FrameLayout;
|
|
|
11
|
import android.widget.ImageView;
|
|
11
|
12
|
import android.widget.LinearLayout;
|
|
|
13
|
import android.widget.ProgressBar;
|
|
12
|
14
|
import android.widget.TextView;
|
|
13
|
15
|
|
|
14
|
16
|
import com.electric.chargingpile.R;
|
|
|
@ -20,12 +22,13 @@ public class UpdateDialog {
|
|
20
|
22
|
private android.app.Dialog dialog;
|
|
21
|
23
|
private LinearLayout layout_bg;
|
|
22
|
24
|
private TextView txt_msg;
|
|
|
25
|
private ImageView imgCancel;
|
|
23
|
26
|
private Display display;
|
|
24
|
27
|
private boolean showTitle = false;
|
|
25
|
28
|
private boolean showMsg = false;
|
|
26
|
29
|
private boolean showPosBtn = false;
|
|
27
|
30
|
private boolean showNegBtn = false;
|
|
28
|
|
private QMUIProgressBar qmuiProgressBar;
|
|
|
31
|
private ProgressBar qmuiProgressBar;
|
|
29
|
32
|
|
|
30
|
33
|
public UpdateDialog(Context context) {
|
|
31
|
34
|
this.context = context;
|
|
|
@ -41,12 +44,13 @@ public class UpdateDialog {
|
|
41
|
44
|
|
|
42
|
45
|
// 获取自定义Dialog布局中的控件
|
|
43
|
46
|
layout_bg = view.findViewById(R.id.layout_bg);
|
|
|
47
|
imgCancel = view.findViewById(R.id.imgCancel);
|
|
44
|
48
|
|
|
45
|
49
|
txt_msg = (TextView) view.findViewById(R.id.txt_msg);
|
|
46
|
50
|
txt_msg.setVisibility(View.GONE);
|
|
47
|
51
|
|
|
48
|
52
|
qmuiProgressBar = view.findViewById(R.id.qMUIProgressBar);
|
|
49
|
|
qmuiProgressBar.setMaxValue(100);
|
|
|
53
|
qmuiProgressBar.setMax(100);
|
|
50
|
54
|
|
|
51
|
55
|
// 定义Dialog布局和参数
|
|
52
|
56
|
dialog = new Dialog(context, R.style.AlertDialogStyle);
|
|
|
@ -54,7 +58,7 @@ public class UpdateDialog {
|
|
54
|
58
|
|
|
55
|
59
|
// 调整dialog背景大小
|
|
56
|
60
|
layout_bg.setLayoutParams(new FrameLayout.LayoutParams((int) (display
|
|
57
|
|
.getWidth() * 0.85), LinearLayout.LayoutParams.WRAP_CONTENT));
|
|
|
61
|
.getWidth() * 0.65), LinearLayout.LayoutParams.WRAP_CONTENT));
|
|
58
|
62
|
|
|
59
|
63
|
return this;
|
|
60
|
64
|
}
|
|
|
@ -73,6 +77,15 @@ public class UpdateDialog {
|
|
73
|
77
|
dialog.setCancelable(cancel);
|
|
74
|
78
|
return this;
|
|
75
|
79
|
}
|
|
|
80
|
public UpdateDialog setBtnCancel(View.OnClickListener listener) {
|
|
|
81
|
if (imgCancel!=null){
|
|
|
82
|
imgCancel.setOnClickListener(v -> {
|
|
|
83
|
listener.onClick(v);
|
|
|
84
|
dialog.dismiss();
|
|
|
85
|
});
|
|
|
86
|
}
|
|
|
87
|
return this;
|
|
|
88
|
}
|
|
76
|
89
|
|
|
77
|
90
|
|
|
78
|
91
|
private void setLayout() {
|
|
|
@ -87,10 +100,13 @@ public class UpdateDialog {
|
|
87
|
100
|
}
|
|
88
|
101
|
|
|
89
|
102
|
public void updateMsg(String msg) {
|
|
90
|
|
txt_msg.setText(msg);
|
|
|
103
|
|
|
91
|
104
|
}
|
|
92
|
105
|
|
|
93
|
106
|
public void updateProgress(int i) {
|
|
94
|
107
|
qmuiProgressBar.setProgress(i);
|
|
|
108
|
if (txt_msg!=null){
|
|
|
109
|
txt_msg.setText(i+"%");
|
|
|
110
|
}
|
|
95
|
111
|
}
|
|
96
|
112
|
}
|
|
|
@ -0,0 +1,8 @@
|
|
|
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
2
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
3
|
|
|
|
4
|
<item android:drawable="@drawable/ic_select_check_square" android:state_checked="true"/>
|
|
|
5
|
<item android:drawable="@drawable/ic_no_check_square" android:state_checked="false"/>
|
|
|
6
|
<item android:drawable="@drawable/ic_no_check_square"/>
|
|
|
7
|
|
|
|
8
|
</selector>
|
|
|
@ -0,0 +1,39 @@
|
|
|
1
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
2
|
android:layout_width="match_parent"
|
|
|
3
|
android:layout_height="wrap_content">
|
|
|
4
|
|
|
|
5
|
<!-- 背景 gradient是渐变,corners定义的是圆角 -->
|
|
|
6
|
<item android:id="@android:id/background"
|
|
|
7
|
android:layout_width="wrap_content">
|
|
|
8
|
<shape>
|
|
|
9
|
<corners android:radius="10dp" />
|
|
|
10
|
|
|
|
11
|
<solid android:color="#ECECEC" />
|
|
|
12
|
</shape>
|
|
|
13
|
</item>
|
|
|
14
|
<!-- 第二条进度条颜色 -->
|
|
|
15
|
<item android:id="@android:id/secondaryProgress">
|
|
|
16
|
<clip>
|
|
|
17
|
<shape>
|
|
|
18
|
<corners android:radius="10dp" />
|
|
|
19
|
|
|
|
20
|
<gradient
|
|
|
21
|
android:angle="90.0"
|
|
|
22
|
android:centerColor="#aadfdf"
|
|
|
23
|
android:centerY="0.45"
|
|
|
24
|
android:endColor="#aadfdf"
|
|
|
25
|
android:startColor="#aadfdf" />
|
|
|
26
|
</shape>
|
|
|
27
|
</clip>
|
|
|
28
|
</item>
|
|
|
29
|
<!-- 进度条 -->
|
|
|
30
|
<item android:id="@android:id/progress">
|
|
|
31
|
<clip>
|
|
|
32
|
<shape>
|
|
|
33
|
<corners android:radius="10dp" />
|
|
|
34
|
<solid android:color="#3EC34C" />
|
|
|
35
|
</shape>
|
|
|
36
|
</clip>
|
|
|
37
|
</item>
|
|
|
38
|
|
|
|
39
|
</layer-list>
|
|
|
@ -47,7 +47,7 @@
|
|
47
|
47
|
android:layout_height="0dp"
|
|
48
|
48
|
android:orientation="vertical"
|
|
49
|
49
|
android:scrollbars="none"
|
|
50
|
|
app:layout_constraintBottom_toTopOf="@+id/submit_btn"
|
|
|
50
|
app:layout_constraintBottom_toTopOf="@+id/layoutAuthorize"
|
|
51
|
51
|
app:layout_constraintTop_toBottomOf="@+id/nav_bar">
|
|
52
|
52
|
|
|
53
|
53
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
@ -353,7 +353,7 @@
|
|
353
|
353
|
android:layout_width="match_parent"
|
|
354
|
354
|
android:layout_height="wrap_content"
|
|
355
|
355
|
android:layout_marginTop="10dp"
|
|
356
|
|
android:layout_marginBottom="30dp"
|
|
|
356
|
android:layout_marginBottom="60dp"
|
|
357
|
357
|
android:text="认证说明\n\n1.车型信息和行驶证主页为必填项;\n2.最多可认证三款车型;\n3.默认首款认证车型为主车型;\n4.上传行驶证详细页面,并保证所有信息清晰;\n5.首次车主认证审核通过有充电满减和折扣红包\n6.红包自发放日起有效期为一个月"
|
|
358
|
358
|
android:textColor="#0D1120"
|
|
359
|
359
|
android:textSize="14sp"
|
|
|
@ -361,7 +361,34 @@
|
|
361
|
361
|
app:layout_constraintTop_toBottomOf="@+id/driving_license_type" />
|
|
362
|
362
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
363
|
363
|
</ScrollView>
|
|
364
|
|
|
|
|
364
|
<LinearLayout
|
|
|
365
|
android:orientation="horizontal"
|
|
|
366
|
android:gravity="center"
|
|
|
367
|
android:layout_marginBottom="10dp"
|
|
|
368
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
369
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
370
|
android:id="@+id/layoutAuthorize"
|
|
|
371
|
app:layout_constraintBottom_toTopOf="@+id/submit_btn"
|
|
|
372
|
android:layout_width="0dp"
|
|
|
373
|
android:layout_height="wrap_content">
|
|
|
374
|
<CheckBox
|
|
|
375
|
android:padding="5dp"
|
|
|
376
|
android:layout_gravity="center"
|
|
|
377
|
android:gravity="center"
|
|
|
378
|
style="@style/SquareCheckboxTheme"
|
|
|
379
|
android:id="@+id/checkBox"
|
|
|
380
|
android:layout_width="wrap_content"
|
|
|
381
|
android:layout_height="wrap_content"/>
|
|
|
382
|
<TextView
|
|
|
383
|
android:gravity="center"
|
|
|
384
|
android:id="@+id/tvAuthorize"
|
|
|
385
|
android:layout_width="wrap_content"
|
|
|
386
|
android:layout_height="match_parent"
|
|
|
387
|
android:text="勾选后,即您同意《个人信息处理授权书》并确认授权"
|
|
|
388
|
android:textColor="#ff9b9b9b"
|
|
|
389
|
android:textSize="12sp"
|
|
|
390
|
/>
|
|
|
391
|
</LinearLayout>
|
|
365
|
392
|
<Button
|
|
366
|
393
|
android:id="@+id/submit_btn"
|
|
367
|
394
|
android:layout_width="match_parent"
|
|
|
@ -1,34 +1,51 @@
|
|
1
|
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
2
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
3
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
4
|
xmlns:tools="http://schemas.android.com/tools"
|
|
4
|
5
|
android:id="@+id/layout_bg"
|
|
5
|
6
|
android:layout_width="match_parent"
|
|
6
|
|
android:layout_height="200dp"
|
|
|
7
|
android:layout_height="wrap_content"
|
|
7
|
8
|
android:background="@drawable/offlinearrow_but_normal"
|
|
8
|
9
|
android:orientation="vertical">
|
|
9
|
|
|
|
10
|
10
|
<TextView
|
|
11
|
|
android:id="@+id/txt_msg"
|
|
|
11
|
android:gravity="center"
|
|
|
12
|
android:text="下载中"
|
|
|
13
|
|
|
12
|
14
|
android:layout_width="match_parent"
|
|
13
|
15
|
android:layout_height="wrap_content"
|
|
14
|
16
|
android:layout_gravity="center|left"
|
|
15
|
|
android:textColor="@color/ui_62"
|
|
16
|
|
android:layout_marginLeft="16dp"
|
|
17
|
|
android:layout_marginTop="16dp"
|
|
18
|
|
android:layout_marginBottom="16dp"
|
|
|
17
|
android:textColor="@color/color_0e0e0e"
|
|
|
18
|
android:layout_marginTop="30dp"
|
|
|
19
|
android:layout_marginBottom="20dp"
|
|
19
|
20
|
android:textSize="16sp" />
|
|
20
|
21
|
|
|
21
|
|
<com.qmuiteam.qmui.widget.QMUIProgressBar
|
|
|
22
|
<ProgressBar
|
|
|
23
|
style="?android:attr/progressBarStyleHorizontal"
|
|
|
24
|
tools:progress="45"
|
|
22
|
25
|
android:id="@+id/qMUIProgressBar"
|
|
23
|
26
|
android:layout_width="match_parent"
|
|
24
|
|
android:layout_height="12dp"
|
|
25
|
|
android:textColor="@color/lvse"
|
|
|
27
|
android:layout_height="10dp"
|
|
|
28
|
android:progressDrawable="@drawable/progressbar_color"
|
|
26
|
29
|
android:textSize="12sp"
|
|
27
|
|
android:layout_marginBottom="20dp"
|
|
|
30
|
android:layout_marginBottom="6dp"
|
|
28
|
31
|
android:layout_marginLeft="16dp"
|
|
29
|
32
|
android:layout_marginRight="16dp"
|
|
30
|
|
app:qmui_background_color="@color/ui_68"
|
|
31
|
|
app:qmui_progress_color="@color/lvse"
|
|
32
|
|
app:qmui_type="type_rect"/>
|
|
33
|
|
|
|
|
33
|
/>
|
|
|
34
|
<TextView
|
|
|
35
|
android:id="@+id/txt_msg"
|
|
|
36
|
tools:text="12"
|
|
|
37
|
android:textColor="#3EC34C"
|
|
|
38
|
android:textSize="14sp"
|
|
|
39
|
android:layout_marginEnd="18dp"
|
|
|
40
|
android:layout_gravity="end"
|
|
|
41
|
android:layout_marginBottom="30dp"
|
|
|
42
|
android:layout_width="wrap_content"
|
|
|
43
|
android:layout_height="wrap_content"/>
|
|
|
44
|
<ImageView
|
|
|
45
|
android:id="@+id/imgCancel"
|
|
|
46
|
android:layout_marginBottom="30dp"
|
|
|
47
|
android:layout_gravity="center"
|
|
|
48
|
android:src="@drawable/ic_cancel_updata"
|
|
|
49
|
android:layout_width="wrap_content"
|
|
|
50
|
android:layout_height="wrap_content"/>
|
|
34
|
51
|
</LinearLayout>
|
|
|
@ -377,4 +377,7 @@
|
|
377
|
377
|
<style name="CustomCheckboxTheme" parent="@android:style/Widget.CompoundButton.CheckBox">
|
|
378
|
378
|
<item name="android:button">@drawable/checkbox_style</item>
|
|
379
|
379
|
</style>
|
|
|
380
|
<style name="SquareCheckboxTheme" parent="@android:style/Widget.CompoundButton.CheckBox">
|
|
|
381
|
<item name="android:button">@drawable/bg_car_owner_check</item>
|
|
|
382
|
</style>
|
|
380
|
383
|
</resources>
|
|
|
@ -1,7 +1,7 @@
|
|
1
|
1
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
2
|
package="com.zhy.autolayout">
|
|
3
|
3
|
|
|
4
|
|
<application android:allowBackup="true"
|
|
|
4
|
<application android:allowBackup="false"
|
|
5
|
5
|
android:label="@string/app_name"
|
|
6
|
6
|
>
|
|
7
|
7
|
|
|
|
@ -28,6 +28,7 @@
|
|
28
|
28
|
<supports-screens android:xlargeScreens="true"
|
|
29
|
29
|
android:largeScreens="true"
|
|
30
|
30
|
android:normalScreens="true"
|
|
|
31
|
android:allowBackup="false"
|
|
31
|
32
|
android:smallScreens="true"
|
|
32
|
33
|
android:anyDensity="true"/>
|
|
33
|
34
|
|
|
|
@ -5,7 +5,8 @@ public interface UrlConstants {
|
|
5
|
5
|
// String HOST_URL = "http://59.110.68.162/zhannew/basic/web/index.php/"; //测试链接
|
|
6
|
6
|
|
|
7
|
7
|
String USER_CHARGING_CHECK_URL = HOST_URL + "api/charge/check-user";
|
|
8
|
|
String START_CHARGING_URL = HOST_URL + "api/charge/start";
|
|
|
8
|
// String START_CHARGING_URL = HOST_URL + "api/charge/start";
|
|
|
9
|
String START_CHARGING_URL = HOST_URL + "api/charge/start2";
|
|
9
|
10
|
String CHARGING_STATUS_URL = HOST_URL + "api/charge/query";
|
|
10
|
11
|
String STOP_CHARGING_URL = HOST_URL + "api/charge/close";//关闭充电
|
|
11
|
12
|
|