Compare View

switch
from
...
to
 
Commits (3)
.idea/inspectionProfiles/Project_Default.xml
1 1 <component name="InspectionProjectProfileManager">
2 2 <profile version="1.0">
3 3 <option name="myName" value="Project Default" />
  4 + <inspection_tool class="Deprecation" enabled="false" level="WARNING" enabled_by_default="false" />
4 5 <inspection_tool class="IgnoreResultOfCall" enabled="false" level="WARNING" enabled_by_default="false">
5 6 <option name="m_reportAllNonLibraryCalls" value="false" />
6 7 <option name="callCheckString" value="java.io.File,.*,java.io.InputStream,read|skip|available|markSupported,java.io.Reader,read|skip|ready|markSupported,java.lang.AbstractStringBuilder,capacity|codePointAt|codePointBefore|codePointCount|indexOf|lastIndexOf|offsetByCodePoints|substring|subSequence,java.lang.Boolean,.*,java.lang.Byte,.*,java.lang.Character,.*,java.lang.Double,.*,java.lang.Float,.*,java.lang.Integer,.*,java.lang.Long,.*,java.lang.Math,.*,java.lang.Object,equals|hashCode|toString,java.lang.Short,.*,java.lang.StrictMath,.*,java.lang.String,.*,java.lang.Thread,interrupted,java.math.BigDecimal,.*,java.math.BigInteger,.*,java.net.InetAddress,.*,java.net.URI,.*,java.nio.channels.AsynchronousChannelGroup,.*,java.nio.channels.Channel,isOpen,java.nio.channels.FileChannel,open|map|lock|tryLock|write,java.nio.channels.ScatteringByteChannel,read,java.nio.channels.SocketChannel,open|socket|isConnected|isConnectionPending,java.util.Arrays,.*,java.util.Collections,(?!addAll).*,java.util.List,of,java.util.Map,of|ofEntries|entry,java.util.Set,of,java.util.UUID,.*,java.util.concurrent.BlockingQueue,offer|remove,java.util.concurrent.CountDownLatch,await|getCount,java.util.concurrent.ExecutorService,awaitTermination|isShutdown|isTerminated,java.util.concurrent.ForkJoinPool,awaitQuiescence,java.util.concurrent.Semaphore,tryAcquire|availablePermits|isFair|hasQueuedThreads|getQueueLength|getQueuedThreads,java.util.concurrent.locks.Condition,await|awaitNanos|awaitUntil,java.util.concurrent.locks.Lock,tryLock|newCondition,java.util.regex.Matcher,pattern|toMatchResult|start|end|group|groupCount|matches|find|lookingAt|quoteReplacement|replaceAll|replaceFirst|regionStart|regionEnd|hasTransparentBounds|hasAnchoringBounds|hitEnd|requireEnd,java.util.regex.Pattern,.*,java.util.stream.BaseStream,.*,java.util.stream.DoubleStream,.*,java.util.stream.IntStream,.*,java.util.stream.LongStream,.*,java.util.stream.Stream,.*" />
... ...
app/src/main/java/com/hjx/parent/ChooseActivity.java
... ... @@ -166,13 +166,13 @@ public class ChooseActivity extends BaseActivity {
166 166 item.setImageResource(R.id.iv_select, select == item.getAdapterPosition() ? R.mipmap.gx : R.mipmap.wsyq);
167 167 item.setVisible(R.id.rl_add, false);
168 168 if (TextUtils.isEmpty(studentBean.getPhoto())) {
169   - item.setImageResource(R.id.iv_avatar, studentBean.getGender() == 0 ? R.mipmap.ic_avatar_male : R.mipmap.ic_avatar_female);
  169 + item.setImageResource(R.id.iv_avatar, "男".equals(studentBean.getGender()) ? R.mipmap.ic_avatar_male : R.mipmap.ic_avatar_female);
170 170 } else {
171 171 RoundedCorners roundedCorners = new RoundedCorners(ScreenUtils.dpToPx(ChooseActivity.this, 45));
172 172 RequestOptions options = RequestOptions.bitmapTransform(roundedCorners);
173 173 Glide.with(ChooseActivity.this).load(studentBean.getPhoto()).apply(options).into((ImageView) item.getView(R.id.iv_avatar));
174 174 }
175   - item.setVisible(R.id.iv_vip, !"虚拟".equals(studentBean.getTeacherIdentity()));
  175 + item.setVisible(R.id.iv_vip, studentBean.getIsIntention() == 1);
176 176 item.getConvertView().setOnClickListener(new View.OnClickListener() {
177 177 @Override
178 178 public void onClick(View view) {
... ...
app/src/main/java/com/hjx/parent/EditStudentActivity.java
1 1 package com.hjx.parent;
2 2  
  3 +import android.annotation.SuppressLint;
3 4 import android.content.DialogInterface;
4 5 import android.content.Intent;
5 6 import android.graphics.Bitmap;
... ... @@ -111,6 +112,7 @@ public class EditStudentActivity extends BaseActivity {
111 112 btn_next = findViewById(R.id.btn_next);
112 113 }
113 114  
  115 + @SuppressLint({"SetTextI18n", "UseCompatLoadingForDrawables"})
114 116 @Override
115 117 protected void onStart() {
116 118 super.onStart();
... ... @@ -126,11 +128,10 @@ public class EditStudentActivity extends BaseActivity {
126 128 studentBean.setNickName(name);
127 129 }
128 130 if (sex != null && sex.length() > 0) {
129   - studentBean.setGender("男".equals(sex) ? 0 : 1);
  131 + studentBean.setGender(sex);
130 132 }
131 133 if (nian != null && nian.length() > 0) {
132 134 studentBean.setGrade(nian);
133   - studentBean.setGradeId((Integer) SharedPreferencesUtil.getData("grade", 1));
134 135 }
135 136 if (xueq != null && xueq.length() > 0) {
136 137 studentBean.setTerm(xueq);
... ... @@ -140,16 +141,16 @@ public class EditStudentActivity extends BaseActivity {
140 141 }
141 142 tv_name.setText(studentBean.getNickName());
142 143 tv_nian.setText(studentBean.getGrade() + studentBean.getTerm());
143   - tv_sex.setText(studentBean.getGender() == 0 ? "男" : "女");
  144 + tv_sex.setText(studentBean.getGender());
144 145 tv_shen.setText(studentBean.getParentIdentity());
145 146 if (!TextUtils.isEmpty(studentBean.getPhoto())) {
146 147 RoundedCorners roundedCorners = new RoundedCorners(ScreenUtils.dpToPx(this, 45));
147 148 RequestOptions options = RequestOptions.bitmapTransform(roundedCorners);
148 149 Glide.with(this).load(studentBean.getPhoto()).apply(options).into(iv_avatar);
149 150 } else {
150   - iv_avatar.setImageResource(studentBean.getGender() == 0 ? R.mipmap.ic_avatar_male : R.mipmap.ic_avatar_female);
  151 + iv_avatar.setImageResource("男".equals(studentBean.getGender()) ? R.mipmap.ic_avatar_male : R.mipmap.ic_avatar_female);
151 152 }
152   - if (!"虚拟".equals(studentBean.getTeacherIdentity())) {
  153 + if (studentBean.getIsIntention() == 1) {
153 154 rl_teacher.setVisibility(View.VISIBLE);
154 155 tv_bind.setText("重新绑定");
155 156 tv_teacher.setText(studentBean.getTeacherName());
... ... @@ -158,7 +159,7 @@ public class EditStudentActivity extends BaseActivity {
158 159 RequestOptions options = RequestOptions.bitmapTransform(roundedCorners);
159 160 Glide.with(this).load(studentBean.getTeacherAvatar()).apply(options).into(iv_teacher);
160 161 } else {
161   - iv_teacher.setImageResource(studentBean.getSex() == 0 ? R.mipmap.ic_teacher_male : R.mipmap.ic_teacher_female);
  162 + iv_teacher.setImageResource(R.mipmap.ic_teacher_female);
162 163 }
163 164 } else {
164 165 rl_teacher.setVisibility(View.GONE);
... ... @@ -179,7 +180,7 @@ public class EditStudentActivity extends BaseActivity {
179 180 view_5.setOnClickListener(view -> startActivity(ShenActivity.class));
180 181 findViewById(R.id.tv_cancel).setOnClickListener(view -> onBackPressed());
181 182 btn_next.setOnClickListener(view -> {
182   - if (teacher != null || !"虚拟".equals(studentBean.getTeacherIdentity()) || (studentBean.getState() != null && studentBean.getState() == 0)) {
  183 + if (teacher != null || studentBean.getIsIntention() == 1 || (studentBean.getState() != null && studentBean.getState() == 0)) {
183 184 editStudent();
184 185 } else {
185 186 showDialog("温馨提示", "您还未绑定老师,是否绑定?", "去绑定", "暂不绑定", new DialogInterface.OnClickListener() {
... ... @@ -211,10 +212,9 @@ public class EditStudentActivity extends BaseActivity {
211 212 }
212 213  
213 214 public void editStudent() {
214   - Map map = new HashMap();
  215 + Map<String, Object> map = new HashMap<>();
215 216 map.put("nickName", studentBean.getNickName());
216 217 map.put("gender", studentBean.getGender());
217   - map.put("gradeId", studentBean.getGradeId());
218 218 map.put("parentIdentity", studentBean.getParentIdentity());
219 219 map.put("term", studentBean.getTerm());
220 220 if (teacher != null) {
... ...
app/src/main/java/com/hjx/parent/LoginActivity.java
... ... @@ -175,26 +175,25 @@ public class LoginActivity extends BaseActivity {
175 175 boolean isSucceed = jo.getBoolean("success");
176 176 if (isSucceed) {
177 177 JSONObject jo2 = jo.getJSONObject("data");
178   - if ("parent".equals(jo2.getString("role"))) {
  178 + String role = jo2.getString("role");
  179 + if ("parent".equals(role)) {
179 180 SharedPreferencesUtil.putData("phone", phone);
180   - SharedPreferencesUtil.putData("role", jo2.getString("role"));
181   - SharedPreferencesUtil.putData("userId", jo2.getString("userId"));
  181 + SharedPreferencesUtil.putData("role", role);
  182 + SharedPreferencesUtil.putData("userId", jo2.getString("id"));
182 183 SharedPreferencesUtil.putData("token", jo2.getString("token"));
183   - JSONObject user = new JSONObject(jo2.getString("user"));
184   - if (user.getString("photo") != null && !user.getString("photo").equals("null")) {
185   - SharedPreferencesUtil.putData("photo", user.getString("photo"));
  184 + if (jo2.has("photo") && !jo2.getString("photo").equals("null")) {
  185 + SharedPreferencesUtil.putData("photo", jo2.getString("photo"));
186 186 }
187   - SharedPreferencesUtil.putData("name", user.getString("userName"));
  187 + SharedPreferencesUtil.putData("name", jo2.getString("username"));
188 188 startActivity(ChooseActivity.class);
189 189 finish();
190   - } else if ("member_advisor".equals(jo2.getString("role")) || "teaching_supervision".equals(jo2.getString("role"))) {
  190 + } else if ("member_advisor".equals(role) || "teaching_supervision".equals(role)) {
191 191 SharedPreferencesUtil.putData("phone", phone);
192   - SharedPreferencesUtil.putData("role", jo2.getString("role"));
193   - SharedPreferencesUtil.putData("userId", jo2.getString("userId"));
  192 + SharedPreferencesUtil.putData("role", role);
  193 + SharedPreferencesUtil.putData("userId", jo2.getString("id"));
194 194 SharedPreferencesUtil.putData("token", jo2.getString("token"));
195   - JSONObject user = new JSONObject(jo2.getString("user"));
196   - SharedPreferencesUtil.putData("name", user.getString("userName"));
197   - SharedPreferencesUtil.putData("photo", user.getString("photo"));
  195 + SharedPreferencesUtil.putData("name", jo2.getString("username"));
  196 + SharedPreferencesUtil.putData("photo", jo2.getString("photo"));
198 197 startActivity(TeacherChooseActivity.class);
199 198 finish();
200 199 } else {
... ...
app/src/main/java/com/hjx/parent/RegisterActivity.java
... ... @@ -252,7 +252,7 @@ public class RegisterActivity extends BaseActivity {
252 252 JSONObject jo2 = jo.getJSONObject("data");
253 253 SharedPreferencesUtil.putData("phone", phone);
254 254 SharedPreferencesUtil.putData("role", jo2.getString("role"));
255   - SharedPreferencesUtil.putData("userId", jo2.getString("userId"));
  255 + SharedPreferencesUtil.putData("userId", jo2.getString("id"));
256 256 SharedPreferencesUtil.putData("token", jo2.getString("token"));
257 257 startActivity(ChooseActivity.class);
258 258 finish();
... ...
app/src/main/java/com/hjx/parent/TeacherChooseActivity.java
... ... @@ -86,7 +86,6 @@ public class TeacherChooseActivity extends BaseActivity {
86 86 NetWorks.listStudent(new Observer<ResponseBody>() {
87 87 @Override
88 88 public void onSubscribe(Disposable d) {
89   -
90 89 }
91 90  
92 91 @Override
... ... @@ -116,12 +115,10 @@ public class TeacherChooseActivity extends BaseActivity {
116 115  
117 116 @Override
118 117 public void onError(Throwable e) {
119   -
120 118 }
121 119  
122 120 @Override
123 121 public void onComplete() {
124   -
125 122 }
126 123 });
127 124 }
... ... @@ -153,13 +150,13 @@ public class TeacherChooseActivity extends BaseActivity {
153 150 item.setImageResource(R.id.iv_select, select == item.getAdapterPosition() ? R.mipmap.gx : R.mipmap.wsyq);
154 151 item.setVisible(R.id.rl_add, false);
155 152 if (TextUtils.isEmpty(studentBean.getPhoto())) {
156   - item.setImageResource(R.id.iv_avatar, studentBean.getGender() == 0 ? R.mipmap.ic_avatar_male : R.mipmap.ic_avatar_female);
  153 + item.setImageResource(R.id.iv_avatar, "男".equals(studentBean.getGender()) ? R.mipmap.ic_avatar_male : R.mipmap.ic_avatar_female);
157 154 } else {
158 155 RoundedCorners roundedCorners = new RoundedCorners(ScreenUtils.dpToPx(TeacherChooseActivity.this, 45));
159 156 RequestOptions options = RequestOptions.bitmapTransform(roundedCorners);
160 157 Glide.with(TeacherChooseActivity.this).load(studentBean.getPhoto()).apply(options).into((ImageView) item.getView(R.id.iv_avatar));
161 158 }
162   - item.setVisible(R.id.iv_vip, !"虚拟".equals(studentBean.getTeacherIdentity()));
  159 + item.setVisible(R.id.iv_vip, studentBean.getIsIntention() == 1);
163 160 item.getConvertView().setOnClickListener(new View.OnClickListener() {
164 161 @Override
165 162 public void onClick(View view) {
... ...
app/src/main/java/com/hjx/parent/bean/StudentBean.java
... ... @@ -2,94 +2,26 @@ package com.hjx.parent.bean;
2 2  
3 3 public class StudentBean {
4 4  
5   - String stuId;
6   - String stuName;
7   - int gender;
8   - String term;
9   - String account;
10   - String nickName;
11   - String address;
12   - String phone;
13   - String photo;
14   - int fromType;
15   - int gradeId;
16   - String oriSchool;
17   - String parentPhone;
18   - String parentIdentity;
19   - String teacherName;
20   - int teacherId;
21   - String teacherAvatar;
22   - String grade;
23   - String teacherIdentity;
24   - int sex;
25   - Integer state;
  5 + private String stuId;
  6 + private String stuName;
  7 + private String gender;
  8 + private String term;
  9 + private String account;
  10 + private String nickName;
  11 + private String address;
  12 + private String phone;
  13 + private String photo;
  14 + private String oriSchool;
  15 + private String parentPhone;
  16 + private String parentIdentity;
  17 + private String teacherName;
  18 + private String grade;
  19 + private int isIntention;
  20 +
  21 + // not exist
  22 + private String teacherAvatar;
  23 + private Integer state;
26 24  
27   - public void setState(Integer state) {
28   - this.state = state;
29   - }
30   -
31   - public Integer getState() {
32   - return state;
33   - }
34   -
35   - @Override
36   - public String toString() {
37   - return "StudentBean{" +
38   - "stuId='" + stuId + '\'' +
39   - ", stuName='" + stuName + '\'' +
40   - ", gender=" + gender +
41   - ", term='" + term + '\'' +
42   - ", account='" + account + '\'' +
43   - ", nickName='" + nickName + '\'' +
44   - ", address='" + address + '\'' +
45   - ", phone='" + phone + '\'' +
46   - ", photo='" + photo + '\'' +
47   - ", fromType=" + fromType +
48   - ", gradeId=" + gradeId +
49   - ", oriSchool='" + oriSchool + '\'' +
50   - ", parentPhone='" + parentPhone + '\'' +
51   - ", parentIdentity='" + parentIdentity + '\'' +
52   - ", teacherName='" + teacherName + '\'' +
53   - ", teacherId=" + teacherId +
54   - ", teacherAvatar=" + teacherAvatar +
55   - ", grade=" + grade +
56   - ", teacherIdentity=" + teacherIdentity +
57   - ", sex=" + sex +
58   - ", state=" + state +
59   - '}';
60   - }
61   -
62   - public void setSex(int sex) {
63   - this.sex = sex;
64   - }
65   -
66   - public int getSex() {
67   - return sex;
68   - }
69   -
70   - public void setTeacherIdentity(String teacherIdentity) {
71   - this.teacherIdentity = teacherIdentity;
72   - }
73   -
74   - public String getTeacherIdentity() {
75   - return teacherIdentity;
76   - }
77   -
78   - public void setTeacherAvatar(String teacherAvatar) {
79   - this.teacherAvatar = teacherAvatar;
80   - }
81   -
82   - public void setGrade(String grade) {
83   - this.grade = grade;
84   - }
85   -
86   - public String getTeacherAvatar() {
87   - return teacherAvatar;
88   - }
89   -
90   - public String getGrade() {
91   - return grade;
92   - }
93 25  
94 26 public String getStuId() {
95 27 return stuId;
... ... @@ -107,11 +39,11 @@ public class StudentBean {
107 39 this.stuName = stuName;
108 40 }
109 41  
110   - public int getGender() {
  42 + public String getGender() {
111 43 return gender;
112 44 }
113 45  
114   - public void setGender(int gender) {
  46 + public void setGender(String gender) {
115 47 this.gender = gender;
116 48 }
117 49  
... ... @@ -163,22 +95,6 @@ public class StudentBean {
163 95 this.photo = photo;
164 96 }
165 97  
166   - public int getFromType() {
167   - return fromType;
168   - }
169   -
170   - public void setFromType(int fromType) {
171   - this.fromType = fromType;
172   - }
173   -
174   - public int getGradeId() {
175   - return gradeId;
176   - }
177   -
178   - public void setGradeId(int gradeId) {
179   - this.gradeId = gradeId;
180   - }
181   -
182 98 public String getOriSchool() {
183 99 return oriSchool;
184 100 }
... ... @@ -211,11 +127,35 @@ public class StudentBean {
211 127 this.teacherName = teacherName;
212 128 }
213 129  
214   - public int getTeacherId() {
215   - return teacherId;
  130 + public String getGrade() {
  131 + return grade;
  132 + }
  133 +
  134 + public void setGrade(String grade) {
  135 + this.grade = grade;
  136 + }
  137 +
  138 + public int getIsIntention() {
  139 + return isIntention;
216 140 }
217 141  
218   - public void setTeacherId(int teacherId) {
219   - this.teacherId = teacherId;
  142 + public void setIsIntention(int isIntention) {
  143 + this.isIntention = isIntention;
  144 + }
  145 +
  146 + public String getTeacherAvatar() {
  147 + return teacherAvatar;
  148 + }
  149 +
  150 + public void setTeacherAvatar(String teacherAvatar) {
  151 + this.teacherAvatar = teacherAvatar;
  152 + }
  153 +
  154 + public Integer getState() {
  155 + return state;
  156 + }
  157 +
  158 + public void setState(Integer state) {
  159 + this.state = state;
220 160 }
221 161 }
... ...
app/src/main/java/com/hjx/parent/fragment/HomeFragment.java
... ... @@ -120,7 +120,7 @@ public class HomeFragment extends BaseFragment {
120 120 studentBean = new Gson().fromJson(student, StudentBean.class);
121 121 tv_name.setText(studentBean.getNickName());
122 122 if (TextUtils.isEmpty(studentBean.getPhoto())) {
123   - iv_2.setImageResource(studentBean.getGender() == 0 ? R.mipmap.ic_avatar_male : R.mipmap.ic_avatar_female);
  123 + iv_2.setImageResource("男".equals(studentBean.getGender()) ? R.mipmap.ic_avatar_male : R.mipmap.ic_avatar_female);
124 124 } else {
125 125 RoundedCorners roundedCorners = new RoundedCorners(ScreenUtils.dpToPx(getContext(), 30));
126 126 RequestOptions options = RequestOptions.bitmapTransform(roundedCorners);
... ...
app/src/main/java/com/hjx/parent/fragment/MeFragment.java
1 1 package com.hjx.parent.fragment;
2 2  
3   -import android.app.AlertDialog;
4   -import android.content.DialogInterface;
5 3 import android.content.Intent;
6 4 import android.text.TextUtils;
7 5 import android.view.View;
8 6 import android.widget.ImageView;
9 7 import android.widget.TextView;
10   -import android.widget.Toast;
11 8  
12 9 import androidx.annotation.NonNull;
13   -import androidx.annotation.Nullable;
14 10 import androidx.constraintlayout.widget.Group;
15 11 import androidx.recyclerview.widget.LinearLayoutManager;
16 12 import androidx.recyclerview.widget.RecyclerView;
... ... @@ -20,18 +16,10 @@ import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
20 16 import com.bumptech.glide.request.RequestOptions;
21 17 import com.chad.library.adapter.base.BaseQuickAdapter;
22 18 import com.chad.library.adapter.base.BaseViewHolder;
23   -import com.developer.wang.utils.PermissionUtils;
24 19 import com.google.gson.Gson;
25   -import com.google.gson.JsonArray;
26   -import com.hjq.permissions.OnPermissionCallback;
27   -import com.hjq.permissions.Permission;
28   -import com.hjq.permissions.XXPermissions;
29 20 import com.hjx.parent.AccountActivity;
30 21 import com.hjx.parent.AddStudentActivity;
31 22 import com.hjx.parent.EditStudentActivity;
32   -import com.hjx.parent.LoginActivity;
33   -import com.hjx.parent.MainActivity;
34   -import com.hjx.parent.QRActivity;
35 23 import com.hjx.parent.R;
36 24 import com.hjx.parent.UserActivity;
37 25 import com.hjx.parent.YinsiActivity;
... ... @@ -46,12 +34,7 @@ import org.json.JSONArray;
46 34 import org.json.JSONObject;
47 35  
48 36 import java.util.ArrayList;
49   -import java.util.HashMap;
50   -import java.util.List;
51   -import java.util.Map;
52 37  
53   -import butterknife.BindView;
54   -import butterknife.OnClick;
55 38 import io.reactivex.Observer;
56 39 import io.reactivex.disposables.Disposable;
57 40 import okhttp3.ResponseBody;
... ... @@ -186,13 +169,13 @@ public class MeFragment extends BaseFragment {
186 169 });
187 170 } else {
188 171 if (TextUtils.isEmpty(studentBean.getPhoto())) {
189   - item.setImageResource(R.id.iv_avatar, studentBean.getGender() == 0 ? R.mipmap.ic_avatar_male : R.mipmap.ic_avatar_female);
  172 + item.setImageResource(R.id.iv_avatar, "男".equals(studentBean.getGender()) ? R.mipmap.ic_avatar_male : R.mipmap.ic_avatar_female);
190 173 } else {
191 174 RoundedCorners roundedCorners = new RoundedCorners(ScreenUtils.dpToPx(getContext(), 45));
192 175 RequestOptions options = RequestOptions.bitmapTransform(roundedCorners);
193 176 Glide.with(getActivity()).load(studentBean.getPhoto()).apply(options).into((ImageView) item.getView(R.id.iv_avatar));
194 177 }
195   - item.setVisible(R.id.iv_vip, !"虚拟".equals(studentBean.getTeacherIdentity()));
  178 + item.setVisible(R.id.iv_vip, studentBean.getIsIntention() == 1);
196 179 item.getConvertView().setOnClickListener(new View.OnClickListener() {
197 180 @Override
198 181 public void onClick(View view) {
... ...
... ... @@ -42,7 +42,7 @@ buildscript {
42 42 //okhttp
43 43 okhttp : 'com.squareup.okhttp3:okhttp:3.8.1',
44 44 logging : 'com.squareup.okhttp3:logging-interceptor:3.4.1',
45   - utils : 'com.github.wang-developer:AndroidUtilsDemo:1.0.6',
  45 +// utils : 'com.github.wang-developer:AndroidUtilsDemo:1.0.6',
46 46 commons_lang : 'org.apache.commons:commons-lang3:3.7',
47 47 commons_compress: 'org.apache.commons:commons-compress:1.19',
48 48 commons_c_lang : 'commons-lang:commons-lang:2.3',
... ... @@ -50,7 +50,7 @@ buildscript {
50 50 eventbus : 'org.greenrobot:eventbus:3.2.0',
51 51 eventbus2 : 'org.simple:androideventbus:1.0.5.1',
52 52 glide : 'com.github.bumptech.glide:glide:4.6.1',
53   - permissions : 'com.github.getActivity:XXPermissions:11.6',
  53 + permissions : 'com.github.getActivity:XXPermissions:18.5',
54 54 orcode : 'cn.yipianfengye.android:zxing-library:2.2'
55 55 // push : 'com.umeng.sdk:push:4.1.0',
56 56 // litepal : 'org.litepal.android:java:3.0.0',
... ... @@ -70,10 +70,15 @@ buildscript {
70 70  
71 71 repositories {
72 72 maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  73 + maven { url 'https://maven.aliyun.com/repository/public' }
73 74 maven { url 'https://maven.aliyun.com/repository/google' }
74   - maven { url 'https://maven.aliyun.com/repository/central' }
  75 + maven { url 'https://repo.huaweicloud.com/repository/maven-public/' }
  76 + //maven { url 'https://mirrors.cloud.tencent.com/nexus/repository/maven-public/' }
  77 +
75 78 google()
76   - maven { url 'https://maven.aliyun.com/repository/jcenter' }
  79 + mavenCentral()
  80 + gradlePluginPortal()
  81 + maven { url "https://jitpack.io" }
77 82 }
78 83 dependencies {
79 84 classpath 'com.android.tools.build:gradle:4.2.2'
... ... @@ -91,11 +96,14 @@ buildscript {
91 96  
92 97 allprojects {
93 98 repositories {
94   - maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
95   - maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
96   - maven { url 'https://jitpack.io' }
  99 + maven { url 'https://maven.aliyun.com/repository/public' }
  100 + maven { url 'https://maven.aliyun.com/repository/google' }
  101 + maven { url 'https://repo.huaweicloud.com/repository/maven-public/' }
  102 + //maven { url 'https://mirrors.cloud.tencent.com/nexus/repository/maven-public/' }
  103 +
97 104 google()
98   - maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
  105 + mavenCentral()
  106 + maven { url "https://jitpack.io" }
99 107 }
100 108 }
101 109 task clean(type: Delete) {
... ...
libs/common/src/main/java/com/prws/common/base/BaseActivity.java
... ... @@ -26,12 +26,10 @@ import androidx.fragment.app.Fragment;
26 26 import androidx.fragment.app.FragmentTransaction;
27 27 import androidx.lifecycle.Lifecycle;
28 28  
29   -import com.developer.wang.utils.PermissionUtils;
30 29 import com.prws.common.R;
31 30 import com.prws.common.net.INetEvent;
32 31 import com.prws.common.utils.LogUtil;
33 32 import com.prws.common.utils.ScreenUtils;
34   -import com.prws.common.utils.SharedPreferencesUtil;
35 33 import com.prws.common.view.LoadingView;
36 34  
37 35 import org.simple.eventbus.EventBus;
... ... @@ -161,16 +159,6 @@ public abstract class BaseActivity&lt;P extends BasePresenter, CONTRACT&gt; extends Ap
161 159 }
162 160  
163 161  
164   - private void addNavigationBar() {
165   - //判断是否有浮窗权限
166   - if (PermissionUtils.requestWindowManager(this)) {
167   - //开启浮窗
168   -// openFloatWindow();
169   - } else {
170   - showAlertDialogOfFloatWindow();
171   - }
172   - }
173   -
174 162 // public void openFloatWindow() {
175 163 // if (FloatWindow.get("navigation") == null) {
176 164 // NavigationBarView navigationBarView = new NavigationBarView(this);
... ...
libs/common/src/main/java/com/prws/common/config/SettingConfig.java
... ... @@ -3,8 +3,7 @@ package com.prws.common.config;
3 3 import android.content.Context;
4 4 import android.content.SharedPreferences;
5 5  
6   -import com.developer.wang.utils.SharedPreferencesUtils;
7   -import com.developer.wang.utils.gson.MyGson;
  6 +import com.google.gson.Gson;
8 7 import com.prws.common.CommonApplication;
9 8  
10 9  
... ... @@ -28,7 +27,7 @@ public class SettingConfig {
28 27 if (json == null || json.length() == 0) {
29 28 mInstance = new SettingConfig();
30 29 } else {
31   - mInstance = MyGson.buildGson().fromJson(json, SettingConfig.class);
  30 + mInstance = new Gson().fromJson(json, SettingConfig.class);
32 31 }
33 32 }
34 33 }
... ... @@ -40,7 +39,7 @@ public class SettingConfig {
40 39 public static void cacheToDisk() {
41 40 SharedPreferences sp = getSharedPreferences();
42 41 SharedPreferences.Editor editor = sp.edit();
43   - editor.putString("SettingConfig", MyGson.buildGson().toJson(getInstance()));
  42 + editor.putString("SettingConfig", new Gson().toJson(getInstance()));
44 43 editor.commit();
45 44 }
46 45 public static SharedPreferences getSharedPreferences(){
... ...
libs/common/src/main/java/com/prws/common/net/DownloadResponseBody.java
1 1 package com.prws.common.net;
2 2  
3   -
4   -
5   -import com.developer.wang.utils.MainHandler;
  3 +import android.os.Handler;
  4 +import android.os.Looper;
6 5  
7 6 import okhttp3.MediaType;
8 7 import okhttp3.ResponseBody;
... ... @@ -53,7 +52,7 @@ public class DownloadResponseBody extends ResponseBody {
53 52 }catch (final Exception e){
54 53 e.printStackTrace();
55 54 if (null != mDownloadListener) {
56   - MainHandler.getInstance().post(new Runnable() {
  55 + new Handler(Looper.getMainLooper()).post(new Runnable() {
57 56 @Override
58 57 public void run() {
59 58 mDownloadListener.onError(e);
... ...
libs/common/src/main/java/com/prws/common/net/NetWorks.java
... ... @@ -92,7 +92,7 @@ public class NetWorks extends RetrofitUtils {
92 92  
93 93  
94 94 @Headers("Content-Type: application/json")
95   - @POST("/api/v1/auth/login")
  95 + @POST("/api/v1/login/userLogin")
96 96 Observable<ResponseBody> login(@Body RequestBody body);
97 97  
98 98 @GET("/api/v1/resource/listGradeAndSubject")
... ...
libs/common/src/main/java/com/prws/common/utils/LogcatHelper.java
... ... @@ -2,9 +2,6 @@ package com.prws.common.utils;
2 2  
3 3 import android.content.Context;
4 4 import android.os.Environment;
5   -import android.util.Log;
6   -
7   -import com.developer.wang.utils.DateUtil;
8 5  
9 6 import java.io.BufferedReader;
10 7 import java.io.File;
... ... @@ -12,12 +9,8 @@ import java.io.FileNotFoundException;
12 9 import java.io.FileOutputStream;
13 10 import java.io.IOException;
14 11 import java.io.InputStreamReader;
15   -import java.nio.file.Files;
16   -import java.nio.file.Path;
17   -import java.nio.file.attribute.BasicFileAttributes;
18 12 import java.text.ParseException;
19 13 import java.text.SimpleDateFormat;
20   -import java.time.Instant;
21 14 import java.util.Date;
22 15  
23 16 public class LogcatHelper {
... ...