Commit ee4c3fd1533df19022732bd8698d219cbd3ffdaa
1 parent
6e28f761de
Exists in
master
个人中心部分问题的修复首页UI调整
Showing
49 changed files
with
678 additions
and
218 deletions
Show diff stats
PersonalCenter/app/src/main/AndroidManifest.xml
... | ... | @@ -132,7 +132,14 @@ |
132 | 132 | <service |
133 | 133 | android:name="com.hjx.personalcenter.update.DownloadService" |
134 | 134 | android:enabled="true"/> |
135 | + <receiver | |
136 | + android:name="com.hjx.personalcenter.service.StaticReceiver" | |
137 | + android:exported="true"> | |
138 | + <intent-filter > | |
139 | + <action android:name="com.ozing.launcher.SWITCH_GRADE"/> | |
140 | + </intent-filter> | |
135 | 141 | |
142 | + </receiver> | |
136 | 143 | </application> |
137 | 144 | <!--权限--> |
138 | 145 | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ChangeElectronicCardAdressInfoActivity.java
... | ... | @@ -23,6 +23,7 @@ import com.hjx.personalcenter.model.CityInfo; |
23 | 23 | import com.hjx.personalcenter.model.CountyInfo; |
24 | 24 | import com.hjx.personalcenter.model.ProvinceInfo; |
25 | 25 | import com.hjx.personalcenter.util.AlertUtils; |
26 | +import com.hjx.personalcenter.util.GetDevicesUtil; | |
26 | 27 | import com.hjx.personalcenter.util.Judgment; |
27 | 28 | import com.hjx.personalcenter.util.PhoneNumCheckUtils; |
28 | 29 | |
... | ... | @@ -132,7 +133,7 @@ public class ChangeElectronicCardAdressInfoActivity extends AppCompatActivity im |
132 | 133 | |
133 | 134 | } else { |
134 | 135 | //修改地址接口 |
135 | - String userID = SaveParam.getInstance().getLoginParam(this,"userId"); | |
136 | + String userID = GetDevicesUtil.getDevicesInfo(this).getDeviceNumber(); | |
136 | 137 | long auserID = 0; |
137 | 138 | try { |
138 | 139 | auserID = Long.parseLong(userID); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ElectronicCardValidationActivity.java
... | ... | @@ -18,6 +18,7 @@ import com.hjx.personalcenter.db.SaveParam; |
18 | 18 | import com.hjx.personalcenter.http.HttpCode; |
19 | 19 | import com.hjx.personalcenter.http.HttpManager; |
20 | 20 | import com.hjx.personalcenter.util.AlertUtils; |
21 | +import com.hjx.personalcenter.util.GetDevicesUtil; | |
21 | 22 | import com.hjx.personalcenter.util.PhoneNumCheckUtils; |
22 | 23 | |
23 | 24 | import org.json.JSONObject; |
... | ... | @@ -149,8 +150,9 @@ public class ElectronicCardValidationActivity extends AppCompatActivity implemen |
149 | 150 | |
150 | 151 | }else if (Content.authcodeflag==2){ |
151 | 152 | //修改保卡手机号 |
153 | + String userID22 = GetDevicesUtil.getDevicesInfo(this).getDeviceNumber(); | |
152 | 154 | HttpManager.getInstance().changecardinfophone(this, |
153 | - auserID,usernameStr,authcodeStr); | |
155 | + userID22,usernameStr,authcodeStr); | |
154 | 156 | }else { |
155 | 157 | String phone =phonenumber.getText().toString().trim(); |
156 | 158 | SaveParam.getInstance().saveCustomizeParam(this,SaveParam.CARDPHONE, phone ); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/MainActivity.java
... | ... | @@ -17,6 +17,7 @@ import android.support.v7.widget.RecyclerView; |
17 | 17 | import android.util.Log; |
18 | 18 | import android.view.KeyEvent; |
19 | 19 | import android.view.View; |
20 | +import android.widget.GridView; | |
20 | 21 | import android.widget.ImageView; |
21 | 22 | import android.widget.LinearLayout; |
22 | 23 | import android.widget.TextView; |
... | ... | @@ -28,8 +29,9 @@ import com.facebook.drawee.generic.GenericDraweeHierarchyBuilder; |
28 | 29 | import com.facebook.drawee.generic.RoundingParams; |
29 | 30 | import com.facebook.drawee.interfaces.DraweeController; |
30 | 31 | import com.facebook.drawee.view.SimpleDraweeView; |
32 | +import com.google.gson.Gson; | |
31 | 33 | import com.hjx.personalcenter.R; |
32 | -import com.hjx.personalcenter.adapter.GalleryAdapter; | |
34 | +import com.hjx.personalcenter.adapter.MianGridAdapter; | |
33 | 35 | import com.hjx.personalcenter.adapter.VideoAdapter; |
34 | 36 | import com.hjx.personalcenter.customdialog.HeadDialog; |
35 | 37 | import com.hjx.personalcenter.customdialog.RecyclerViewSpaceItem; |
... | ... | @@ -66,17 +68,18 @@ import java.util.ArrayList; |
66 | 68 | import java.util.List; |
67 | 69 | |
68 | 70 | public class MainActivity extends AppCompatActivity implements View.OnClickListener, DialogCallBack.CallBackView { |
69 | - private ImageView iv_imformatioan, iv_look_card, iv_setting, iv_sign, iv_sex; | |
70 | - private TextView tv_edit_presoninfo, tv_sign, | |
71 | + private ImageView iv_imformatioan, iv_setting, iv_sign, iv_sex,tv_edit_presoninfo; | |
72 | + private TextView tv_sign, | |
71 | 73 | tv_username, tv_username1, tv_mygad, tv_sex, tv_useinfo_adress, tv_useinfo_birthday, |
72 | 74 | tv_useinfo_qq, tv_useinfo_school, tv_useinfo_gender, tv_yangji; |
73 | - private LinearLayout linel_mycuoti, linel_mynote, linel_mycollege, linel_myclass; | |
75 | + private TextView linel_mycuoti, linel_mynote, linel_mycollege, linel_myclass,iv_look_card; | |
74 | 76 | private TopRightMenu mTopRightMenu; |
77 | + private LinearLayout view_novedeo; | |
75 | 78 | //水平滑动 |
76 | 79 | private RecyclerView mRecyclerView; |
77 | - private RecyclerView mRecyclerViewpublish; | |
80 | + private GridView mRecyclerViewpublish; | |
78 | 81 | private VideoAdapter RecyclerViewadapter; |
79 | - private GalleryAdapter RecyclerViewadapterpublish; | |
82 | + private MianGridAdapter RecyclerViewadapterpublish; | |
80 | 83 | private ArrayList<DefautPublishInfo.DataBean> defautPublishInfos = new ArrayList<>(); |
81 | 84 | |
82 | 85 | private ArrayList<VideoInfo.DataBean> videoinfo = new ArrayList<>(); |
... | ... | @@ -129,8 +132,27 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
129 | 132 | SaveParam.getInstance().saveLoginParam(MainActivity.this,SaveParam.ACCOUNTQQ,cardinfoBean.getQq()); |
130 | 133 | SaveParam.getInstance().saveLoginParam(MainActivity.this,SaveParam.ACCOUNTADRESS,cardinfoBean.getRegion().getRegionName()); |
131 | 134 | SaveParam.getInstance().saveLoginParam(MainActivity.this,SaveParam.ACCOUNTXINGZUO,cardinfoBean.getAddress()); |
135 | + SaveParam.getInstance().saveLoginParam(MainActivity.this,SaveParam.ADRESSID,cardinfoBean.getRegion().getRegionId()); | |
136 | + SaveParam.getInstance().saveLoginParam(MainActivity.this,SaveParam.PORTAIT,cardinfoBean.getPortrait()); | |
132 | 137 | String graderID = cardinfoBean.getGrade().getGradeId(); |
133 | 138 | Log.e("test","nianji"+graderID); |
139 | + try { | |
140 | + long auserID = Long.parseLong(graderID); | |
141 | + String ss =SaveParam.getInstance().getLoginParam(MainActivity.this, SaveParam.GRADENS); | |
142 | + if ((auserID<8)&&(ss ==null)){ | |
143 | + Intent intentbroad = new Intent(); | |
144 | + intentbroad.putExtra("info","小学"); | |
145 | + //4、定义广播发送的action | |
146 | + intentbroad.setAction("com.ozing.launcher.SWITCH_GRADE"); | |
147 | + //5、发送广播 | |
148 | + sendBroadcast(intentbroad); | |
149 | + Log.i("---", "发送完了"); | |
150 | + } | |
151 | + } catch (NumberFormatException e) { | |
152 | + e.printStackTrace(); | |
153 | + } | |
154 | + | |
155 | + | |
134 | 156 | SaveParam.getInstance().saveLoginParam(MainActivity.this, SaveParam.GRADENS, graderID); |
135 | 157 | String userID = SaveParam.getInstance().getLoginParam(MainActivity.this, "userId"); |
136 | 158 | //账户类型 |
... | ... | @@ -170,10 +192,19 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
170 | 192 | defautPublishInfos.clear(); |
171 | 193 | defautPublishInfos.addAll((List<DefautPublishInfo.DataBean>) msg.obj); |
172 | 194 | RecyclerViewadapterpublish.notifyDataSetChanged(); |
195 | + Gson gson = new Gson(); | |
196 | + Log.e("test","(List<DefautPublishInfo.DataBean>) msg.obj"+ gson.toJson( msg.obj)); | |
197 | + SaveParam.getInstance().saveLoginParam(MainActivity.this,SaveParam.VERSIONINTEFACE, gson.toJson( msg.obj)); | |
173 | 198 | break; |
174 | 199 | case HttpCode.GETVIDIO_SUCESS: |
175 | 200 | videoinfo.clear(); |
176 | - videoinfo.addAll((List<VideoInfo.DataBean>) msg.obj); | |
201 | + if (((List<VideoInfo.DataBean>) msg.obj).size()==0) { | |
202 | + view_novedeo.setVisibility(View.VISIBLE); | |
203 | + } else { | |
204 | + view_novedeo.setVisibility(View.GONE); | |
205 | + videoinfo.addAll((List<VideoInfo.DataBean>) msg.obj); | |
206 | + } | |
207 | + | |
177 | 208 | RecyclerViewadapter.notifyDataSetChanged(); |
178 | 209 | break; |
179 | 210 | case HttpCode.SUCHCARDINFOONE: |
... | ... | @@ -233,8 +264,8 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
233 | 264 | |
234 | 265 | private void initView() { |
235 | 266 | iv_imformatioan = (ImageView) findViewById(R.id.iv_imformatioan); |
236 | - iv_look_card = (ImageView) findViewById(R.id.iv_look_card); | |
237 | - tv_edit_presoninfo = (TextView) findViewById(R.id.tv_edit_presoninfo); | |
267 | + iv_look_card = (TextView) findViewById(R.id.iv_look_card); | |
268 | + tv_edit_presoninfo = (ImageView) findViewById(R.id.tv_edit_presoninfo); | |
238 | 269 | iv_setting = (ImageView) findViewById(R.id.iv_setting); |
239 | 270 | iv_sign = (ImageView) findViewById(R.id.iv_sign); |
240 | 271 | tv_sign = (TextView) findViewById(R.id.tv_sign); |
... | ... | @@ -253,14 +284,14 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
253 | 284 | tv_useinfo_gender = (TextView) findViewById(R.id.tv_useinfo_gender); |
254 | 285 | tv_yangji = (TextView) findViewById(R.id.tv_yangji); |
255 | 286 | //跳转其他应用 |
256 | - linel_mycuoti = (LinearLayout) findViewById(R.id.linel_mycuoti); | |
257 | - linel_mynote = (LinearLayout) findViewById(R.id.linel_mynote); | |
258 | - linel_mycollege = (LinearLayout) findViewById(R.id.linel_mycollege); | |
259 | - linel_myclass = (LinearLayout) findViewById(R.id.linel_myclass); | |
287 | + linel_mycuoti = (TextView) findViewById(R.id.linel_mycuoti); | |
288 | + linel_mynote = (TextView) findViewById(R.id.linel_mynote); | |
289 | + linel_mycollege = (TextView) findViewById(R.id.linel_mycollege); | |
290 | + linel_myclass = (TextView) findViewById(R.id.linel_myclass); | |
260 | 291 | // |
261 | 292 | mRecyclerView = (RecyclerView) findViewById(R.id.id_recyclerview_horizontal); |
262 | - mRecyclerViewpublish = (RecyclerView) findViewById(R.id.id_recyclerview_pubish); | |
263 | - | |
293 | + mRecyclerViewpublish = (GridView) findViewById(R.id.id_recyclerview_pubish); | |
294 | + view_novedeo = (LinearLayout) findViewById(R.id.view_novedeo); | |
264 | 295 | } |
265 | 296 | |
266 | 297 | |
... | ... | @@ -276,18 +307,18 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
276 | 307 | LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); |
277 | 308 | linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL); |
278 | 309 | |
279 | - LinearLayoutManager linearLayoutManagerpublish = new LinearLayoutManager(this); | |
280 | - linearLayoutManagerpublish.setOrientation(LinearLayoutManager.HORIZONTAL); | |
310 | +// LinearLayoutManager linearLayoutManagerpublish = new LinearLayoutManager(this); | |
311 | +// linearLayoutManagerpublish.setOrientation(LinearLayoutManager.HORIZONTAL); | |
281 | 312 | |
282 | 313 | mRecyclerView.setLayoutManager(linearLayoutManager); |
283 | 314 | mRecyclerView.addItemDecoration(new RecyclerViewSpaceItem(10)); |
284 | 315 | |
285 | - mRecyclerViewpublish.setLayoutManager(linearLayoutManagerpublish); | |
286 | - mRecyclerViewpublish.addItemDecoration(new RecyclerViewSpaceItem(10)); | |
316 | +// mRecyclerViewpublish.setLayoutManager(linearLayoutManagerpublish); | |
317 | +// mRecyclerViewpublish.addItemDecoration(new RecyclerViewSpaceItem(10)); | |
287 | 318 | |
288 | 319 | //设置视频适配器 |
289 | 320 | RecyclerViewadapter = new VideoAdapter(this, videoinfo); |
290 | - RecyclerViewadapterpublish = new GalleryAdapter(this, defautPublishInfos); | |
321 | + RecyclerViewadapterpublish = new MianGridAdapter(defautPublishInfos,this); | |
291 | 322 | |
292 | 323 | //版本信息适配器 |
293 | 324 | mRecyclerView.setAdapter(RecyclerViewadapter); |
... | ... | @@ -306,10 +337,21 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
306 | 337 | String userID = SaveParam.getInstance().getLoginParam(this, "userId"); |
307 | 338 | //获取个性签名 |
308 | 339 | String typeaccount = SaveParam.getInstance().getCustomizeParam(this, SaveParam.ACCOUNT); |
340 | + String childsID = SaveParam.getInstance().getCustomizeParam(this, SaveParam.CHILDSID); | |
341 | + | |
309 | 342 | try { |
310 | - long auserID = Long.parseLong(userID); | |
343 | + long auserID = 1; | |
344 | + long id = Long.parseLong(userID); | |
345 | + long childssID = Long.parseLong(childsID); | |
346 | + | |
311 | 347 | int typeaccount1 = Integer.parseInt(typeaccount); |
312 | - HttpManager.getInstance().getsignatures(MainActivity.this, auserID, typeaccount1, handler); | |
348 | + if (typeaccount1==2){ | |
349 | + auserID =childssID; | |
350 | + }else { | |
351 | + auserID =id; | |
352 | + } | |
353 | + | |
354 | + HttpManager.getInstance().getsignatures(MainActivity.this, auserID, typeaccount1, handler); | |
313 | 355 | |
314 | 356 | } catch (NumberFormatException e) { |
315 | 357 | e.printStackTrace(); |
... | ... | @@ -382,6 +424,17 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
382 | 424 | .setPositive("确定", new View.OnClickListener() { |
383 | 425 | @Override |
384 | 426 | public void onClick(View v) { |
427 | + String graderID = SaveParam.getInstance().getLoginParam(MainActivity.this, SaveParam.GRADENS); | |
428 | + int graderIDs = Integer.parseInt(graderID); | |
429 | + if (graderIDs<8){ | |
430 | + Intent intentbroad = new Intent(); | |
431 | + intentbroad.putExtra("info","小学"); | |
432 | + //4、定义广播发送的action | |
433 | + intentbroad.setAction("com.ozing.launcher.SWITCH_GRADE"); | |
434 | + //5、发送广播 | |
435 | + sendBroadcast(intentbroad); | |
436 | + Log.i("---", "发送完了"); | |
437 | + } | |
385 | 438 | //清除数据 |
386 | 439 | SaveParam.getInstance().clearData(MainActivity.this); |
387 | 440 | Intent settingintent = new Intent(); |
... | ... | @@ -418,7 +471,12 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
418 | 471 | // params.inputBackgroundResourceId = R.drawable.bg_input; |
419 | 472 | } |
420 | 473 | }) |
421 | - .setNegative("取消", null) | |
474 | + .setNegative("取消", new View.OnClickListener() { | |
475 | + @Override | |
476 | + public void onClick(View v) { | |
477 | + RecyclerViewadapterpublish.notifyDataSetChanged(); | |
478 | + } | |
479 | + }) | |
422 | 480 | .setPositiveInput("确定", new OnInputClickListener() { |
423 | 481 | @Override |
424 | 482 | public void onClick(String text, View v) { |
... | ... | @@ -444,10 +502,22 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
444 | 502 | .show(); |
445 | 503 | break; |
446 | 504 | case R.id.linel_mycuoti: |
447 | - AlertUtils.showToast(this, "我的错题 "); | |
505 | +// Intent intentbroad = new Intent(); | |
506 | +// //intentbroad.putExtra("info","小学"); | |
507 | +// //4、定义广播发送的action | |
508 | +// intentbroad.setAction("com.ozing.launcher.SWITCH_GRADE"); | |
509 | +// //5、发送广播 | |
510 | +// sendBroadcast(intentbroad); | |
511 | +// Log.i("---", "发送完了"); | |
448 | 512 | break; |
449 | 513 | case R.id.linel_mynote: |
450 | - AlertUtils.showToast(this, "我的笔记 "); | |
514 | +// Intent intentbroad1 = new Intent(); | |
515 | +// //intentbroad1.putExtra("info","中学"); | |
516 | +// //4、定义广播发送的action | |
517 | +// intentbroad1.setAction("com.ozing.launcher.SWITCH_GRADE"); | |
518 | +// //5、发送广播 | |
519 | +// sendBroadcast(intentbroad1); | |
520 | +// Log.i("---", "发送完了"); | |
451 | 521 | break; |
452 | 522 | case R.id.linel_mycollege: |
453 | 523 | AlertUtils.showToast(this, "我的收藏 "); |
... | ... | @@ -475,7 +545,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
475 | 545 | long auserID = Long.parseLong(userID); |
476 | 546 | int typeaccount1 = Integer.parseInt(accounts); |
477 | 547 | //获取最近播放视频 |
478 | - HttpManager.getInstance().getstuyvidioinfo(this, auserID, handler); | |
548 | + HttpManager.getInstance().getstuyvidioinfo(this, auserID, handler); | |
479 | 549 | //获取个人信息 |
480 | 550 | HttpManager.getInstance().getpresonalinfo(MainActivity.this, auserID, typeaccount1, handler); |
481 | 551 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/MyApplication.java
... | ... | @@ -35,8 +35,8 @@ public class MyApplication extends Application { |
35 | 35 | instance = this; |
36 | 36 | CrashReport.initCrashReport(getApplicationContext(), "c2170557a0", false); |
37 | 37 | CrashHandler crashHandler = CrashHandler.getInstance(); |
38 | - //生成错误日志,测试的时候得放开 | |
39 | - crashHandler.init(getApplicationContext()); | |
38 | + //生成错误日志,上线的时候得放开 | |
39 | + //crashHandler.init(getApplicationContext()); | |
40 | 40 | crashHandler.registerHandler(new CrashHandler.ExceptionHandler() { |
41 | 41 | |
42 | 42 | @Override | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/adapter/MianGridAdapter.java
... | ... | @@ -0,0 +1,66 @@ |
1 | +package com.hjx.personalcenter.adapter; | |
2 | + | |
3 | +import android.content.Context; | |
4 | +import android.view.View; | |
5 | +import android.view.ViewGroup; | |
6 | +import android.widget.BaseAdapter; | |
7 | +import android.widget.TextView; | |
8 | + | |
9 | +import com.facebook.drawee.view.SimpleDraweeView; | |
10 | +import com.hjx.personalcenter.R; | |
11 | +import com.hjx.personalcenter.model.DefautPublishInfo; | |
12 | + | |
13 | +import java.util.ArrayList; | |
14 | + | |
15 | +/** | |
16 | + * Created by h on 2017/9/12. | |
17 | + */ | |
18 | + | |
19 | +public class MianGridAdapter extends BaseAdapter { | |
20 | + private ArrayList<DefautPublishInfo.DataBean> defautPublishInfo; | |
21 | + private Context context; | |
22 | + | |
23 | + public MianGridAdapter(ArrayList<DefautPublishInfo.DataBean> defautPublishInfo, Context context) { | |
24 | + this.defautPublishInfo = defautPublishInfo; | |
25 | + this.context = context; | |
26 | + } | |
27 | + | |
28 | + @Override | |
29 | + public int getCount() { | |
30 | + return defautPublishInfo.size(); | |
31 | + } | |
32 | + | |
33 | + @Override | |
34 | + public Object getItem(int position) { | |
35 | + return position; | |
36 | + } | |
37 | + | |
38 | + @Override | |
39 | + public long getItemId(int position) { | |
40 | + return position; | |
41 | + } | |
42 | + | |
43 | + @Override | |
44 | + public View getView(int position, View convertView, ViewGroup parent) { | |
45 | + ViewHolder viewHolder = new ViewHolder(); | |
46 | + if (convertView == null) { | |
47 | + convertView = View.inflate(context, R.layout.fragment_changge_version_info_itmes4, null); | |
48 | + viewHolder.simpleDraweeView = (SimpleDraweeView) convertView.findViewById(R.id.image_publish); | |
49 | + //viewHolder.subject = (TextView) convertView.findViewById(R.id.subject); | |
50 | + viewHolder.publish = (TextView) convertView.findViewById(R.id.tv_publish); | |
51 | + convertView.setTag(viewHolder); | |
52 | + } else { | |
53 | + viewHolder = (ViewHolder) convertView.getTag(); | |
54 | + } | |
55 | + viewHolder.simpleDraweeView.setImageURI(defautPublishInfo.get(position).getCover()); | |
56 | + //viewHolder.subject.setText(defautPublishInfo.get(position).getSubject()); | |
57 | + viewHolder.publish.setText(defautPublishInfo.get(position).getPress()); | |
58 | + return convertView; | |
59 | + } | |
60 | + | |
61 | + static class ViewHolder { | |
62 | + SimpleDraweeView simpleDraweeView; | |
63 | + // TextView subject; | |
64 | + TextView publish; | |
65 | + } | |
66 | +} | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/customdialog/SchoolListDialog.java
... | ... | @@ -96,7 +96,7 @@ public class SchoolListDialog extends BaseCircleDialog implements AdapterView.On |
96 | 96 | school_sech = (EditText) getView().findViewById(R.id.et_school_sech); |
97 | 97 | cance = (ImageView) getView().findViewById(R.id.cancel); |
98 | 98 | String citys = SaveParam.getInstance().getsaveCityParam(getActivity(), SaveParam.CITYS); |
99 | - String country = SaveParam.getInstance().getsaveCityParam(getActivity(), SaveParam.COUNTRY); | |
99 | + String country = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.ADRESSID); | |
100 | 100 | if (country==null){ |
101 | 101 | country =citys; |
102 | 102 | } | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/db/SaveParam.java
... | ... | @@ -35,6 +35,8 @@ public class SaveParam { |
35 | 35 | public static String ACCOUNTSEX = "accountsex";//性别 |
36 | 36 | public static String ACCOUNTQQ= "accountqq";//qq |
37 | 37 | public static String ACCOUNTXINGZUO = "accountxingzuo";//详细地址 |
38 | + public static String PORTAIT = "portrait";//头像 | |
39 | + public static String ADRESSID = "adressid";//地址id | |
38 | 40 | |
39 | 41 | //电子保卡信息 |
40 | 42 | public static String CARDPHONE = "cardphone";//保卡手机号 |
... | ... | @@ -59,6 +61,8 @@ public class SaveParam { |
59 | 61 | public static String IMGURL = "imgurl"; |
60 | 62 | //版本名称 |
61 | 63 | public static String VERSION = "version"; |
64 | + //版本信息接口返回值 | |
65 | + public static String VERSIONINTEFACE = "versioninterface"; | |
62 | 66 | |
63 | 67 | |
64 | 68 | public void saveLoginParam(Context context,String spname, String spstr) { | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/PresonInfoFragment.java
1 | 1 | package com.hjx.personalcenter.fragment; |
2 | 2 | |
3 | +import android.content.Intent; | |
3 | 4 | import android.graphics.Color; |
4 | 5 | import android.os.Bundle; |
5 | 6 | import android.support.annotation.Nullable; |
... | ... | @@ -240,18 +241,27 @@ public class PresonInfoFragment extends Fragment implements View.OnClickListener |
240 | 241 | return; |
241 | 242 | } else { |
242 | 243 | int a = 0, b = 0; |
243 | - int d = 1; | |
244 | + int d = 1,gradeold =0; | |
244 | 245 | Object schoolids; |
245 | 246 | Long f = null; |
246 | - String regionId = SaveParam.getInstance().getsaveCityParam(getActivity(), SaveParam.COUNTRY); | |
247 | + String regionId2 = SaveParam.getInstance().getsaveCityParam(getActivity(), SaveParam.COUNTRY); | |
247 | 248 | String regionId1 = SaveParam.getInstance().getsaveCityParam(getActivity(), SaveParam.CITYS); |
248 | - if (regionId == null) { | |
249 | - regionId = regionId1; | |
249 | + String regionId = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.ADRESSID); | |
250 | + if (regionId == null ) { | |
251 | + if (regionId1!=null){ | |
252 | + regionId = regionId1; | |
253 | + }else { | |
254 | + regionId = regionId2; | |
255 | + } | |
256 | + | |
250 | 257 | } |
251 | - String grade = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.CHILDSGRADENS); | |
258 | + String gradeolds = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.GRADENS); | |
259 | + String grade = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.GRADENS); | |
252 | 260 | String schoolid = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.SCHOOOlID); |
253 | 261 | String type = SaveParam.getInstance().getCustomizeParam(getActivity(), SaveParam.ACCOUNT); |
254 | 262 | String userID = SaveParam.getInstance().getLoginParam(getActivity(), "userId"); |
263 | + String childsID = SaveParam.getInstance().getCustomizeParam(getActivity(), SaveParam.CHILDSID); | |
264 | + | |
255 | 265 | String devicenumber = GetDevicesUtil.getDevicesInfo(getActivity()).getDeviceNumber(); |
256 | 266 | String changeinfo = null; |
257 | 267 | if ("男".equals(presonal3)) { |
... | ... | @@ -262,13 +272,30 @@ public class PresonInfoFragment extends Fragment implements View.OnClickListener |
262 | 272 | try { |
263 | 273 | a = Integer.parseInt(regionId); |
264 | 274 | b = Integer.parseInt(grade); |
275 | + gradeold = Integer.parseInt(gradeolds); | |
276 | + if ((gradeold<8&&b>=8)||((gradeold>8&&b<=8))){ | |
277 | + Intent intentbroad = new Intent(); | |
278 | + intentbroad.putExtra("info","小学"); | |
279 | + //4、定义广播发送的action | |
280 | + intentbroad.setAction("com.ozing.launcher.SWITCH_GRADE"); | |
281 | + //5、发送广播 | |
282 | + getActivity().sendBroadcast(intentbroad); | |
283 | + Log.i("---", "发送完了"); | |
284 | + } | |
265 | 285 | if (TextUtils.isEmpty(presonal6)) { |
266 | 286 | schoolids = null; |
267 | 287 | } else { |
268 | 288 | schoolids = Long.parseLong(schoolid); |
269 | 289 | } |
270 | 290 | d = Integer.parseInt(type); |
271 | - f = Long.parseLong(userID); | |
291 | + if (d==2){ | |
292 | + f = Long.parseLong(childsID); | |
293 | + | |
294 | + }else{ | |
295 | + f = Long.parseLong(userID); | |
296 | + } | |
297 | + | |
298 | + | |
272 | 299 | //提交个人信息 |
273 | 300 | HttpManager.getInstance().changepresonalinfo(getActivity(), |
274 | 301 | f, d, presonal1, presonal5, b, a, schoolids, presonal8, changeinfo, presonal4 ,presonal2,devicenumber); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/http/HttpManager.java
... | ... | @@ -445,7 +445,7 @@ public class HttpManager { |
445 | 445 | } |
446 | 446 | |
447 | 447 | //修改保卡信息电话 |
448 | - public void changecardinfophone(final Context mContext, long userId, final String customerPhone, String authCode) { | |
448 | + public void changecardinfophone(final Context mContext, String userId, final String customerPhone, String authCode) { | |
449 | 449 | RequestParams params = new RequestParams(); |
450 | 450 | params.put("userId", userId); |
451 | 451 | params.put("customerPhone", customerPhone); |
... | ... | @@ -775,7 +775,7 @@ public class HttpManager { |
775 | 775 | public void changepublishinfo(final Context mContext, String userId, String chinese, |
776 | 776 | String math, String english, String physics, String chemistry, |
777 | 777 | String history, String geography, String political, String biology, String science) { |
778 | - mProgress = DialogPermission.showProgress(mContext, null, "正在保存个人信息...", | |
778 | + mProgress = DialogPermission.showProgress(mContext, null, "正在保存版本信息...", | |
779 | 779 | false, true, null); |
780 | 780 | RequestParams params = new RequestParams(); |
781 | 781 | params.put(HttpKey.USEID, userId); |
... | ... | @@ -1227,6 +1227,7 @@ public class HttpManager { |
1227 | 1227 | SaveParam.getInstance().saveLoginParam(mContext, SaveParam.HEADURL, imagUrl); |
1228 | 1228 | if (status.equals("1")) { |
1229 | 1229 | Toast.makeText(mContext, "头像上传成功。", Toast.LENGTH_LONG).show(); |
1230 | + SaveParam.getInstance().saveLoginParam(mContext,SaveParam.PORTAIT,imagUrl); | |
1230 | 1231 | } else { |
1231 | 1232 | AlertUtils.showToast(mContext, "你好,服务器异常,请稍后重试"); |
1232 | 1233 | } |
... | ... | @@ -1275,6 +1276,7 @@ public class HttpManager { |
1275 | 1276 | SaveParam.getInstance().saveLoginParam(mContext, SaveParam.HEADURL, imagUrl); |
1276 | 1277 | if (status.equals("1")) { |
1277 | 1278 | Toast.makeText(mContext, "头像上传成功。", Toast.LENGTH_LONG).show(); |
1279 | + SaveParam.getInstance().saveLoginParam(mContext,SaveParam.PORTAIT,imagUrl); | |
1278 | 1280 | } else { |
1279 | 1281 | AlertUtils.showToast(mContext, "你好,服务器异常,请稍后重试"); |
1280 | 1282 | } | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/model/UserInfoModer.java
... | ... | @@ -0,0 +1,92 @@ |
1 | +package com.hjx.personalcenter.model; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | + | |
5 | +/** | |
6 | + * Created by h on 2017/11/23. | |
7 | + */ | |
8 | + | |
9 | +public class UserInfoModer implements Serializable { | |
10 | + private String nickName; | |
11 | + private String gender; | |
12 | + private String address; | |
13 | + private String portrait; | |
14 | + private String school; | |
15 | + private String grade; | |
16 | + private String gradeid; | |
17 | + | |
18 | + public String getGradeid() { | |
19 | + return gradeid; | |
20 | + } | |
21 | + | |
22 | + public void setGradeid(String gradeid) { | |
23 | + this.gradeid = gradeid; | |
24 | + } | |
25 | + | |
26 | + private String birthday; | |
27 | + private String qq; | |
28 | + | |
29 | + public String getNickName() { | |
30 | + return nickName; | |
31 | + } | |
32 | + | |
33 | + public void setNickName(String nickName) { | |
34 | + this.nickName = nickName; | |
35 | + } | |
36 | + | |
37 | + public String getGender() { | |
38 | + return gender; | |
39 | + } | |
40 | + | |
41 | + public void setGender(String gender) { | |
42 | + this.gender = gender; | |
43 | + } | |
44 | + | |
45 | + public String getAddress() { | |
46 | + return address; | |
47 | + } | |
48 | + | |
49 | + public void setAddress(String address) { | |
50 | + this.address = address; | |
51 | + } | |
52 | + | |
53 | + public String getPortrait() { | |
54 | + return portrait; | |
55 | + } | |
56 | + | |
57 | + public void setPortrait(String portrait) { | |
58 | + this.portrait = portrait; | |
59 | + } | |
60 | + | |
61 | + public String getSchool() { | |
62 | + return school; | |
63 | + } | |
64 | + | |
65 | + public void setSchool(String school) { | |
66 | + this.school = school; | |
67 | + } | |
68 | + | |
69 | + public String getGrade() { | |
70 | + return grade; | |
71 | + } | |
72 | + | |
73 | + public void setGrade(String grade) { | |
74 | + this.grade = grade; | |
75 | + } | |
76 | + | |
77 | + public String getBirthday() { | |
78 | + return birthday; | |
79 | + } | |
80 | + | |
81 | + public void setBirthday(String birthday) { | |
82 | + this.birthday = birthday; | |
83 | + } | |
84 | + | |
85 | + public String getQq() { | |
86 | + return qq; | |
87 | + } | |
88 | + | |
89 | + public void setQq(String qq) { | |
90 | + this.qq = qq; | |
91 | + } | |
92 | +} | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/service/CenterService.java
... | ... | @@ -3,13 +3,13 @@ package com.hjx.personalcenter.service; |
3 | 3 | import android.content.Intent; |
4 | 4 | import android.os.IBinder; |
5 | 5 | import android.os.RemoteException; |
6 | -import android.util.Log; | |
7 | 6 | |
8 | 7 | import com.google.gson.Gson; |
9 | 8 | import com.hjx.personalcenter.activity.LoginAndRegisterActivity; |
10 | 9 | import com.hjx.personalcenter.db.SaveParam; |
11 | 10 | import com.hjx.personalcenter.model.CardInfo; |
12 | 11 | import com.hjx.personalcenter.model.LoginInfo; |
12 | +import com.hjx.personalcenter.model.UserInfoModer; | |
13 | 13 | import com.hjx.personalcenter.util.GetDevicesUtil; |
14 | 14 | |
15 | 15 | /** |
... | ... | @@ -68,7 +68,7 @@ public class CenterService extends BaseService { |
68 | 68 | |
69 | 69 | logininfo =gson.toJson(loginInfo); |
70 | 70 | |
71 | - Log.e("test","登录信息"+logininfo); | |
71 | + //Log.e("test","登录信息"+logininfo); | |
72 | 72 | |
73 | 73 | } |
74 | 74 | |
... | ... | @@ -95,19 +95,33 @@ public class CenterService extends BaseService { |
95 | 95 | dataBean.setMobilePhone(SaveParam.getInstance().getCustomizeParam(getApplication(),SaveParam.CARDPHONE)); |
96 | 96 | // cardInfo.setData(dataBean); |
97 | 97 | results =gson.toJson(dataBean); |
98 | - Log.e("test","保卡信息"+results); | |
98 | + //Log.e("test","保卡信息"+results); | |
99 | 99 | return results; |
100 | 100 | |
101 | 101 | } |
102 | 102 | |
103 | 103 | @Override |
104 | 104 | public String getUserInfo() throws RemoteException { |
105 | - return null; | |
105 | + String userinfo = null; | |
106 | + Gson gson = new Gson(); | |
107 | + UserInfoModer userInfoModer = new UserInfoModer(); | |
108 | + userInfoModer.setNickName(SaveParam.getInstance().getLoginParam(getApplication(),SaveParam.ACCOUNTUSERNAME)); | |
109 | + userInfoModer.setGrade(SaveParam.getInstance().getLoginParam(getApplication(),SaveParam.ACCOUNTGRADES)); | |
110 | + userInfoModer.setSchool(SaveParam.getInstance().getLoginParam(getApplication(),SaveParam.ACCOUNTSCHOOL)); | |
111 | + userInfoModer.setBirthday(SaveParam.getInstance().getLoginParam(getApplication(),SaveParam.ACCOUNTCONSTELLATION)); | |
112 | + userInfoModer.setGender(SaveParam.getInstance().getLoginParam(getApplication(),SaveParam.ACCOUNTSEX)); | |
113 | + userInfoModer.setQq(SaveParam.getInstance().getLoginParam(getApplication(),SaveParam.ACCOUNTQQ)); | |
114 | + userInfoModer.setAddress(SaveParam.getInstance().getLoginParam(getApplication(),SaveParam.ACCOUNTXINGZUO)); | |
115 | + userInfoModer.setPortrait(SaveParam.getInstance().getLoginParam(getApplication(),SaveParam.PORTAIT)); | |
116 | + userInfoModer.setGradeid(SaveParam.getInstance().getLoginParam(getApplication(),SaveParam.GRADENS)); | |
117 | + userinfo = gson.toJson(userInfoModer); | |
118 | + return userinfo; | |
106 | 119 | } |
107 | 120 | |
108 | 121 | @Override |
109 | 122 | public String logout() throws RemoteException { |
110 | - return null; | |
123 | + String visoninfo = SaveParam.getInstance().getLoginParam(getApplication(),SaveParam.VERSIONINTEFACE); | |
124 | + return visoninfo; | |
111 | 125 | } |
112 | 126 | |
113 | 127 | @Override |
... | ... | @@ -130,4 +144,9 @@ public class CenterService extends BaseService { |
130 | 144 | public IBinder onBind(Intent intent) { |
131 | 145 | return binder; |
132 | 146 | } |
147 | + | |
148 | + @Override | |
149 | + public void onDestroy() { | |
150 | + super.onDestroy(); | |
151 | + } | |
133 | 152 | } | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/service/StaticReceiver.java
... | ... | @@ -0,0 +1,20 @@ |
1 | +package com.hjx.personalcenter.service; | |
2 | + | |
3 | +import android.content.BroadcastReceiver; | |
4 | +import android.content.Context; | |
5 | +import android.content.Intent; | |
6 | +import android.util.Log; | |
7 | + | |
8 | +/** | |
9 | + * Created by h on 2017/11/20. | |
10 | + */ | |
11 | + | |
12 | +public class StaticReceiver extends BroadcastReceiver { | |
13 | + @Override | |
14 | + public void onReceive(Context context, Intent intent) { | |
15 | + String info = intent.getStringExtra("info"); | |
16 | + Log.i("---","onReceive"); | |
17 | + // 处理消息 | |
18 | + // Toast.makeText(context, info, Toast.LENGTH_LONG).show(); | |
19 | + } | |
20 | +} | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/util/GetDevicesUtil.java
... | ... | @@ -3,8 +3,7 @@ package com.hjx.personalcenter.util; |
3 | 3 | import android.content.Context; |
4 | 4 | import android.net.wifi.WifiInfo; |
5 | 5 | import android.net.wifi.WifiManager; |
6 | -import android.provider.Settings; | |
7 | -import android.telephony.TelephonyManager; | |
6 | +import android.os.Build; | |
8 | 7 | import android.util.Log; |
9 | 8 | |
10 | 9 | import com.hjx.personalcenter.model.DeviceInfo; |
... | ... | @@ -21,6 +20,7 @@ public class GetDevicesUtil { |
21 | 20 | } |
22 | 21 | |
23 | 22 | public static void initDevicesInfo(DeviceInfo mDeviceInfo,Context context){ |
23 | + //if (PermissionUtil.hasReadExternalStoragePermission((Activity) context)) | |
24 | 24 | mDeviceInfo.setDeviceModel(android.os.Build.MODEL); |
25 | 25 | Log.e(LOG_TAG,"" + mDeviceInfo.getDeviceModel()); |
26 | 26 | mDeviceInfo.setMac(getMacAddress(context)); |
... | ... | @@ -31,14 +31,17 @@ public class GetDevicesUtil { |
31 | 31 | } |
32 | 32 | |
33 | 33 | private static String getCPUSerial(Context context) { |
34 | - String cpuAddress = null; | |
35 | - TelephonyManager mTelephony = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); | |
36 | - if (mTelephony.getDeviceId() != null) { | |
37 | - cpuAddress = mTelephony.getDeviceId(); | |
38 | - } else { | |
39 | - //android.provider.Settings; | |
40 | - cpuAddress = Settings.Secure.getString(context.getApplicationContext().getContentResolver(), Settings.Secure.ANDROID_ID); | |
41 | - } | |
34 | + //String androidID = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); | |
35 | + String cpuAddress = Build.SERIAL; | |
36 | +// String cpuAddress = null; | |
37 | +// TelephonyManager mTelephony = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); | |
38 | +// //if (PermissionUtil.hasReadExternalStoragePermission((Activity) context)) | |
39 | +// if (mTelephony.getDeviceId() != null) { | |
40 | +// cpuAddress = mTelephony.getDeviceId(); | |
41 | +// } else { | |
42 | +// //android.provider.Settings; | |
43 | +// cpuAddress = Settings.Secure.getString(context.getApplicationContext().getContentResolver(), Settings.Secure.ANDROID_ID); | |
44 | +// } | |
42 | 45 | return cpuAddress; |
43 | 46 | } |
44 | 47 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/util/ISGradeChange.java
PersonalCenter/app/src/main/java/com/hjx/personalcenter/util/PermissionUtil.java
... | ... | @@ -14,7 +14,7 @@ import android.util.Log; |
14 | 14 | */ |
15 | 15 | public class PermissionUtil { |
16 | 16 | public static final int REQUEST_SHOWCAMERA = 0; |
17 | - public static final int REQUEST_READ_EXTERNAL_STORAGE = 1; | |
17 | + public static final int READ_PHONE_STATE = 1; | |
18 | 18 | public static final int REQUEST_RECORD_AUDIO = 2; |
19 | 19 | public static final int REQUEST_CONTACTS = 3; |
20 | 20 | public static final int REQUEST_LOCATION = 4; |
... | ... | @@ -31,12 +31,14 @@ public class PermissionUtil { |
31 | 31 | MIN_SDK_PERMISSIONS.put("android.permission.WRITE_CALL_LOG", 16); |
32 | 32 | MIN_SDK_PERMISSIONS.put("android.permission.SYSTEM_ALERT_WINDOW", 23); |
33 | 33 | MIN_SDK_PERMISSIONS.put("android.permission.WRITE_SETTINGS", 23); |
34 | + MIN_SDK_PERMISSIONS.put("android.permission.READ_PHONE_STATE", 23); | |
34 | 35 | } |
35 | 36 | private static boolean permissionExists(String permission) { |
36 | 37 | Integer minVersion = MIN_SDK_PERMISSIONS.get(permission); |
37 | 38 | return minVersion == null || Build.VERSION.SDK_INT >= minVersion; |
38 | 39 | } |
39 | 40 | |
41 | + | |
40 | 42 | public static boolean hasCameraPermission(Activity activity){ |
41 | 43 | int hasPermission = ContextCompat.checkSelfPermission(activity, |
42 | 44 | Manifest.permission.CAMERA); |
... | ... | @@ -55,15 +57,15 @@ public class PermissionUtil { |
55 | 57 | |
56 | 58 | public static boolean hasReadExternalStoragePermission(Activity activity){ |
57 | 59 | int hasPermission = ContextCompat.checkSelfPermission(activity, |
58 | - Manifest.permission.READ_EXTERNAL_STORAGE); | |
59 | - if(!permissionExists(Manifest.permission.READ_EXTERNAL_STORAGE)){ | |
60 | - Log.e("permission","your system does not suppport "+ Manifest.permission.READ_EXTERNAL_STORAGE+" permission"); | |
60 | + Manifest.permission.READ_PHONE_STATE); | |
61 | + if(!permissionExists(Manifest.permission.READ_PHONE_STATE)){ | |
62 | + Log.e("permission","your system does not suppport "+ Manifest.permission.READ_PHONE_STATE+" permission"); | |
61 | 63 | return false; |
62 | 64 | } |
63 | 65 | if (hasPermission != PackageManager.PERMISSION_GRANTED) { |
64 | 66 | ActivityCompat.requestPermissions(activity, |
65 | - new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, | |
66 | - PermissionUtil.REQUEST_READ_EXTERNAL_STORAGE); | |
67 | + new String[]{Manifest.permission.READ_PHONE_STATE}, | |
68 | + PermissionUtil.READ_PHONE_STATE); | |
67 | 69 | return false; |
68 | 70 | } |
69 | 71 | return true; | ... | ... |
PersonalCenter/app/src/main/res/drawable/corcle_blue_bg.xml
... | ... | @@ -4,10 +4,10 @@ |
4 | 4 | <solid |
5 | 5 | android:color="@color/white"/> |
6 | 6 | <corners |
7 | - android:bottomLeftRadius="20dp" | |
8 | - android:topLeftRadius="20dp" | |
9 | - android:bottomRightRadius="20dp" | |
10 | - android:topRightRadius="20dp"/> | |
7 | + android:bottomLeftRadius="10dp" | |
8 | + android:topLeftRadius="10dp" | |
9 | + android:bottomRightRadius="10dp" | |
10 | + android:topRightRadius="10dp"/> | |
11 | 11 | <stroke android:width="1dp" |
12 | 12 | android:color="@color/login_text_blue"/> |
13 | 13 | </shape> |
14 | 14 | \ No newline at end of file | ... | ... |
PersonalCenter/app/src/main/res/drawable/radio_button.xml
PersonalCenter/app/src/main/res/layout/activity_account_management.xml
... | ... | @@ -87,6 +87,9 @@ |
87 | 87 | android:layout_height="wrap_content" |
88 | 88 | android:layout_weight="1" |
89 | 89 | android:text="更换绑定" |
90 | + android:gravity="center" | |
91 | + android:textColor="@color/white" | |
92 | + android:background="@drawable/blue_btn_bg_pressed" | |
90 | 93 | android:textSize="22sp" /> |
91 | 94 | |
92 | 95 | <ImageView |
... | ... | @@ -124,6 +127,9 @@ |
124 | 127 | android:layout_height="wrap_content" |
125 | 128 | android:layout_weight="1" |
126 | 129 | android:text="修改密码" |
130 | + android:gravity="center" | |
131 | + android:textColor="@color/white" | |
132 | + android:background="@drawable/blue_btn_bg_pressed" | |
127 | 133 | android:textSize="22sp" /> |
128 | 134 | |
129 | 135 | <ImageView |
... | ... | @@ -191,6 +197,7 @@ |
191 | 197 | <LinearLayout |
192 | 198 | android:layout_width="match_parent" |
193 | 199 | android:layout_height="wrap_content" |
200 | + android:background="@mipmap/bg_zhuzhanghu" | |
194 | 201 | android:orientation="horizontal"> |
195 | 202 | |
196 | 203 | <com.facebook.drawee.view.SimpleDraweeView |
... | ... | @@ -255,7 +262,7 @@ |
255 | 262 | <View |
256 | 263 | android:layout_width="match_parent" |
257 | 264 | android:layout_height="0.7dp" |
258 | - android:layout_margin="10dp" | |
265 | + android:layout_marginBottom="10dp" | |
259 | 266 | android:background="@color/cutoff_line"> |
260 | 267 | |
261 | 268 | </View> | ... | ... |
PersonalCenter/app/src/main/res/layout/activity_main.xml
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | android:layout_width="match_parent" |
4 | 4 | android:layout_height="match_parent" |
5 | 5 | xmlns:fresco="http://schemas.android.com/apk/res-auto" |
6 | + android:background="@color/white" | |
6 | 7 | android:orientation="vertical"> |
7 | 8 | |
8 | 9 | <RelativeLayout |
... | ... | @@ -38,7 +39,7 @@ |
38 | 39 | android:layout_toLeftOf="@+id/iv_skin" |
39 | 40 | android:gravity="center_vertical" |
40 | 41 | android:padding="10dp" |
41 | - android:src="@mipmap/shezhi" | |
42 | + android:src="@mipmap/shezhi1" | |
42 | 43 | android:textColor="@android:color/white" |
43 | 44 | android:textSize="22sp" /> |
44 | 45 | |
... | ... | @@ -52,6 +53,7 @@ |
52 | 53 | android:padding="10dp" |
53 | 54 | android:src="@mipmap/pifu" |
54 | 55 | android:textColor="@android:color/white" |
56 | + android:visibility="gone" | |
55 | 57 | android:textSize="22sp" /> |
56 | 58 | |
57 | 59 | <ImageView |
... | ... | @@ -62,7 +64,7 @@ |
62 | 64 | android:layout_marginRight="10dp" |
63 | 65 | android:gravity="center_vertical" |
64 | 66 | android:padding="10dp" |
65 | - android:src="@mipmap/fankui" | |
67 | + android:src="@mipmap/fankui1" | |
66 | 68 | android:textColor="@android:color/white" |
67 | 69 | android:textSize="22sp" /> |
68 | 70 | |
... | ... | @@ -76,27 +78,24 @@ |
76 | 78 | <LinearLayout |
77 | 79 | android:layout_width="0dp" |
78 | 80 | android:layout_height="match_parent" |
79 | - android:layout_weight="1" | |
81 | + android:layout_weight="1.5" | |
80 | 82 | android:orientation="vertical"> |
83 | + <RelativeLayout | |
84 | + android:layout_width="wrap_content" | |
85 | + android:layout_height="250sp" | |
86 | + android:background="@mipmap/head_bg"> | |
81 | 87 | |
82 | 88 | <LinearLayout |
89 | + android:id="@+id/ssss" | |
83 | 90 | android:layout_width="match_parent" |
84 | 91 | android:layout_height="wrap_content" |
85 | - android:layout_marginTop="20dp" | |
92 | + android:layout_marginTop="28dp" | |
93 | + android:gravity="center" | |
86 | 94 | android:orientation="horizontal"> |
87 | - <ImageView | |
88 | - android:id="@+id/iv_look_card" | |
89 | - android:layout_width="wrap_content" | |
90 | - android:layout_height="wrap_content" | |
91 | - android:padding="10dp" | |
92 | - android:layout_marginLeft="20dp" | |
93 | - android:src="@mipmap/card_icoc" /> | |
94 | 95 | <com.facebook.drawee.view.SimpleDraweeView |
95 | 96 | android:id="@+id/iv_head" |
96 | - android:layout_width="60dp" | |
97 | - android:layout_height="60dp" | |
98 | - android:layout_marginLeft="60dp" | |
99 | - android:layout_gravity="center" | |
97 | + android:layout_width="65dp" | |
98 | + android:layout_height="65dp" | |
100 | 99 | fresco:placeholderImage="@mipmap/header_default" |
101 | 100 | fresco:roundAsCircle="true" |
102 | 101 | fresco:placeholderImageScaleType="fitCenter" /> |
... | ... | @@ -112,15 +111,19 @@ |
112 | 111 | android:gravity="center_vertical" |
113 | 112 | android:text="签到" |
114 | 113 | android:textColor="@color/login_text_blue" |
114 | + android:visibility="gone" | |
115 | 115 | android:textSize="18sp" /> |
116 | 116 | |
117 | 117 | </LinearLayout> |
118 | 118 | |
119 | 119 | <LinearLayout |
120 | + android:id="@+id/sssssss" | |
120 | 121 | android:layout_width="match_parent" |
121 | 122 | android:layout_height="wrap_content" |
122 | 123 | android:layout_marginLeft="20dp" |
124 | + android:layout_below="@id/ssss" | |
123 | 125 | android:layout_marginTop="20dp" |
126 | + android:gravity="center" | |
124 | 127 | android:orientation="horizontal"> |
125 | 128 | |
126 | 129 | <TextView |
... | ... | @@ -128,7 +131,7 @@ |
128 | 131 | android:layout_width="wrap_content" |
129 | 132 | android:layout_height="wrap_content" |
130 | 133 | android:text="" |
131 | - android:textSize="20dp" /> | |
134 | + android:textSize="20sp" /> | |
132 | 135 | <TextView |
133 | 136 | android:id="@+id/tv_yangji" |
134 | 137 | android:layout_marginLeft="5dp" |
... | ... | @@ -143,53 +146,50 @@ |
143 | 146 | android:layout_width="wrap_content" |
144 | 147 | android:layout_height="wrap_content" |
145 | 148 | android:layout_gravity="center_vertical" |
146 | - android:layout_marginLeft="50dp" | |
149 | + android:layout_marginLeft="5dp" | |
147 | 150 | android:src="@mipmap/men" /> |
148 | 151 | |
149 | 152 | </LinearLayout> |
150 | 153 | |
151 | 154 | <LinearLayout |
155 | + android:layout_below="@id/sssssss" | |
152 | 156 | android:layout_width="match_parent" |
153 | 157 | android:layout_height="wrap_content" |
154 | 158 | android:layout_marginLeft="20dp" |
155 | - android:layout_marginTop="20dp" | |
159 | + android:layout_marginTop="10dp" | |
156 | 160 | android:gravity="center" |
157 | 161 | android:orientation="horizontal"> |
158 | 162 | |
159 | 163 | <TextView |
160 | 164 | android:id="@+id/tv_sign" |
161 | - android:layout_width="0dp" | |
162 | 165 | android:layout_height="wrap_content" |
163 | - android:layout_weight="5" | |
166 | + android:layout_width="wrap_content" | |
164 | 167 | android:hint="请输入个性签名" |
165 | 168 | android:maxLines="3" |
169 | + android:maxLength="40" | |
166 | 170 | android:ellipsize="end" |
167 | - android:textSize="18sp" /> | |
171 | + android:textSize="16sp" /> | |
168 | 172 | |
169 | 173 | <ImageView |
170 | 174 | android:id="@+id/iv_sign" |
171 | - android:layout_width="0dp" | |
175 | + android:layout_width="wrap_content" | |
172 | 176 | android:layout_height="wrap_content" |
173 | - android:layout_weight="1" | |
174 | 177 | android:padding="10dp" |
175 | - android:src="@mipmap/pencil" /> | |
178 | + android:src="@mipmap/qianming" /> | |
176 | 179 | |
177 | 180 | |
178 | 181 | </LinearLayout> |
179 | - | |
182 | + </RelativeLayout> | |
180 | 183 | <View |
181 | 184 | android:layout_width="match_parent" |
182 | 185 | android:layout_height="0.7dp" |
183 | - android:layout_marginTop="20dp" | |
184 | 186 | android:background="@color/cutoff_line"> |
185 | 187 | |
186 | 188 | </View> |
187 | 189 | |
188 | 190 | <LinearLayout |
189 | - android:id="@+id/linel_mycuoti" | |
190 | 191 | android:layout_width="match_parent" |
191 | 192 | android:layout_height="wrap_content" |
192 | - android:layout_marginTop="30dp" | |
193 | 193 | android:orientation="vertical"> |
194 | 194 | |
195 | 195 | <LinearLayout |
... | ... | @@ -202,57 +202,53 @@ |
202 | 202 | android:layout_width="0dp" |
203 | 203 | android:layout_height="wrap_content" |
204 | 204 | android:layout_weight="1" |
205 | - android:src="@mipmap/wodecuoti" /> | |
205 | + android:paddingTop="20dp" | |
206 | + android:paddingBottom="20dp" | |
207 | + android:src="@mipmap/wodecuoti1" /> | |
206 | 208 | |
207 | 209 | <TextView |
210 | + android:id="@+id/linel_mycuoti" | |
208 | 211 | android:layout_width="0dp" |
209 | 212 | android:layout_height="wrap_content" |
210 | - android:layout_weight="5" | |
213 | + android:layout_weight="1" | |
214 | + android:paddingTop="20dp" | |
215 | + android:paddingBottom="20dp" | |
211 | 216 | android:text="我的错题" |
212 | 217 | android:textSize="20sp" /> |
218 | + <View | |
219 | + android:layout_width="1dp" | |
220 | + android:layout_height="match_parent" | |
221 | + android:background="@color/cutoff_line"> | |
213 | 222 | |
214 | - <ImageView | |
215 | - android:layout_width="0dp" | |
216 | - android:layout_height="wrap_content" | |
217 | - android:layout_weight="1" | |
218 | - android:src="@mipmap/youjiantou" /> | |
219 | - | |
220 | - </LinearLayout> | |
221 | - | |
222 | - <LinearLayout | |
223 | - android:id="@+id/linel_mynote" | |
224 | - android:layout_width="match_parent" | |
225 | - android:layout_height="wrap_content" | |
226 | - android:layout_marginTop="35dp" | |
227 | - android:gravity="center_vertical" | |
228 | - android:orientation="horizontal"> | |
223 | + </View> | |
229 | 224 | |
230 | 225 | <ImageView |
231 | 226 | android:layout_width="0dp" |
232 | 227 | android:layout_height="wrap_content" |
233 | 228 | android:layout_weight="1" |
234 | - android:src="@mipmap/wodebiji" /> | |
235 | - | |
229 | + android:paddingTop="20dp" | |
230 | + android:paddingBottom="20dp" | |
231 | + android:src="@mipmap/wodebiji1" /> | |
236 | 232 | <TextView |
233 | + android:id="@+id/linel_mynote" | |
237 | 234 | android:layout_width="0dp" |
238 | 235 | android:layout_height="wrap_content" |
239 | - android:layout_weight="5" | |
236 | + android:layout_weight="1" | |
237 | + android:paddingTop="20dp" | |
238 | + android:paddingBottom="20dp" | |
240 | 239 | android:text="我的笔记" |
241 | 240 | android:textSize="20sp" /> |
242 | 241 | |
243 | - <ImageView | |
244 | - android:layout_width="0dp" | |
245 | - android:layout_height="wrap_content" | |
246 | - android:layout_weight="1" | |
247 | - android:src="@mipmap/youjiantou" /> | |
248 | - | |
249 | 242 | </LinearLayout> |
243 | + <View | |
244 | + android:layout_width="match_parent" | |
245 | + android:layout_height="1dp" | |
246 | + android:background="@color/cutoff_line"> | |
250 | 247 | |
248 | + </View> | |
251 | 249 | <LinearLayout |
252 | - android:id="@+id/linel_mycollege" | |
253 | 250 | android:layout_width="match_parent" |
254 | 251 | android:layout_height="wrap_content" |
255 | - android:layout_marginTop="35dp" | |
256 | 252 | android:gravity="center_vertical" |
257 | 253 | android:orientation="horizontal"> |
258 | 254 | |
... | ... | @@ -260,59 +256,65 @@ |
260 | 256 | android:layout_width="0dp" |
261 | 257 | android:layout_height="wrap_content" |
262 | 258 | android:layout_weight="1" |
259 | + android:paddingTop="20dp" | |
260 | + android:paddingBottom="20dp" | |
263 | 261 | android:src="@mipmap/wodeshoucang" /> |
264 | 262 | |
265 | 263 | <TextView |
264 | + android:id="@+id/linel_mycollege" | |
266 | 265 | android:layout_width="0dp" |
267 | 266 | android:layout_height="wrap_content" |
268 | - android:layout_weight="5" | |
267 | + android:layout_weight="1" | |
268 | + android:paddingTop="20dp" | |
269 | + android:paddingBottom="20dp" | |
269 | 270 | android:text="我的收藏" |
270 | 271 | android:textSize="20sp" /> |
272 | + <View | |
273 | + android:layout_width="1dp" | |
274 | + android:layout_height="match_parent" | |
275 | + android:background="@color/cutoff_line"> | |
271 | 276 | |
272 | - <ImageView | |
273 | - android:layout_width="0dp" | |
274 | - android:layout_height="wrap_content" | |
275 | - android:layout_weight="1" | |
276 | - android:src="@mipmap/youjiantou" /> | |
277 | - | |
278 | - </LinearLayout> | |
279 | - | |
280 | - <LinearLayout | |
281 | - android:id="@+id/linel_myclass" | |
282 | - android:layout_width="match_parent" | |
283 | - android:layout_height="wrap_content" | |
284 | - android:layout_marginTop="35dp" | |
285 | - android:gravity="center_vertical" | |
286 | - android:orientation="horizontal"> | |
277 | + </View> | |
287 | 278 | |
288 | 279 | <ImageView |
289 | 280 | android:layout_width="0dp" |
290 | 281 | android:layout_height="wrap_content" |
291 | 282 | android:layout_weight="1" |
292 | - android:src="@mipmap/wodebanji" /> | |
293 | - | |
283 | + android:paddingTop="20dp" | |
284 | + android:paddingBottom="20dp" | |
285 | + android:src="@mipmap/wodebanji1" /> | |
294 | 286 | <TextView |
287 | + android:id="@+id/linel_myclass" | |
295 | 288 | android:layout_width="0dp" |
296 | 289 | android:layout_height="wrap_content" |
297 | - android:layout_weight="5" | |
290 | + android:layout_weight="1" | |
298 | 291 | android:text="我的班级" |
292 | + android:paddingTop="20dp" | |
293 | + android:paddingBottom="20dp" | |
299 | 294 | android:textSize="20sp" /> |
300 | 295 | |
301 | - <ImageView | |
302 | - android:layout_width="0dp" | |
303 | - android:layout_height="wrap_content" | |
304 | - android:layout_weight="1" | |
305 | - android:src="@mipmap/youjiantou" /> | |
306 | - | |
307 | 296 | </LinearLayout> |
308 | 297 | |
298 | + <View | |
299 | + android:layout_width="match_parent" | |
300 | + android:layout_height="0.7dp" | |
301 | + android:background="@color/cutoff_line"> | |
302 | + | |
303 | + </View> | |
309 | 304 | |
310 | 305 | </LinearLayout> |
306 | + <TextView | |
307 | + android:id="@+id/iv_look_card" | |
308 | + android:layout_width="wrap_content" | |
309 | + android:layout_height="wrap_content" | |
310 | + android:padding="10dp" | |
311 | + android:layout_gravity="center" | |
312 | + android:layout_marginTop="120dp" | |
313 | + android:text="查看电子保卡" /> | |
311 | 314 | |
312 | 315 | <LinearLayout |
313 | 316 | android:layout_width="match_parent" |
314 | 317 | android:layout_height="match_parent" |
315 | - android:layout_marginTop="120dp" | |
316 | 318 | android:background="@mipmap/xiaoguanggao"> |
317 | 319 | |
318 | 320 | </LinearLayout> |
... | ... | @@ -337,49 +339,6 @@ |
337 | 339 | <LinearLayout |
338 | 340 | android:layout_width="match_parent" |
339 | 341 | android:layout_height="wrap_content" |
340 | - android:layout_margin="20dp" | |
341 | - android:gravity="center_vertical" | |
342 | - android:orientation="horizontal"> | |
343 | - | |
344 | - <View | |
345 | - android:layout_width="5dp" | |
346 | - android:layout_height="20dp" | |
347 | - android:background="@color/login_text_blue"> | |
348 | - | |
349 | - </View> | |
350 | - | |
351 | - <TextView | |
352 | - android:layout_width="wrap_content" | |
353 | - android:layout_height="wrap_content" | |
354 | - android:layout_marginLeft="5dp" | |
355 | - android:text="最近学习" | |
356 | - android:textSize="22sp" /> | |
357 | - | |
358 | - </LinearLayout> | |
359 | - | |
360 | - <LinearLayout | |
361 | - android:layout_width="wrap_content" | |
362 | - android:layout_height="wrap_content"> | |
363 | - | |
364 | - <android.support.v7.widget.RecyclerView | |
365 | - android:id="@+id/id_recyclerview_horizontal" | |
366 | - android:layout_width="wrap_content" | |
367 | - android:layout_height="wrap_content" | |
368 | - android:layout_centerVertical="true" | |
369 | - android:scrollbars="none" /> | |
370 | - </LinearLayout> | |
371 | - | |
372 | - <View | |
373 | - android:layout_width="match_parent" | |
374 | - android:layout_height="0.7dp" | |
375 | - android:layout_marginTop="10dp" | |
376 | - android:background="@color/cutoff_line"> | |
377 | - | |
378 | - </View> | |
379 | - | |
380 | - <LinearLayout | |
381 | - android:layout_width="match_parent" | |
382 | - android:layout_height="wrap_content" | |
383 | 342 | android:layout_margin="10dp" |
384 | 343 | android:gravity="center_vertical" |
385 | 344 | android:orientation="horizontal"> |
... | ... | @@ -400,20 +359,20 @@ |
400 | 359 | android:textSize="22sp" /> |
401 | 360 | |
402 | 361 | <TextView |
403 | - android:id="@+id/tv_edit_presoninfo" | |
404 | - android:padding="5dp" | |
405 | 362 | android:layout_width="0dp" |
406 | 363 | android:layout_height="wrap_content" |
407 | 364 | android:layout_marginLeft="10dp" |
408 | - android:layout_weight="0.4" | |
409 | - android:text="编辑" | |
365 | + android:layout_weight="0.1" | |
366 | + android:text="" | |
410 | 367 | android:textSize="18sp" /> |
411 | 368 | |
412 | 369 | <ImageView |
370 | + android:id="@+id/tv_edit_presoninfo" | |
371 | + android:padding="10dp" | |
413 | 372 | android:layout_width="0dp" |
414 | 373 | android:layout_height="wrap_content" |
415 | - android:layout_weight="0.1" | |
416 | - android:src="@mipmap/youjiantou" /> | |
374 | + android:layout_weight="0.4" | |
375 | + android:src="@mipmap/gerenxinxibianji" /> | |
417 | 376 | |
418 | 377 | |
419 | 378 | </LinearLayout> |
... | ... | @@ -433,6 +392,7 @@ |
433 | 392 | <TextView |
434 | 393 | android:layout_width="0dp" |
435 | 394 | android:layout_height="wrap_content" |
395 | + android:textColor="@color/login_edittext_hint" | |
436 | 396 | android:layout_weight="1" |
437 | 397 | android:text="昵称" |
438 | 398 | android:textSize="20sp" /> |
... | ... | @@ -449,6 +409,7 @@ |
449 | 409 | android:layout_width="1dp" |
450 | 410 | android:layout_height="wrap_content" |
451 | 411 | android:layout_weight="1" |
412 | + android:textColor="@color/login_edittext_hint" | |
452 | 413 | android:text="星座" |
453 | 414 | android:textSize="20sp" /> |
454 | 415 | |
... | ... | @@ -471,6 +432,7 @@ |
471 | 432 | <TextView |
472 | 433 | android:layout_width="0dp" |
473 | 434 | android:layout_height="wrap_content" |
435 | + android:textColor="@color/login_edittext_hint" | |
474 | 436 | android:layout_weight="1" |
475 | 437 | android:text="性别" |
476 | 438 | android:textSize="20sp" /> |
... | ... | @@ -486,6 +448,7 @@ |
486 | 448 | <TextView |
487 | 449 | android:layout_width="1dp" |
488 | 450 | android:layout_height="wrap_content" |
451 | + android:textColor="@color/login_edittext_hint" | |
489 | 452 | android:layout_weight="1" |
490 | 453 | android:text="地区" |
491 | 454 | android:textSize="20sp" /> |
... | ... | @@ -513,6 +476,8 @@ |
513 | 476 | android:layout_height="wrap_content" |
514 | 477 | android:layout_weight="1" |
515 | 478 | android:text="生日" |
479 | + android:textColor="@color/login_edittext_hint" | |
480 | + | |
516 | 481 | android:textSize="20sp" /> |
517 | 482 | |
518 | 483 | <TextView |
... | ... | @@ -527,6 +492,8 @@ |
527 | 492 | android:layout_width="1dp" |
528 | 493 | android:layout_height="wrap_content" |
529 | 494 | android:layout_weight="1" |
495 | + android:textColor="@color/login_edittext_hint" | |
496 | + | |
530 | 497 | android:text="学校" |
531 | 498 | android:textSize="20sp" /> |
532 | 499 | |
... | ... | @@ -550,6 +517,7 @@ |
550 | 517 | android:layout_width="0dp" |
551 | 518 | android:layout_height="wrap_content" |
552 | 519 | android:layout_weight="1" |
520 | + android:textColor="@color/login_edittext_hint" | |
553 | 521 | android:text=" Q Q" |
554 | 522 | android:textSize="20sp" /> |
555 | 523 | |
... | ... | @@ -566,6 +534,8 @@ |
566 | 534 | android:layout_height="wrap_content" |
567 | 535 | android:layout_weight="1" |
568 | 536 | android:text="年级" |
537 | + android:textColor="@color/login_edittext_hint" | |
538 | + | |
569 | 539 | android:textSize="20sp" /> |
570 | 540 | |
571 | 541 | <TextView |
... | ... | @@ -582,7 +552,7 @@ |
582 | 552 | <View |
583 | 553 | android:layout_width="match_parent" |
584 | 554 | android:layout_height="0.7dp" |
585 | - android:layout_marginTop="20dp" | |
555 | + android:layout_marginTop="40dp" | |
586 | 556 | android:background="@color/cutoff_line"> |
587 | 557 | |
588 | 558 | </View> |
... | ... | @@ -596,6 +566,7 @@ |
596 | 566 | <View |
597 | 567 | android:layout_width="5dp" |
598 | 568 | android:layout_height="20dp" |
569 | + android:layout_marginTop="10dp" | |
599 | 570 | android:background="@color/login_text_blue"> |
600 | 571 | |
601 | 572 | </View> |
... | ... | @@ -610,21 +581,94 @@ |
610 | 581 | </LinearLayout> |
611 | 582 | |
612 | 583 | <LinearLayout |
613 | - android:layout_width="match_parent" | |
584 | + android:layout_width="wrap_content" | |
614 | 585 | android:layout_height="wrap_content" |
615 | - android:layout_marginTop="10dp"> | |
616 | - <android.support.v7.widget.RecyclerView | |
586 | + android:orientation="vertical" | |
587 | + android:gravity="center"> | |
588 | + | |
589 | + | |
590 | + <GridView | |
617 | 591 | android:id="@+id/id_recyclerview_pubish" |
592 | + android:layout_margin="3dp" | |
618 | 593 | android:layout_width="match_parent" |
619 | - android:layout_height="match_parent" | |
620 | - android:layout_centerVertical="true" | |
621 | - android:scrollbars="none" /> | |
594 | + android:layout_height="wrap_content" | |
595 | + android:gravity="center_vertical" | |
596 | + android:verticalSpacing="20dp" | |
597 | + android:numColumns="5"> | |
598 | + | |
599 | + </GridView> | |
622 | 600 | |
623 | 601 | |
624 | 602 | </LinearLayout> |
625 | 603 | |
626 | 604 | |
627 | 605 | </LinearLayout> |
606 | + <LinearLayout | |
607 | + android:layout_width="0dp" | |
608 | + android:layout_height="match_parent" | |
609 | + android:layout_weight="1" | |
610 | + android:background="@color/bgstudy_laout" | |
611 | + android:orientation="vertical"> | |
612 | + <LinearLayout | |
613 | + android:layout_width="match_parent" | |
614 | + android:layout_height="wrap_content" | |
615 | + android:layout_margin="20dp" | |
616 | + android:gravity="center_vertical" | |
617 | + android:orientation="horizontal"> | |
618 | + | |
619 | + <View | |
620 | + android:layout_width="5dp" | |
621 | + android:layout_height="20dp" | |
622 | + android:background="@color/login_text_blue"> | |
623 | + | |
624 | + </View> | |
625 | + | |
626 | + <TextView | |
627 | + android:layout_width="wrap_content" | |
628 | + android:layout_height="wrap_content" | |
629 | + android:layout_marginLeft="5dp" | |
630 | + android:text="最近学习" | |
631 | + android:textSize="22sp" /> | |
632 | + | |
633 | + </LinearLayout> | |
634 | + | |
635 | + <LinearLayout | |
636 | + android:layout_width="match_parent" | |
637 | + android:layout_height="match_parent" | |
638 | + android:gravity="center" | |
639 | + android:orientation="vertical" | |
640 | + > | |
641 | + <LinearLayout | |
642 | + android:id="@+id/view_novedeo" | |
643 | + android:layout_width="match_parent" | |
644 | + android:layout_height="match_parent" | |
645 | + android:gravity="center" | |
646 | + android:orientation="vertical" | |
647 | + android:visibility="gone"> | |
648 | + <ImageView | |
649 | + android:layout_width="wrap_content" | |
650 | + android:layout_height="wrap_content" | |
651 | + android:src="@mipmap/nostudy"/> | |
652 | + <TextView | |
653 | + android:layout_width="wrap_content" | |
654 | + android:layout_height="wrap_content" | |
655 | + android:layout_marginTop="20dp" | |
656 | + android:text="小主人最近还没有学习哦" | |
657 | + android:textSize="14sp" /> | |
658 | + <TextView | |
659 | + android:layout_width="wrap_content" | |
660 | + android:layout_height="wrap_content" | |
661 | + android:text="快去学习吧" | |
662 | + android:textSize="14sp" /> | |
663 | + </LinearLayout> | |
664 | + <android.support.v7.widget.RecyclerView | |
665 | + android:id="@+id/id_recyclerview_horizontal" | |
666 | + android:layout_width="wrap_content" | |
667 | + android:layout_height="wrap_content" | |
668 | + android:scrollbars="none" /> | |
669 | + </LinearLayout> | |
670 | + | |
671 | + </LinearLayout> | |
628 | 672 | |
629 | 673 | |
630 | 674 | </LinearLayout> | ... | ... |
PersonalCenter/app/src/main/res/layout/fragment_changge_presonal_info.xml
... | ... | @@ -138,7 +138,7 @@ |
138 | 138 | android:layout_width="wrap_content" |
139 | 139 | android:layout_height="wrap_content" |
140 | 140 | android:layout_marginLeft="50dp" |
141 | - android:textColor="@color/electronic_text" | |
141 | + android:textColor="@color/login_text_black" | |
142 | 142 | android:background="@null" |
143 | 143 | android:hint="请输入12个以内的中文或英文字符" |
144 | 144 | android:textSize="22sp" /> |
... | ... | @@ -260,7 +260,7 @@ |
260 | 260 | android:layout_width="wrap_content" |
261 | 261 | android:layout_height="wrap_content" |
262 | 262 | android:layout_marginLeft="50dp" |
263 | - android:textColor="@color/electronic_text" | |
263 | + android:textColor="@color/login_text_black" | |
264 | 264 | android:background="@null" |
265 | 265 | android:hint="请输入详细地址" |
266 | 266 | android:textSize="22sp" /> |
... | ... | @@ -412,7 +412,7 @@ |
412 | 412 | android:layout_height="wrap_content" |
413 | 413 | android:layout_marginLeft="50dp" |
414 | 414 | android:background="@null" |
415 | - android:textColor="@color/electronic_text" | |
415 | + android:textColor="@color/login_text_black" | |
416 | 416 | android:hint="请输入" |
417 | 417 | android:textSize="22sp" /> |
418 | 418 | ... | ... |
PersonalCenter/app/src/main/res/layout/fragment_changge_version_info_itmes2.xml
... | ... | @@ -13,9 +13,7 @@ |
13 | 13 | android:layout_width="80dp" |
14 | 14 | android:layout_height="100dp" |
15 | 15 | android:layout_gravity="center" |
16 | - android:background="@drawable/corcle_black_bg" | |
17 | - fresco:placeholderImage="@mipmap/header_default" | |
18 | - fresco:roundAsCircle="true" | |
16 | + fresco:placeholderImage="@mipmap/bgsubject" | |
19 | 17 | fresco:placeholderImageScaleType="fitCenter" /> |
20 | 18 | |
21 | 19 | <TextView | ... | ... |
PersonalCenter/app/src/main/res/layout/fragment_changge_version_info_itmes3.xml
... | ... | @@ -12,9 +12,7 @@ |
12 | 12 | android:layout_width="100dp" |
13 | 13 | android:layout_height="150dp" |
14 | 14 | android:layout_gravity="center" |
15 | - android:background="@drawable/corcle_black_bg" | |
16 | - fresco:placeholderImage="@mipmap/header_default" | |
17 | - fresco:roundAsCircle="true" | |
15 | + fresco:placeholderImage="@mipmap/bgsubject" | |
18 | 16 | fresco:placeholderImageScaleType="fitCenter" /> |
19 | 17 | |
20 | 18 | <TextView | ... | ... |
PersonalCenter/app/src/main/res/layout/fragment_changge_version_info_itmes4.xml
... | ... | @@ -0,0 +1,32 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
3 | + xmlns:fresco="http://schemas.android.com/apk/res-auto" | |
4 | + android:layout_width="match_parent" | |
5 | + android:layout_height="match_parent" | |
6 | + android:gravity="center" | |
7 | + android:orientation="vertical"> | |
8 | + | |
9 | + | |
10 | + <com.facebook.drawee.view.SimpleDraweeView | |
11 | + android:id="@+id/image_publish" | |
12 | + android:layout_width="100dp" | |
13 | + android:layout_height="140dp" | |
14 | + android:layout_gravity="center" | |
15 | + fresco:placeholderImage="@mipmap/bgsubject" | |
16 | + fresco:placeholderImageScaleType="fitCenter" /> | |
17 | + | |
18 | + | |
19 | + <TextView | |
20 | + android:id="@+id/tv_publish" | |
21 | + android:layout_width="80dp" | |
22 | + android:layout_height="wrap_content" | |
23 | + android:layout_marginTop="5dp" | |
24 | + android:width="80dp" | |
25 | + android:ellipsize="end" | |
26 | + android:gravity="center" | |
27 | + android:singleLine="true" | |
28 | + android:text="" | |
29 | + android:textColor="@color/login_text_black" | |
30 | + android:textSize="16sp" /> | |
31 | + | |
32 | +</LinearLayout> | |
0 | 33 | \ No newline at end of file | ... | ... |
PersonalCenter/app/src/main/res/layout/recycler_childaccunt_item_view.xml
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | <LinearLayout |
15 | 15 | android:layout_width="match_parent" |
16 | 16 | android:layout_height="wrap_content" |
17 | + android:background="@mipmap/zizhanghu" | |
17 | 18 | android:orientation="horizontal"> |
18 | 19 | <com.facebook.drawee.view.SimpleDraweeView |
19 | 20 | android:id="@+id/iv_child_head" |
... | ... | @@ -78,7 +79,7 @@ |
78 | 79 | <View |
79 | 80 | android:layout_width="wrap_content" |
80 | 81 | android:layout_height="0.7dp" |
81 | - android:layout_margin="10dp" | |
82 | + android:layout_marginBottom="10dp" | |
82 | 83 | android:background="@color/cutoff_line"> |
83 | 84 | |
84 | 85 | </View> | ... | ... |
PersonalCenter/app/src/main/res/mipmap-xhdpi/bg_zhuzhang.png
19.2 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/bg_zhuzhanghu.png
18 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/bgsubject.png
2.27 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/chuzhongdili7lower.jpg
598 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/chuzhongshuxue6upper.jpg
411 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/chuzhongwuli8lower.jpg
497 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/chuzhongyingyu4ce.jpg
322 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/chuzhongyuwen9total.jpg
341 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/chuzhongzhengzhi6upper.jpg
703 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/fankui1.png
1.92 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/gerenxinxibianji.png
1.54 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/head_bg.png
93.7 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/nostudy.png
20.2 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/qianming.png
1.31 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/shezhi1.png
2.04 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/shiyongzhong.png
PersonalCenter/app/src/main/res/mipmap-xhdpi/wodebanji1.png
7.7 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/wodebiji1.png
7.93 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/wodecuoti1.png
5.68 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/wodeshoucang.png
PersonalCenter/app/src/main/res/mipmap-xhdpi/zizhanghu.png
14.2 KB
PersonalCenter/app/src/main/res/values/colors.xml
PersonalCenter/mypresonallibrary/src/main/java/com/hjx/mypresonallibrary/PresonalHelper.java
... | ... | @@ -134,4 +134,52 @@ public class PresonalHelper implements DialogInterface.OnDismissListener{ |
134 | 134 | } |
135 | 135 | }).start(); |
136 | 136 | } |
137 | + public void getUserInfo(final Context context, final PresonalCallBack callBack){ | |
138 | + if(callBack == null){ | |
139 | + throw new IllegalArgumentException("call back can not null"); | |
140 | + } | |
141 | + new Thread(new Runnable() { | |
142 | + | |
143 | + @Override | |
144 | + public void run() { | |
145 | + String result = null; | |
146 | + try { | |
147 | + checkBind(context); | |
148 | + if(!isRun){ | |
149 | + result = buildNotRun(); | |
150 | + }else{ | |
151 | + result = center.getUserInfo(); | |
152 | + } | |
153 | + } catch (RemoteException e) { | |
154 | + e.printStackTrace(); | |
155 | + result = buildRemoteError(); | |
156 | + } | |
157 | + callBack.result(result); | |
158 | + } | |
159 | + }).start(); | |
160 | + } | |
161 | + public void getVersionInfo(final Context context, final PresonalCallBack callBack){ | |
162 | + if(callBack == null){ | |
163 | + throw new IllegalArgumentException("call back can not null"); | |
164 | + } | |
165 | + new Thread(new Runnable() { | |
166 | + | |
167 | + @Override | |
168 | + public void run() { | |
169 | + String result = null; | |
170 | + try { | |
171 | + checkBind(context); | |
172 | + if(!isRun){ | |
173 | + result = buildNotRun(); | |
174 | + }else{ | |
175 | + result = center.logout(); | |
176 | + } | |
177 | + } catch (RemoteException e) { | |
178 | + e.printStackTrace(); | |
179 | + result = buildRemoteError(); | |
180 | + } | |
181 | + callBack.result(result); | |
182 | + } | |
183 | + }).start(); | |
184 | + } | |
137 | 185 | } | ... | ... |
PersonalCenter/pickerview/src/main/res/drawable/corcle_black_bg.xml
... | ... | @@ -4,10 +4,10 @@ |
4 | 4 | <solid |
5 | 5 | android:color="@color/white"/> |
6 | 6 | <corners |
7 | - android:bottomLeftRadius="20dp" | |
8 | - android:topLeftRadius="20dp" | |
9 | - android:bottomRightRadius="20dp" | |
10 | - android:topRightRadius="20dp"/> | |
7 | + android:bottomLeftRadius="10dp" | |
8 | + android:topLeftRadius="10dp" | |
9 | + android:bottomRightRadius="10dp" | |
10 | + android:topRightRadius="10dp"/> | |
11 | 11 | <stroke android:width="1dp" |
12 | 12 | android:color="@color/login_edittext_hint"/> |
13 | 13 | </shape> |
14 | 14 | \ No newline at end of file | ... | ... |