Commit 03b99a4c5f8451b9dc99604dd5c0d71c9c277d77
1 parent
66c44ff220
Exists in
master
最新版个人中心
Showing
8 changed files
with
54 additions
and
28 deletions
Show diff stats
PersonalCenter/app/build.gradle
... | ... | @@ -7,8 +7,8 @@ android { |
7 | 7 | applicationId "com.hjx.personalcenter" |
8 | 8 | minSdkVersion 15 |
9 | 9 | targetSdkVersion 25 |
10 | - versionCode 3 | |
11 | - versionName "1.0.3" | |
10 | + versionCode 4 | |
11 | + versionName "1.0.4" | |
12 | 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
13 | 13 | } |
14 | 14 | buildTypes { | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/MainActivity.java
... | ... | @@ -221,6 +221,7 @@ public class MainActivity extends FragmentActivity implements View.OnClickListen |
221 | 221 | tv_yangji.setVisibility(View.GONE); |
222 | 222 | iv_look_card.setVisibility(View.VISIBLE); |
223 | 223 | AlertUtils.showToast(MainActivity.this, "您的机器还没有保卡信息或该机器已置为样机,请重新登录"); |
224 | + SaveParam.getInstance().clearData(MainActivity.this); | |
224 | 225 | Intent settingintent = new Intent(); |
225 | 226 | settingintent.setClass(MainActivity.this, LoginAndRegisterActivity.class); |
226 | 227 | startActivity(settingintent); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/MyApplication.java
... | ... | @@ -33,7 +33,7 @@ public class MyApplication extends Application { |
33 | 33 | CrashReport.initCrashReport(getApplicationContext(), "c2170557a0", false); |
34 | 34 | CrashHandler crashHandler = CrashHandler.getInstance(); |
35 | 35 | //生成错误日志,上线的时候得放开 |
36 | - //crashHandler.init(getApplicationContext()); | |
36 | + crashHandler.init(getApplicationContext()); | |
37 | 37 | crashHandler.registerHandler(new CrashHandler.ExceptionHandler() { |
38 | 38 | |
39 | 39 | @Override | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/adapter/GridAdapter.java
... | ... | @@ -60,7 +60,32 @@ public class GridAdapter extends BaseAdapter { |
60 | 60 | if (position==2){ |
61 | 61 | viewHolder.simpleDraweeView.setBackgroundResource(imageid[position]); |
62 | 62 | }else { |
63 | - viewHolder.simpleDraweeView.setBackgroundResource(imageids[position]); | |
63 | + if (defautPublishInfo.get(position).getSubject().contains("语文")){ | |
64 | + viewHolder.simpleDraweeView.setBackgroundResource(imageids[0]); | |
65 | + }else if (defautPublishInfo.get(position).getSubject().contains("数学")) { | |
66 | + viewHolder.simpleDraweeView.setBackgroundResource(imageids[1]); | |
67 | + }else if (defautPublishInfo.get(position).getSubject().contains("英语")) { | |
68 | + viewHolder.simpleDraweeView.setBackgroundResource(imageids[2]); | |
69 | + }else if (defautPublishInfo.get(position).getSubject().contains("物理")) { | |
70 | + viewHolder.simpleDraweeView.setBackgroundResource(imageids[3]); | |
71 | + }else if (defautPublishInfo.get(position).getSubject().contains("化学")) { | |
72 | + viewHolder.simpleDraweeView.setBackgroundResource(imageids[4]); | |
73 | + }else if (defautPublishInfo.get(position).getSubject().contains("生物")) { | |
74 | + viewHolder.simpleDraweeView.setBackgroundResource(imageids[5]); | |
75 | + }else if (defautPublishInfo.get(position).getSubject().contains("政治")) { | |
76 | + viewHolder.simpleDraweeView.setBackgroundResource(imageids[6]); | |
77 | + }else if (defautPublishInfo.get(position).getSubject().contains("历史")) { | |
78 | + viewHolder.simpleDraweeView.setBackgroundResource(imageids[7]); | |
79 | + }else if (defautPublishInfo.get(position).getSubject().contains("地理")) { | |
80 | + viewHolder.simpleDraweeView.setBackgroundResource(imageids[8]); | |
81 | + } | |
82 | + | |
83 | + | |
84 | + | |
85 | + | |
86 | + | |
87 | + | |
88 | + | |
64 | 89 | } |
65 | 90 | viewHolder.subject.setText(defautPublishInfo.get(position).getSubject()); |
66 | 91 | viewHolder.publish.setText(defautPublishInfo.get(position).getPress()); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/VersionsInfoFragment.java
... | ... | @@ -199,30 +199,30 @@ public class VersionsInfoFragment extends Fragment implements AdapterView.OnItem |
199 | 199 | |
200 | 200 | @Override |
201 | 201 | public void onResume() { |
202 | - String userID = SaveParam.getInstance().getLoginParam(getActivity(), "userId"); | |
203 | - String graderid = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.GRADENS); | |
204 | -// //子账户年级id | |
205 | -// String graderidchilds = SaveParam.getInstance().getCustomizeParam(getActivity(), SaveParam.CHILDSGRADENS); | |
206 | - //账户类型 | |
207 | - String accounts = SaveParam.getInstance().getCustomizeParam(getActivity(), SaveParam.ACCOUNT); | |
208 | - String childID = SaveParam.getInstance().getCustomizeParam(getActivity(),SaveParam.CHILDSID); | |
209 | - try { | |
210 | - Object auserID; | |
211 | - int type; | |
212 | - int graderIDs =Integer.parseInt(graderid); | |
213 | - if ("2".equals(accounts)){ | |
214 | - type=Integer.parseInt(accounts); | |
215 | - auserID =childID; | |
216 | - }else { | |
217 | - type =Integer.parseInt(accounts); | |
218 | - auserID =Long.parseLong(userID); | |
219 | - } | |
220 | - //获取版本信息 | |
221 | - HttpManager.getInstance().getpublishinfo(getActivity(),auserID,graderIDs,type,handler); | |
222 | - | |
223 | - } catch (NumberFormatException e) { | |
224 | - e.printStackTrace(); | |
225 | - } | |
202 | +// String userID = SaveParam.getInstance().getLoginParam(getActivity(), "userId"); | |
203 | +// String graderid = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.GRADENS); | |
204 | +//// //子账户年级id | |
205 | +//// String graderidchilds = SaveParam.getInstance().getCustomizeParam(getActivity(), SaveParam.CHILDSGRADENS); | |
206 | +// //账户类型 | |
207 | +// String accounts = SaveParam.getInstance().getCustomizeParam(getActivity(), SaveParam.ACCOUNT); | |
208 | +// String childID = SaveParam.getInstance().getCustomizeParam(getActivity(),SaveParam.CHILDSID); | |
209 | +// try { | |
210 | +// Object auserID; | |
211 | +// int type; | |
212 | +// int graderIDs =Integer.parseInt(graderid); | |
213 | +// if ("2".equals(accounts)){ | |
214 | +// type=Integer.parseInt(accounts); | |
215 | +// auserID =childID; | |
216 | +// }else { | |
217 | +// type =Integer.parseInt(accounts); | |
218 | +// auserID =Long.parseLong(userID); | |
219 | +// } | |
220 | +// //获取版本信息 | |
221 | +// HttpManager.getInstance().getpublishinfo(getActivity(),auserID,graderIDs,type,handler); | |
222 | +// | |
223 | +// } catch (NumberFormatException e) { | |
224 | +// e.printStackTrace(); | |
225 | +// } | |
226 | 226 | super.onResume(); |
227 | 227 | |
228 | 228 | } | ... | ... |
PersonalCenter/app/src/main/res/mipmap-hdpi/head_default.png
5.72 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/head_default.png
5.72 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/header_default.png