Commit 1671ec5d6dd3951b631357c73de0362ef95d0916
1 parent
7b3114a64f
Exists in
master
个人中心bug修复
Showing
24 changed files
with
458 additions
and
241 deletions
Show diff stats
PersonalCenter/.idea/misc.xml
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | <ConfirmationsSetting value="0" id="Add" /> |
38 | 38 | <ConfirmationsSetting value="0" id="Remove" /> |
39 | 39 | </component> |
40 | - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | |
40 | + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | |
41 | 41 | <output url="file://$PROJECT_DIR$/build/classes" /> |
42 | 42 | </component> |
43 | 43 | <component name="ProjectType"> | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/AccountManagementActivity.java
... | ... | @@ -121,7 +121,6 @@ public class AccountManagementActivity extends AppCompatActivity implements View |
121 | 121 | mSimpleDraweeView = (SimpleDraweeView) findViewById(R.id.tv_account_head); |
122 | 122 | iv_useing = (ImageView) findViewById(R.id.iv_shiyongzhong); |
123 | 123 | cancel = (ImageView) findViewById(R.id.cancel); |
124 | - add_accunt = (LinearLayout) findViewById(R.id.add_account); | |
125 | 124 | ll_zhu_backgrangd = (LinearLayout) findViewById(R.id.ll_zhu_backgrangd); |
126 | 125 | tv_changzhu = (TextView) findViewById(R.id.change_zhu_account); |
127 | 126 | listview = (RecyclerView) findViewById(R.id.id_recyclerview_horizontal); |
... | ... | @@ -167,7 +166,6 @@ public class AccountManagementActivity extends AppCompatActivity implements View |
167 | 166 | changbangding.setOnClickListener(this); |
168 | 167 | changpassword.setOnClickListener(this); |
169 | 168 | cancel.setOnClickListener(this); |
170 | - add_accunt.setOnClickListener(this); | |
171 | 169 | tv_changzhu.setOnClickListener(this); |
172 | 170 | |
173 | 171 | |
... | ... | @@ -189,14 +187,6 @@ public class AccountManagementActivity extends AppCompatActivity implements View |
189 | 187 | startActivity(changpwd); |
190 | 188 | overridePendingTransition(R.anim.rightin, R.anim.rightout); |
191 | 189 | break; |
192 | - case R.id.add_account: | |
193 | - Content.accountflag =2; | |
194 | - Intent account = new Intent(); | |
195 | - account.setClass(AccountManagementActivity.this, RegisterInfoActivity.class); | |
196 | - startActivity(account); | |
197 | - overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
198 | - | |
199 | - break; | |
200 | 190 | case R.id.change_zhu_account: |
201 | 191 | Content.changgeaccountflag = 1; |
202 | 192 | String userID = SaveParam.getInstance().getLoginParam(this, "userId"); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ChangePresonalInfoActivity.java
... | ... | @@ -4,15 +4,11 @@ import android.os.Bundle; |
4 | 4 | import android.support.v4.app.Fragment; |
5 | 5 | import android.support.v4.view.ViewPager; |
6 | 6 | import android.support.v7.app.AppCompatActivity; |
7 | -import android.view.View; | |
8 | -import android.widget.ImageView; | |
9 | -import android.widget.TextView; | |
10 | 7 | |
11 | 8 | import com.hjx.personalcenter.R; |
12 | 9 | import com.hjx.personalcenter.adapter.LoginAndRegisterAdapter; |
13 | 10 | import com.hjx.personalcenter.fragment.PresonInfoFragment; |
14 | 11 | import com.hjx.personalcenter.fragment.VersionsInfoFragment; |
15 | -import com.hjx.personalcenter.thirdparty.SlidingTabLayout; | |
16 | 12 | |
17 | 13 | import java.util.ArrayList; |
18 | 14 | import java.util.Arrays; |
... | ... | @@ -24,11 +20,21 @@ import java.util.List; |
24 | 20 | |
25 | 21 | public class ChangePresonalInfoActivity extends AppCompatActivity { |
26 | 22 | private ViewPager viewPager; |
27 | - private SlidingTabLayout tableLayout; | |
28 | - private TextView subsave; | |
29 | - private ImageView cancel; | |
23 | + // private SlidingTabLayout tableLayout; | |
30 | 24 | private List<Fragment> presoninfo; |
31 | 25 | private LoginAndRegisterAdapter presoninfodapter; |
26 | + public interface Fragment2Fragment{ | |
27 | + public void gotoFragment(ViewPager viewPager); | |
28 | + } | |
29 | + private Fragment2Fragment fragment2Fragment; | |
30 | + public void setFragment2Fragment(Fragment2Fragment fragment2Fragment){ | |
31 | + this.fragment2Fragment = fragment2Fragment; | |
32 | + } | |
33 | + public void forSkip(){ | |
34 | + if(fragment2Fragment!=null){ | |
35 | + fragment2Fragment.gotoFragment(viewPager); | |
36 | + } | |
37 | + } | |
32 | 38 | private List<String> title = Arrays.asList("个人信息", "版本信息"); |
33 | 39 | @Override |
34 | 40 | protected void onCreate(Bundle savedInstanceState) { |
... | ... | @@ -41,7 +47,7 @@ public class ChangePresonalInfoActivity extends AppCompatActivity { |
41 | 47 | } |
42 | 48 | private void initView() { |
43 | 49 | viewPager = (ViewPager) findViewById(R.id.viewpager_login); |
44 | - tableLayout = (SlidingTabLayout) findViewById(R.id.TabLayout_id); | |
50 | + //tableLayout = (SlidingTabLayout) findViewById(R.id.TabLayout_id); | |
45 | 51 | } |
46 | 52 | |
47 | 53 | private void initData() { |
... | ... | @@ -56,9 +62,9 @@ public class ChangePresonalInfoActivity extends AppCompatActivity { |
56 | 62 | |
57 | 63 | |
58 | 64 | //设置Tab上的标题 |
59 | - tableLayout.setData(title); | |
65 | + //tableLayout.setData(title); | |
60 | 66 | //设置关联的ViewPager |
61 | - tableLayout.setViewPager(viewPager, 0); | |
67 | + //tableLayout.setViewPager(viewPager, 0); | |
62 | 68 | presoninfodapter = new LoginAndRegisterAdapter(presoninfo, getSupportFragmentManager()); |
63 | 69 | //给ViewPager设置适配器 |
64 | 70 | viewPager.setAdapter(presoninfodapter); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ChoiseTextBookActivity.java
... | ... | @@ -26,6 +26,7 @@ import com.hjx.personalcenter.interfaces.DialogCallBack; |
26 | 26 | import com.hjx.personalcenter.model.DefautPublishInfo; |
27 | 27 | import com.hjx.personalcenter.model.VersionInfo; |
28 | 28 | import com.hjx.personalcenter.util.AlertUtils; |
29 | +import com.hjx.personalcenter.util.GetDevicesUtil; | |
29 | 30 | |
30 | 31 | import org.json.JSONException; |
31 | 32 | import org.json.JSONObject; |
... | ... | @@ -46,7 +47,7 @@ public class ChoiseTextBookActivity extends AppCompatActivity implements View.On |
46 | 47 | private GridAdapter sim_adapter; |
47 | 48 | private SimpleDraweeView simpleDraweeView; |
48 | 49 | private TextView publish; |
49 | - private String chinese, math,english,physics,chemistry,history,geography,political,biology,science; | |
50 | + private String chinese, math, english, physics, chemistry, history, geography, political, biology, science; | |
50 | 51 | |
51 | 52 | |
52 | 53 | Handler handler = new Handler() { |
... | ... | @@ -97,9 +98,9 @@ public class ChoiseTextBookActivity extends AppCompatActivity implements View.On |
97 | 98 | geography = defautPublishInfos.get(i).getPress(); |
98 | 99 | } else if (subject.equals("政治")) { |
99 | 100 | political = defautPublishInfos.get(i).getPress(); |
100 | - }else if (subject.equals("生物")) { | |
101 | + } else if (subject.equals("生物")) { | |
101 | 102 | biology = defautPublishInfos.get(i).getPress(); |
102 | - }else if (subject.equals("科学")) { | |
103 | + } else if (subject.equals("科学")) { | |
103 | 104 | science = defautPublishInfos.get(i).getPress(); |
104 | 105 | } |
105 | 106 | } |
... | ... | @@ -110,19 +111,13 @@ public class ChoiseTextBookActivity extends AppCompatActivity implements View.On |
110 | 111 | String statusregister = jsonObject.optString("status"); |
111 | 112 | if (statusregister.equals("1")) { |
112 | 113 | Toast.makeText(ChoiseTextBookActivity.this, "注册信息上传成功", Toast.LENGTH_LONG).show(); |
113 | - String userID = SaveParam.getInstance().getLoginParam(ChoiseTextBookActivity.this, "userId"); | |
114 | - try { | |
115 | - if (userID == null) { | |
116 | - AlertUtils.showToast(ChoiseTextBookActivity.this, "连接超时请重新登录!"); | |
117 | - | |
118 | - } else { | |
119 | - long auserID = Long.parseLong(userID); | |
120 | - //验证保卡信息 | |
121 | - HttpManager.getInstance().cardinfocheck(ChoiseTextBookActivity.this, auserID, handler); | |
122 | - } | |
123 | - | |
124 | - } catch (NumberFormatException e) { | |
125 | - e.printStackTrace(); | |
114 | + String deviceNumber = GetDevicesUtil.getDevicesInfo(ChoiseTextBookActivity.this).getDeviceNumber(); | |
115 | + if (deviceNumber == null) { | |
116 | + AlertUtils.showToast(ChoiseTextBookActivity.this, "连接超时请重新登录!"); | |
117 | + | |
118 | + } else { | |
119 | + //验证保卡信息 | |
120 | + HttpManager.getInstance().cardinfocheck(ChoiseTextBookActivity.this, deviceNumber, handler); | |
126 | 121 | } |
127 | 122 | |
128 | 123 | } else { |
... | ... | @@ -145,11 +140,13 @@ public class ChoiseTextBookActivity extends AppCompatActivity implements View.On |
145 | 140 | super.onCreate(savedInstanceState); |
146 | 141 | String userID = SaveParam.getInstance().getLoginParam(this, "userId"); |
147 | 142 | String graderid = SaveParam.getInstance().getCustomizeParam(this, SaveParam.GRADENS); |
143 | + String accounts = SaveParam.getInstance().getCustomizeParam(ChoiseTextBookActivity.this,SaveParam.ACCOUNT); | |
148 | 144 | try { |
149 | 145 | long auserID = Long.parseLong(userID); |
150 | 146 | int graderID = Integer.parseInt(graderid); |
147 | + int accountss = Integer.parseInt(accounts); | |
151 | 148 | //获取版本信息 |
152 | - HttpManager.getInstance().getpublishinfo(this, auserID, graderID, handler); | |
149 | + HttpManager.getInstance().getpublishinfo(this, auserID, graderID,accountss, handler); | |
153 | 150 | |
154 | 151 | } catch (NumberFormatException e) { |
155 | 152 | e.printStackTrace(); |
... | ... | @@ -213,7 +210,7 @@ public class ChoiseTextBookActivity extends AppCompatActivity implements View.On |
213 | 210 | |
214 | 211 | //提交注册信息 |
215 | 212 | HttpManager.getInstance().subregisterinfo(ChoiseTextBookActivity.this, auserID, |
216 | - name, gradeID, regionID, regeionname, schoolID, math,english, chinese,physics,chemistry,history,geography,political,biology,science, handler); | |
213 | + name, gradeID, regionID, regeionname, schoolID, math, english, chinese, physics, chemistry, history, geography, political, biology, science, handler); | |
217 | 214 | } |
218 | 215 | |
219 | 216 | } catch (NumberFormatException e) { |
... | ... | @@ -249,21 +246,21 @@ public class ChoiseTextBookActivity extends AppCompatActivity implements View.On |
249 | 246 | chinese = publishs; |
250 | 247 | } else if ("数学".equals(subject)) { |
251 | 248 | math = publishs; |
252 | - }else if ("英语".equals(subject)) { | |
249 | + } else if ("英语".equals(subject)) { | |
253 | 250 | english = publishs; |
254 | - }else if ("物理".equals(subject)) { | |
251 | + } else if ("物理".equals(subject)) { | |
255 | 252 | physics = publishs; |
256 | - }else if ("化学".equals(subject)) { | |
253 | + } else if ("化学".equals(subject)) { | |
257 | 254 | chemistry = publishs; |
258 | - }else if ("历史".equals(subject)) { | |
255 | + } else if ("历史".equals(subject)) { | |
259 | 256 | history = publishs; |
260 | - }else if ("地理".equals(subject)) { | |
257 | + } else if ("地理".equals(subject)) { | |
261 | 258 | geography = publishs; |
262 | - }else if ("政治".equals(subject)) { | |
259 | + } else if ("政治".equals(subject)) { | |
263 | 260 | political = publishs; |
264 | - }else if ("生物".equals(subject)) { | |
261 | + } else if ("生物".equals(subject)) { | |
265 | 262 | biology = publishs; |
266 | - }else if ("科学".equals(subject)) { | |
263 | + } else if ("科学".equals(subject)) { | |
267 | 264 | science = publishs; |
268 | 265 | } |
269 | 266 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ElectronicCardInfoOKActivity.java
1 | 1 | package com.hjx.personalcenter.activity; |
2 | 2 | |
3 | -import android.content.Intent; | |
4 | 3 | import android.os.Bundle; |
5 | 4 | import android.support.v7.app.AppCompatActivity; |
6 | 5 | import android.view.View; |
... | ... | @@ -9,6 +8,7 @@ import android.widget.ImageView; |
9 | 8 | import android.widget.TextView; |
10 | 9 | |
11 | 10 | import com.hjx.personalcenter.R; |
11 | +import com.hjx.personalcenter.db.Content; | |
12 | 12 | import com.hjx.personalcenter.db.SaveParam; |
13 | 13 | import com.hjx.personalcenter.http.HttpManager; |
14 | 14 | import com.hjx.personalcenter.util.GetDevicesUtil; |
... | ... | @@ -69,10 +69,11 @@ public class ElectronicCardInfoOKActivity extends AppCompatActivity implements V |
69 | 69 | |
70 | 70 | @Override |
71 | 71 | public void onClick(View v) { |
72 | + String userID = SaveParam.getInstance().getLoginParam(this,"userId"); | |
73 | + long auserID = 0; | |
72 | 74 | switch (v.getId()){ |
73 | 75 | case R.id.btn_finish: |
74 | - String userID = SaveParam.getInstance().getLoginParam(this,"userId"); | |
75 | - long auserID = 0; | |
76 | + Content.cardintentflag =1; | |
76 | 77 | try { |
77 | 78 | auserID = Long.parseLong(userID); |
78 | 79 | } catch (NumberFormatException e) { |
... | ... | @@ -85,10 +86,17 @@ public class ElectronicCardInfoOKActivity extends AppCompatActivity implements V |
85 | 86 | mac_adress.getText().toString().trim(),phone.getText().toString().trim()); |
86 | 87 | break; |
87 | 88 | case R.id.btn_bangding: |
88 | - Intent intent = new Intent(); | |
89 | - intent.setClass(ElectronicCardInfoOKActivity.this, BangDingCode.class); | |
90 | - startActivity(intent); | |
91 | - overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
89 | + Content.cardintentflag =2; | |
90 | + try { | |
91 | + auserID = Long.parseLong(userID); | |
92 | + } catch (NumberFormatException e) { | |
93 | + e.printStackTrace(); | |
94 | + } | |
95 | + HttpManager.getInstance().subcardinfo(this,auserID,usename.getText().toString().trim(), | |
96 | + customer_address.getText().toString().trim(),shopadress.getText().toString().trim(), | |
97 | + shoptime.getText().toString().trim(),tlePhone.getText().toString().trim(), | |
98 | + deviceModel.getText().toString().trim(),deviceNumber.getText().toString().trim(), | |
99 | + mac_adress.getText().toString().trim(),phone.getText().toString().trim()); | |
92 | 100 | |
93 | 101 | break; |
94 | 102 | case R.id.cancel: | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ElectronicCardLookInfoActivity.java
... | ... | @@ -11,11 +11,11 @@ import android.widget.TextView; |
11 | 11 | |
12 | 12 | import com.hjx.personalcenter.R; |
13 | 13 | import com.hjx.personalcenter.db.Content; |
14 | -import com.hjx.personalcenter.db.SaveParam; | |
15 | 14 | import com.hjx.personalcenter.http.HttpCode; |
16 | 15 | import com.hjx.personalcenter.http.HttpManager; |
17 | 16 | import com.hjx.personalcenter.model.CardInfo; |
18 | 17 | import com.hjx.personalcenter.util.AlertUtils; |
18 | +import com.hjx.personalcenter.util.GetDevicesUtil; | |
19 | 19 | |
20 | 20 | import java.util.ArrayList; |
21 | 21 | |
... | ... | @@ -73,13 +73,8 @@ public class ElectronicCardLookInfoActivity extends AppCompatActivity implements |
73 | 73 | @Override |
74 | 74 | protected void onResume() { |
75 | 75 | super.onResume(); |
76 | - String userID = SaveParam.getInstance().getLoginParam(this, "userId"); | |
77 | - try { | |
78 | - Long a = Long.parseLong(userID); | |
79 | - HttpManager.getInstance().getcardinfo(this, a, handler); | |
80 | - } catch (NumberFormatException e) { | |
81 | - e.printStackTrace(); | |
82 | - } | |
76 | + String deviceNumber = GetDevicesUtil.getDevicesInfo(ElectronicCardLookInfoActivity.this).getDeviceNumber(); | |
77 | + HttpManager.getInstance().getcardinfo(this, deviceNumber, handler); | |
83 | 78 | } |
84 | 79 | |
85 | 80 | private void initView() { | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/MainActivity.java
... | ... | @@ -14,6 +14,7 @@ import android.support.v4.content.FileProvider; |
14 | 14 | import android.support.v7.app.AppCompatActivity; |
15 | 15 | import android.support.v7.widget.LinearLayoutManager; |
16 | 16 | import android.support.v7.widget.RecyclerView; |
17 | +import android.util.Log; | |
17 | 18 | import android.view.KeyEvent; |
18 | 19 | import android.view.View; |
19 | 20 | import android.widget.ImageView; |
... | ... | @@ -45,6 +46,7 @@ import com.hjx.personalcenter.util.AlertUtils; |
45 | 46 | import com.hjx.personalcenter.util.CropUtils; |
46 | 47 | import com.hjx.personalcenter.util.DialogPermission; |
47 | 48 | import com.hjx.personalcenter.util.FileUtil; |
49 | +import com.hjx.personalcenter.util.GetDevicesUtil; | |
48 | 50 | import com.hjx.personalcenter.util.PermissionUtil; |
49 | 51 | import com.hjx.personalcenter.util.SharedPreferenceMark; |
50 | 52 | import com.mylhyl.circledialog.CircleDialog; |
... | ... | @@ -108,12 +110,23 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
108 | 110 | mSimpleDraweeView.setImageURI(cardinfoBean.getPortrait()); |
109 | 111 | String graderID =cardinfoBean.getGrade().getGradeId(); |
110 | 112 | String userID = SaveParam.getInstance().getLoginParam(MainActivity.this,"userId"); |
113 | + //账户类型 | |
114 | + String accounts = SaveParam.getInstance().getCustomizeParam(MainActivity.this,SaveParam.ACCOUNT); | |
115 | + String childID = SaveParam.getInstance().getCustomizeParam(MainActivity.this,SaveParam.CHILDSID); | |
111 | 116 | SaveParam.getInstance().saveCustomizeParam(MainActivity.this, SaveParam.GRADENS, ""+graderID); |
112 | 117 | try { |
113 | - long auserID = Long.parseLong(userID); | |
118 | + Object auserID; | |
119 | + int type; | |
114 | 120 | int graderIDs =Integer.parseInt(graderID); |
121 | + if ("2".equals(accounts)){ | |
122 | + type=Integer.parseInt(accounts); | |
123 | + auserID =childID; | |
124 | + }else { | |
125 | + type =Integer.parseInt(accounts); | |
126 | + auserID =Long.parseLong(userID); | |
127 | + } | |
115 | 128 | //获取版本信息 |
116 | - HttpManager.getInstance().getpublishinfo(MainActivity.this,auserID,graderIDs,handler); | |
129 | + HttpManager.getInstance().getpublishinfo(MainActivity.this,auserID,graderIDs,type,handler); | |
117 | 130 | |
118 | 131 | } catch (NumberFormatException e) { |
119 | 132 | e.printStackTrace(); |
... | ... | @@ -153,8 +166,9 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
153 | 166 | initData(); |
154 | 167 | initLister(); |
155 | 168 | updateVersion(); |
156 | -// String devicenumber = GetDevicesUtil.getDevicesInfo(this).getDeviceNumber(); | |
157 | -// Log.e("test","......."+devicenumber); | |
169 | + String devicenumber = GetDevicesUtil.getDevicesInfo(this).getDeviceNumber(); | |
170 | + String model = GetDevicesUtil.getDevicesInfo(this).getDeviceModel(); | |
171 | + Log.e("test","......."+devicenumber+model); | |
158 | 172 | } |
159 | 173 | //////版本更新 |
160 | 174 | private void updateVersion() { |
... | ... | @@ -230,13 +244,13 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
230 | 244 | } |
231 | 245 | |
232 | 246 | //初始化图片 |
233 | -// file = new File(FileUtil.getCachePath(this), "user-avatar.jpg"); | |
234 | -// if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { | |
235 | -// uri = Uri.fromFile(file); | |
236 | -// } else { | |
237 | -// //通过FileProvider创建一个content类型的Uri(android 7.0需要这样的方法跨应用访问) | |
238 | -// uri = FileProvider.getUriForFile(MyApplication.getContext(), "com.hjx.personalcenter", file); | |
239 | -// } | |
247 | + file = new File(FileUtil.getCachePath(this), "user-avatar.jpg"); | |
248 | + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { | |
249 | + uri = Uri.fromFile(file); | |
250 | + } else { | |
251 | + //通过FileProvider创建一个content类型的Uri(android 7.0需要这样的方法跨应用访问) | |
252 | + uri = FileProvider.getUriForFile(MyApplication.getContext(), "com.hjx.personalcenter", file); | |
253 | + } | |
240 | 254 | |
241 | 255 | } |
242 | 256 | |
... | ... | @@ -295,13 +309,25 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
295 | 309 | public void onMenuItemClick(int position) { |
296 | 310 | switch (position) { |
297 | 311 | case 0: |
298 | - //清除数据 | |
299 | - SaveParam.getInstance().clearData(MainActivity.this); | |
300 | - Intent settingintent = new Intent(); | |
301 | - settingintent.setClass(MainActivity.this, LoginAndRegisterActivity.class); | |
302 | - startActivity(settingintent); | |
303 | - overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
304 | - finish(); | |
312 | + new CircleDialog.Builder(MainActivity.this) | |
313 | + .setCanceledOnTouchOutside(false) | |
314 | + .setWidth(0.4f) | |
315 | + .setCancelable(false) | |
316 | + .setText("您确定要退出,更换其他账号登录吗?") | |
317 | + .setNegative("取消", null) | |
318 | + .setPositive("确定", new View.OnClickListener() { | |
319 | + @Override | |
320 | + public void onClick(View v) { | |
321 | + //清除数据 | |
322 | + SaveParam.getInstance().clearData(MainActivity.this); | |
323 | + Intent settingintent = new Intent(); | |
324 | + settingintent.setClass(MainActivity.this, LoginAndRegisterActivity.class); | |
325 | + startActivity(settingintent); | |
326 | + overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
327 | + finish(); | |
328 | + } | |
329 | + }) | |
330 | + .show(); | |
305 | 331 | break; |
306 | 332 | case 1: |
307 | 333 | Intent accontMintent = new Intent(); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/SysApplication.java
... | ... | @@ -5,21 +5,26 @@ import android.app.Application; |
5 | 5 | |
6 | 6 | import java.util.LinkedList; |
7 | 7 | import java.util.List; |
8 | + | |
8 | 9 | public class SysApplication extends Application { |
9 | 10 | private List<Activity> mList = new LinkedList<Activity>(); |
10 | 11 | private static SysApplication instance; |
12 | + | |
11 | 13 | private SysApplication() { |
12 | 14 | } |
15 | + | |
13 | 16 | public synchronized static SysApplication getInstance() { |
14 | 17 | if (null == instance) { |
15 | 18 | instance = new SysApplication(); |
16 | 19 | } |
17 | 20 | return instance; |
18 | 21 | } |
22 | + | |
19 | 23 | // add Activity |
20 | 24 | public void addActivity(Activity activity) { |
21 | 25 | mList.add(activity); |
22 | 26 | } |
27 | + | |
23 | 28 | public void exit() { |
24 | 29 | try { |
25 | 30 | for (Activity activity : mList) { |
... | ... | @@ -32,6 +37,7 @@ public class SysApplication extends Application { |
32 | 37 | System.exit(0); |
33 | 38 | } |
34 | 39 | } |
40 | + | |
35 | 41 | public void onLowMemory() { |
36 | 42 | super.onLowMemory(); |
37 | 43 | System.gc(); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/adapter/AccountChildsAdapter.java
1 | 1 | package com.hjx.personalcenter.adapter; |
2 | 2 | |
3 | +import android.app.Activity; | |
3 | 4 | import android.content.Context; |
5 | +import android.content.Intent; | |
4 | 6 | import android.support.v4.app.FragmentActivity; |
5 | 7 | import android.support.v7.widget.RecyclerView; |
6 | 8 | import android.view.LayoutInflater; |
... | ... | @@ -12,6 +14,7 @@ import android.widget.TextView; |
12 | 14 | |
13 | 15 | import com.facebook.drawee.view.SimpleDraweeView; |
14 | 16 | import com.hjx.personalcenter.R; |
17 | +import com.hjx.personalcenter.activity.RegisterInfoActivity; | |
15 | 18 | import com.hjx.personalcenter.db.Content; |
16 | 19 | import com.hjx.personalcenter.db.SaveParam; |
17 | 20 | import com.hjx.personalcenter.http.HttpManager; |
... | ... | @@ -26,12 +29,15 @@ import java.util.List; |
26 | 29 | * Created by h on 2017/8/26. |
27 | 30 | */ |
28 | 31 | |
29 | -public class AccountChildsAdapter extends RecyclerView.Adapter<AccountChildsAdapter.AccountChildsHolder> implements View.OnClickListener { | |
32 | +public class AccountChildsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements View.OnClickListener { | |
30 | 33 | private List<ChildsInfo.DataBean> specailList; |
31 | 34 | private LayoutInflater mInflater; |
32 | - private Context mContext ; | |
35 | + private Context mContext; | |
36 | + private static final int BODY_TYPE = 00002; | |
37 | + private static final int FOOT_TYPE = 00003; | |
38 | + private int footCount = 1;//尾部个数,后续可以自己拓展 | |
33 | 39 | |
34 | - public AccountChildsAdapter(ArrayList<ChildsInfo.DataBean> specailList,Context context) { | |
40 | + public AccountChildsAdapter(ArrayList<ChildsInfo.DataBean> specailList, Context context) { | |
35 | 41 | this.mContext = context; |
36 | 42 | this.specailList = specailList; |
37 | 43 | mInflater = LayoutInflater.from(context); |
... | ... | @@ -41,12 +47,29 @@ public class AccountChildsAdapter extends RecyclerView.Adapter<AccountChildsAdap |
41 | 47 | |
42 | 48 | @Override |
43 | 49 | public void onClick(View v) { |
44 | - if (mOnItemClickListener ==null){ | |
50 | + if (mOnItemClickListener == null) { | |
45 | 51 | mOnItemClickListener.onItemClick(v, (int) v.getTag()); |
46 | 52 | } |
47 | 53 | |
48 | 54 | } |
49 | 55 | |
56 | + private int getBodySize() { | |
57 | + return specailList.size(); | |
58 | + } | |
59 | + | |
60 | + private boolean isFoot(int position) { | |
61 | + return footCount != 0 && (position >= (getBodySize())); | |
62 | + } | |
63 | + | |
64 | + @Override | |
65 | + public int getItemViewType(int position) { | |
66 | + if (isFoot(position)) { | |
67 | + return FOOT_TYPE; | |
68 | + } else { | |
69 | + return BODY_TYPE; | |
70 | + } | |
71 | + } | |
72 | + | |
50 | 73 | public interface OnItemClickListener { |
51 | 74 | void onItemClick(View view, int position); |
52 | 75 | } |
... | ... | @@ -61,83 +84,105 @@ public class AccountChildsAdapter extends RecyclerView.Adapter<AccountChildsAdap |
61 | 84 | } |
62 | 85 | |
63 | 86 | @Override |
64 | - public AccountChildsHolder onCreateViewHolder(ViewGroup parent, int viewType) { | |
65 | - View view = mInflater.inflate(R.layout.recycler_childaccunt_item_view, parent, false); | |
66 | - view.setOnClickListener(this); | |
67 | - AccountChildsHolder holder = new AccountChildsHolder(view); | |
68 | - return holder; | |
87 | + public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { | |
88 | + switch (viewType) { | |
89 | + case BODY_TYPE: | |
90 | + return new AccountChildsHolder(mInflater.inflate(R.layout.recycler_childaccunt_item_view, parent, false)); | |
91 | + case FOOT_TYPE: | |
92 | + return new FootViewHolder(mInflater.inflate(R.layout.activity_account_management_add, parent, false)); | |
93 | + default: | |
94 | + return null; | |
95 | + } | |
96 | +// View view = ; | |
97 | +// view.setOnClickListener(this); | |
98 | +// AccountChildsHolder holder = new AccountChildsHolder(view); | |
99 | +// return holder; | |
69 | 100 | } |
70 | 101 | |
71 | 102 | @Override |
72 | - public void onBindViewHolder(AccountChildsHolder holder, int position) { | |
73 | - final ChildsInfo.DataBean bean = specailList.get(position); | |
74 | - if (bean != null) { | |
75 | - holder.mSimpleDraweeView.setImageURI(bean.getImage()); | |
76 | - holder.iv_child_name.setText(bean.getName()); | |
77 | - holder.iv_child_grade.setText(bean.getGrade()); | |
78 | - holder.iv_child_school.setText(bean.getSchool()); | |
79 | - holder.iv_child_adress.setText(bean.getRegion()); | |
80 | - if ("已使用".equals(bean.getStatus())){ | |
81 | - holder.chang_account.setText("使用中"); | |
82 | - holder.chang_account.setEnabled(false); | |
83 | - holder.delete_account.setEnabled(false); | |
84 | - holder.iv_using_pic.setVisibility(View.VISIBLE); | |
85 | - holder.ll_backgrangd.setBackgroundResource(R.drawable.corcle_blue_bg); | |
86 | - }else { | |
87 | - holder.chang_account.setText("切换用户"); | |
88 | - holder.chang_account.setEnabled(true); | |
89 | - holder.delete_account.setEnabled(true); | |
90 | - holder.iv_using_pic.setVisibility(View.GONE); | |
91 | - holder.ll_backgrangd.setBackgroundResource(R.drawable.corcle_black_bg); | |
92 | - } | |
93 | - holder.delete_account.setOnClickListener(new View.OnClickListener() { | |
94 | - @Override | |
95 | - public void onClick(View v) { | |
96 | - new CircleDialog.Builder((FragmentActivity)mContext) | |
97 | - .setCanceledOnTouchOutside(false) | |
98 | - .setWidth(0.4f) | |
99 | - .setCancelable(false) | |
100 | - .setText("您确定删除该子账户?") | |
101 | - .setNegative("取消", null) | |
102 | - .setPositive("确定", new View.OnClickListener() { | |
103 | - @Override | |
104 | - public void onClick(View v) { | |
105 | - HttpManager.getInstance().deletechildAccountinfo(mContext,bean.getSubAccountId()); | |
106 | - } | |
107 | - }) | |
108 | - .show(); | |
109 | - | |
103 | + public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { | |
104 | + if (holder instanceof AccountChildsHolder) { | |
105 | + final ChildsInfo.DataBean bean = specailList.get(position); | |
106 | + if (bean != null) { | |
107 | + ((AccountChildsHolder) holder).mSimpleDraweeView.setImageURI(bean.getImage()); | |
108 | + ((AccountChildsHolder) holder).iv_child_name.setText(bean.getName()); | |
109 | + ((AccountChildsHolder) holder).iv_child_grade.setText(bean.getGrade()); | |
110 | + ((AccountChildsHolder) holder).iv_child_school.setText(bean.getSchool()); | |
111 | + ((AccountChildsHolder) holder).iv_child_adress.setText(bean.getRegion()); | |
112 | + if ("已使用".equals(bean.getStatus())) { | |
113 | + ((AccountChildsHolder) holder).chang_account.setText("使用中"); | |
114 | + ((AccountChildsHolder) holder).chang_account.setEnabled(false); | |
115 | + ((AccountChildsHolder) holder).delete_account.setEnabled(false); | |
116 | + ((AccountChildsHolder) holder).iv_using_pic.setVisibility(View.VISIBLE); | |
117 | + ((AccountChildsHolder) holder).ll_backgrangd.setBackgroundResource(R.drawable.corcle_blue_bg); | |
118 | + } else { | |
119 | + ((AccountChildsHolder) holder).chang_account.setText("切换用户"); | |
120 | + ((AccountChildsHolder) holder).chang_account.setEnabled(true); | |
121 | + ((AccountChildsHolder) holder).delete_account.setEnabled(true); | |
122 | + ((AccountChildsHolder) holder).iv_using_pic.setVisibility(View.GONE); | |
123 | + ((AccountChildsHolder) holder).ll_backgrangd.setBackgroundResource(R.drawable.corcle_black_bg); | |
124 | + } | |
125 | + ((AccountChildsHolder) holder).delete_account.setOnClickListener(new View.OnClickListener() { | |
126 | + @Override | |
127 | + public void onClick(View v) { | |
128 | + new CircleDialog.Builder((FragmentActivity) mContext) | |
129 | + .setCanceledOnTouchOutside(false) | |
130 | + .setWidth(0.4f) | |
131 | + .setCancelable(false) | |
132 | + .setText("您确定删除该子账户?") | |
133 | + .setNegative("取消", null) | |
134 | + .setPositive("确定", new View.OnClickListener() { | |
135 | + @Override | |
136 | + public void onClick(View v) { | |
137 | + HttpManager.getInstance().deletechildAccountinfo(mContext, bean.getSubAccountId()); | |
138 | + } | |
139 | + }) | |
140 | + .show(); | |
141 | + | |
142 | + | |
143 | + } | |
144 | + }); | |
145 | + ((AccountChildsHolder) holder).chang_account.setOnClickListener(new View.OnClickListener() { | |
146 | + @Override | |
147 | + public void onClick(View v) { | |
148 | + new CircleDialog.Builder((FragmentActivity) mContext) | |
149 | + .setCanceledOnTouchOutside(false) | |
150 | + .setWidth(0.4f) | |
151 | + .setCancelable(false) | |
152 | + .setText("您确定切换为该子账户?") | |
153 | + .setNegative("取消", null) | |
154 | + .setPositive("确定", new View.OnClickListener() { | |
155 | + @Override | |
156 | + public void onClick(View v) { | |
157 | + Content.changgeaccountflag = 2; | |
158 | + SaveParam.getInstance().saveCustomizeParam(mContext, SaveParam.ACCOUNT, "2"); | |
159 | + SaveParam.getInstance().saveCustomizeParam(mContext, SaveParam.CHILDSID, bean.getSubAccountId()); | |
160 | + //保存子账号年级id | |
161 | + SaveParam.getInstance().saveCustomizeParam(mContext, SaveParam.CHILDSGRADENS, bean.getGradeId()); | |
162 | + String devicenumber = GetDevicesUtil.getDevicesInfo(mContext).getDeviceNumber(); | |
163 | + HttpManager.getInstance().changechildAccountinfo(mContext, bean.getSubAccountId(), bean.getParentId(), | |
164 | + devicenumber, 2); | |
165 | + } | |
166 | + }) | |
167 | + .show(); | |
168 | + | |
169 | + } | |
170 | + }); | |
110 | 171 | |
172 | + } | |
111 | 173 | |
112 | - } | |
113 | - }); | |
114 | - holder.chang_account.setOnClickListener(new View.OnClickListener() { | |
174 | + } else if (holder instanceof FootViewHolder) { | |
175 | + ((FootViewHolder) holder).add_account.setOnClickListener(new View.OnClickListener() { | |
115 | 176 | @Override |
116 | 177 | public void onClick(View v) { |
117 | - new CircleDialog.Builder((FragmentActivity)mContext) | |
118 | - .setCanceledOnTouchOutside(false) | |
119 | - .setWidth(0.4f) | |
120 | - .setCancelable(false) | |
121 | - .setText("您确定切换为该子账户?") | |
122 | - .setNegative("取消", null) | |
123 | - .setPositive("确定", new View.OnClickListener() { | |
124 | - @Override | |
125 | - public void onClick(View v) { | |
126 | - Content.changgeaccountflag =2; | |
127 | - SaveParam.getInstance().saveCustomizeParam(mContext,SaveParam.ACCOUNT,"2"); | |
128 | - SaveParam.getInstance().saveCustomizeParam(mContext,SaveParam.CHILDSID,bean.getSubAccountId()); | |
129 | - //保存子账号年级id | |
130 | - SaveParam.getInstance().saveCustomizeParam(mContext, SaveParam.CHILDSGRADENS,bean.getGradeId() ); | |
131 | - String devicenumber = GetDevicesUtil.getDevicesInfo(mContext).getDeviceNumber(); | |
132 | - HttpManager.getInstance().changechildAccountinfo(mContext,bean.getSubAccountId(),bean.getParentId(), | |
133 | - devicenumber,2); | |
134 | - } | |
135 | - }) | |
136 | - .show(); | |
178 | + Content.accountflag = 2; | |
179 | + Intent account = new Intent(); | |
180 | + account.setClass(mContext, RegisterInfoActivity.class); | |
181 | + mContext.startActivity(account); | |
182 | + ((Activity) mContext).overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
137 | 183 | |
138 | 184 | } |
139 | 185 | }); |
140 | - | |
141 | 186 | } |
142 | 187 | |
143 | 188 | |
... | ... | @@ -146,15 +191,16 @@ public class AccountChildsAdapter extends RecyclerView.Adapter<AccountChildsAdap |
146 | 191 | @Override |
147 | 192 | public int getItemCount() { |
148 | 193 | |
149 | - return specailList.size(); | |
194 | + return getBodySize() + footCount; | |
150 | 195 | } |
151 | 196 | |
152 | - class AccountChildsHolder extends RecyclerView.ViewHolder { | |
197 | + private static class AccountChildsHolder extends RecyclerView.ViewHolder { | |
153 | 198 | ImageView iv_using_pic; |
154 | 199 | LinearLayout ll_backgrangd; |
155 | 200 | SimpleDraweeView mSimpleDraweeView; |
156 | 201 | TextView iv_child_name, iv_child_grade, iv_child_school, iv_child_adress, |
157 | - delete_account,chang_account; | |
202 | + delete_account, chang_account; | |
203 | + | |
158 | 204 | public AccountChildsHolder(View itemView) { |
159 | 205 | super(itemView); |
160 | 206 | mSimpleDraweeView = (SimpleDraweeView) itemView.findViewById(R.id.iv_child_head); |
... | ... | @@ -169,4 +215,13 @@ public class AccountChildsAdapter extends RecyclerView.Adapter<AccountChildsAdap |
169 | 215 | |
170 | 216 | } |
171 | 217 | } |
218 | + | |
219 | + private static class FootViewHolder extends RecyclerView.ViewHolder { | |
220 | + LinearLayout add_account; | |
221 | + | |
222 | + public FootViewHolder(View itemView) { | |
223 | + super(itemView); | |
224 | + add_account = (LinearLayout) itemView.findViewById(R.id.add_account); | |
225 | + } | |
226 | + } | |
172 | 227 | } |
173 | 228 | \ No newline at end of file | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/customdialog/CitysListDialog.java
... | ... | @@ -65,6 +65,9 @@ public class CitysListDialog extends BaseCircleDialog implements AdapterView.OnI |
65 | 65 | case HttpCode.CITYS: |
66 | 66 | data.clear(); |
67 | 67 | data.addAll( (List<CityInfo.CitiesBean>)msg.obj); |
68 | + if (data==null){ | |
69 | + dismiss(); | |
70 | + } | |
68 | 71 | listadapter.notifyDataSetChanged(); |
69 | 72 | break; |
70 | 73 | } | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/customdialog/CountryDialog.java
... | ... | @@ -59,6 +59,9 @@ public class CountryDialog extends BaseCircleDialog implements AdapterView.OnIte |
59 | 59 | |
60 | 60 | data.clear(); |
61 | 61 | data.addAll( (List<CountyInfo.CountiesBean>)msg.obj); |
62 | + if (data==null){ | |
63 | + dismiss(); | |
64 | + } | |
62 | 65 | listadapter.notifyDataSetChanged(); |
63 | 66 | break; |
64 | 67 | } | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/customdialog/GradeListDialog.java
... | ... | @@ -16,7 +16,6 @@ import android.widget.ListView; |
16 | 16 | |
17 | 17 | import com.hjx.personalcenter.R; |
18 | 18 | import com.hjx.personalcenter.adapter.GrandeAdapter; |
19 | -import com.hjx.personalcenter.db.Content; | |
20 | 19 | import com.hjx.personalcenter.db.SaveParam; |
21 | 20 | import com.hjx.personalcenter.http.HttpCode; |
22 | 21 | import com.hjx.personalcenter.http.HttpManager; |
... | ... | @@ -89,11 +88,14 @@ public class GradeListDialog extends BaseCircleDialog implements AdapterView.OnI |
89 | 88 | |
90 | 89 | @Override |
91 | 90 | public void onItemClick(AdapterView<?> parent, View view, int position, long id) { |
92 | - if (Content.accountflag ==2){ | |
93 | - SaveParam.getInstance().saveCustomizeParam(getActivity(), SaveParam.CHILDSGRADENS, ""+data.get(position).getId()); | |
94 | - }else { | |
95 | - SaveParam.getInstance().saveCustomizeParam(getActivity(), SaveParam.GRADENS, ""+data.get(position).getId()); | |
96 | - } | |
91 | + String accounts = SaveParam.getInstance().getCustomizeParam(getActivity(),SaveParam.ACCOUNT); | |
92 | + if ("2".equals(accounts)){ | |
93 | + SaveParam.getInstance().saveCustomizeParam(getActivity(), SaveParam.CHILDSGRADENS, ""+data.get(position).getId()); | |
94 | + }else { | |
95 | + SaveParam.getInstance().saveCustomizeParam(getActivity(), SaveParam.GRADENS, ""+data.get(position).getId()); | |
96 | + } | |
97 | + | |
98 | + | |
97 | 99 | |
98 | 100 | mCallBack.province3OnItemClick(data,position,5); |
99 | 101 | dismiss(); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/db/Content.java
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/LoginFragment.java
... | ... | @@ -25,6 +25,7 @@ import com.hjx.personalcenter.db.SaveParam; |
25 | 25 | import com.hjx.personalcenter.http.HttpCode; |
26 | 26 | import com.hjx.personalcenter.http.HttpManager; |
27 | 27 | import com.hjx.personalcenter.util.AlertUtils; |
28 | +import com.hjx.personalcenter.util.GetDevicesUtil; | |
28 | 29 | import com.hjx.personalcenter.util.PhoneNumCheckUtils; |
29 | 30 | |
30 | 31 | import org.json.JSONException; |
... | ... | @@ -40,9 +41,10 @@ public class LoginFragment extends Fragment implements View.OnClickListener { |
40 | 41 | private int type; |
41 | 42 | private TextView tv_forget_pwd; |
42 | 43 | private Button btn_login; |
43 | - private EditText phonenumber,login_pwwd; | |
44 | + private EditText phonenumber, login_pwwd; | |
44 | 45 | public static String TABLAYOUT_FRAGMENT = "tab_fragment"; |
45 | 46 | Intent intent = new Intent(); |
47 | + | |
46 | 48 | public static LoginFragment newInstance(int type) { |
47 | 49 | LoginFragment fragment = new LoginFragment(); |
48 | 50 | Bundle bundle = new Bundle(); |
... | ... | @@ -51,12 +53,13 @@ public class LoginFragment extends Fragment implements View.OnClickListener { |
51 | 53 | return fragment; |
52 | 54 | |
53 | 55 | } |
54 | - Handler handler = new Handler(){ | |
56 | + | |
57 | + Handler handler = new Handler() { | |
55 | 58 | @Override |
56 | 59 | public void handleMessage(Message msg) { |
57 | 60 | super.handleMessage(msg); |
58 | 61 | |
59 | - switch (msg.what){ | |
62 | + switch (msg.what) { | |
60 | 63 | case HttpCode.LOGIN_SUCESS: |
61 | 64 | JSONObject jsonObject; |
62 | 65 | String status; |
... | ... | @@ -72,12 +75,11 @@ public class LoginFragment extends Fragment implements View.OnClickListener { |
72 | 75 | try { |
73 | 76 | long auserID = Long.parseLong(userId); |
74 | 77 | //检测注册信息是否完整 |
75 | - HttpManager.getInstance().registerinfocheck(getActivity(),auserID,handler); | |
78 | + HttpManager.getInstance().registerinfocheck(getActivity(), auserID, handler); | |
76 | 79 | //登录成功,保存登录数据并且获取个人信息 |
77 | 80 | HttpManager.getInstance().saveLoginInfo(getActivity(), name, pwd, access_token, userId); |
78 | 81 | |
79 | 82 | |
80 | - | |
81 | 83 | } catch (NumberFormatException e) { |
82 | 84 | e.printStackTrace(); |
83 | 85 | } |
... | ... | @@ -99,31 +101,26 @@ public class LoginFragment extends Fragment implements View.OnClickListener { |
99 | 101 | break; |
100 | 102 | case HttpCode.REGISTER_SUCESS: |
101 | 103 | try { |
102 | - jsonObject = new JSONObject( (String) msg.obj); | |
104 | + jsonObject = new JSONObject((String) msg.obj); | |
103 | 105 | status = jsonObject.optString("status"); |
104 | 106 | JSONObject isregisterinfo = (JSONObject) jsonObject.opt("data"); |
105 | - boolean isRegisterInfoComplete =isregisterinfo.optBoolean("isRegisterInfoComplete"); | |
106 | - if (status.equals("1")){ | |
107 | - if (!isRegisterInfoComplete){ | |
107 | + boolean isRegisterInfoComplete = isregisterinfo.optBoolean("isRegisterInfoComplete"); | |
108 | + if (status.equals("1")) { | |
109 | + if (!isRegisterInfoComplete) { | |
108 | 110 | Content.accountflag = 1; |
109 | 111 | Intent intent = new Intent(); |
110 | 112 | intent.setClass(getActivity(), RegisterInfoActivity.class); |
111 | 113 | getActivity().startActivity(intent); |
112 | 114 | getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); |
113 | - }else { | |
114 | - String userID = SaveParam.getInstance().getLoginParam(getActivity(),"userId"); | |
115 | - try { | |
116 | - long auserID = Long.parseLong(userID); | |
117 | - //是否填写保卡 | |
118 | - HttpManager.getInstance().cardinfocheck(getActivity(),auserID,handler); | |
119 | - } catch (NumberFormatException e) { | |
120 | - e.printStackTrace(); | |
121 | - } | |
115 | + } else { | |
116 | + String deviceNumber = GetDevicesUtil.getDevicesInfo(getActivity()).getDeviceNumber(); | |
117 | + //是否填写保卡 | |
118 | + HttpManager.getInstance().cardinfocheck(getActivity(), deviceNumber, handler); | |
122 | 119 | |
123 | 120 | |
124 | 121 | } |
125 | 122 | |
126 | - }else{ | |
123 | + } else { | |
127 | 124 | Toast.makeText(getActivity(), "请检查网络", Toast.LENGTH_LONG).show(); |
128 | 125 | } |
129 | 126 | |
... | ... | @@ -134,18 +131,18 @@ public class LoginFragment extends Fragment implements View.OnClickListener { |
134 | 131 | break; |
135 | 132 | case HttpCode.CHECKCARD: |
136 | 133 | try { |
137 | - jsonObject = new JSONObject( (String) msg.obj); | |
134 | + jsonObject = new JSONObject((String) msg.obj); | |
138 | 135 | status = jsonObject.optString("status"); |
139 | - if (status.equals("1")){ | |
136 | + if (status.equals("1")) { | |
140 | 137 | SaveParam.getInstance().saveLoginParam(getActivity(), "login", "true"); |
141 | 138 | Intent intent = new Intent(); |
142 | 139 | intent.setClass(getActivity(), MainActivity.class); |
143 | 140 | getActivity().startActivity(intent); |
144 | 141 | getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); |
145 | 142 | |
146 | - }else if(status.equals("2001")){ | |
143 | + } else if (status.equals("2001")) { | |
147 | 144 | ElectronicCardDialog.getInstance().show(getChildFragmentManager(), "ElectronicCardDialog"); |
148 | - }else{ | |
145 | + } else { | |
149 | 146 | Toast.makeText(getActivity(), "请检查网络", Toast.LENGTH_LONG).show(); |
150 | 147 | } |
151 | 148 | |
... | ... | @@ -170,16 +167,19 @@ public class LoginFragment extends Fragment implements View.OnClickListener { |
170 | 167 | } |
171 | 168 | return mView; |
172 | 169 | } |
170 | + | |
173 | 171 | //初始化 |
174 | 172 | private void initView(View mView) { |
175 | - tv_forget_pwd = (TextView) mView.findViewById(R.id.tv_forget_pwd); | |
173 | + tv_forget_pwd = (TextView) mView.findViewById(R.id.tv_forget_pwd); | |
176 | 174 | phonenumber = (EditText) mView.findViewById(R.id.et_phonenumber); |
177 | 175 | login_pwwd = (EditText) mView.findViewById(R.id.et_password); |
178 | 176 | btn_login = (Button) mView.findViewById(R.id.btn_login); |
179 | 177 | |
180 | 178 | } |
179 | + | |
181 | 180 | private void initData() { |
182 | 181 | } |
182 | + | |
183 | 183 | private void setLister() { |
184 | 184 | tv_forget_pwd.setOnClickListener(this); |
185 | 185 | btn_login.setOnClickListener(this); |
... | ... | @@ -188,14 +188,14 @@ public class LoginFragment extends Fragment implements View.OnClickListener { |
188 | 188 | |
189 | 189 | @Override |
190 | 190 | public void onClick(View v) { |
191 | - switch (v.getId()){ | |
191 | + switch (v.getId()) { | |
192 | 192 | case R.id.tv_forget_pwd: |
193 | - intent.setClass(getActivity(),ForgotPasswordActivity.class); | |
193 | + intent.setClass(getActivity(), ForgotPasswordActivity.class); | |
194 | 194 | startActivity(intent); |
195 | 195 | getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); |
196 | 196 | break; |
197 | 197 | case R.id.btn_login: |
198 | - login(); | |
198 | + login(); | |
199 | 199 | break; |
200 | 200 | } |
201 | 201 | |
... | ... | @@ -207,11 +207,11 @@ public class LoginFragment extends Fragment implements View.OnClickListener { |
207 | 207 | if (TextUtils.isEmpty(name) || TextUtils.isEmpty(pwd)) { |
208 | 208 | AlertUtils.showToast(getActivity(), "请输入手机号和密码"); |
209 | 209 | return; |
210 | - }else if (!PhoneNumCheckUtils.isPhone(name)){ | |
210 | + } else if (!PhoneNumCheckUtils.isPhone(name)) { | |
211 | 211 | AlertUtils.showToast(getActivity(), "请输入正确的手机号"); |
212 | - }else { | |
212 | + } else { | |
213 | 213 | //登录接口 |
214 | - HttpManager.getInstance().login(name,pwd, getActivity(),handler); | |
214 | + HttpManager.getInstance().login(name, pwd, getActivity(), handler); | |
215 | 215 | } |
216 | 216 | |
217 | 217 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/PresonInfoFragment.java
1 | 1 | package com.hjx.personalcenter.fragment; |
2 | 2 | |
3 | -import android.app.Activity; | |
4 | -import android.content.Context; | |
5 | 3 | import android.graphics.Color; |
6 | 4 | import android.os.Bundle; |
7 | 5 | import android.support.annotation.Nullable; |
8 | 6 | import android.support.v4.app.Fragment; |
7 | +import android.support.v4.view.ViewPager; | |
9 | 8 | import android.util.Log; |
10 | 9 | import android.view.Gravity; |
11 | 10 | import android.view.LayoutInflater; |
... | ... | @@ -14,10 +13,12 @@ import android.view.ViewGroup; |
14 | 13 | import android.widget.AdapterView; |
15 | 14 | import android.widget.EditText; |
16 | 15 | import android.widget.ImageView; |
16 | +import android.widget.LinearLayout; | |
17 | 17 | import android.widget.TextView; |
18 | 18 | |
19 | 19 | import com.bigkoo.pickerview.TimePickerView; |
20 | 20 | import com.hjx.personalcenter.R; |
21 | +import com.hjx.personalcenter.activity.ChangePresonalInfoActivity; | |
21 | 22 | import com.hjx.personalcenter.customdialog.CitysListDialog; |
22 | 23 | import com.hjx.personalcenter.customdialog.CountryDialog; |
23 | 24 | import com.hjx.personalcenter.customdialog.GradeListDialog; |
... | ... | @@ -53,6 +54,7 @@ public class PresonInfoFragment extends Fragment implements View.OnClickListener |
53 | 54 | private View mView; |
54 | 55 | private int type; |
55 | 56 | private TimePickerView pvTime; |
57 | + private LinearLayout tv_version; | |
56 | 58 | |
57 | 59 | private EditText tv_username1, tv_useinfo_adress1, tv_useinfo_qq; |
58 | 60 | private TextView tv_sex, tv_useinfo_adress, tv_useinfo_birthday, tv_useinfo_school, tv_useinfo_gender, sub; |
... | ... | @@ -100,6 +102,7 @@ public class PresonInfoFragment extends Fragment implements View.OnClickListener |
100 | 102 | my_school = (ImageView) mView.findViewById(R.id.my_school); |
101 | 103 | sub = (TextView) mView.findViewById(R.id.presonal_sub); |
102 | 104 | ccancel = (ImageView) mView.findViewById(R.id.cancel); |
105 | + tv_version = (LinearLayout) mView.findViewById(R.id.tv_version); | |
103 | 106 | |
104 | 107 | |
105 | 108 | } |
... | ... | @@ -120,6 +123,7 @@ public class PresonInfoFragment extends Fragment implements View.OnClickListener |
120 | 123 | my_grade.setOnClickListener(this); |
121 | 124 | my_school.setOnClickListener(this); |
122 | 125 | sub.setOnClickListener(this); |
126 | + tv_version.setOnClickListener(this); | |
123 | 127 | } |
124 | 128 | |
125 | 129 | @Override |
... | ... | @@ -192,6 +196,17 @@ public class PresonInfoFragment extends Fragment implements View.OnClickListener |
192 | 196 | case R.id.cancel: |
193 | 197 | getActivity().finish(); |
194 | 198 | break; |
199 | + case R.id.tv_version: | |
200 | + final ChangePresonalInfoActivity mainActivity = (ChangePresonalInfoActivity) getActivity(); | |
201 | + mainActivity.setFragment2Fragment(new ChangePresonalInfoActivity.Fragment2Fragment() { | |
202 | + @Override | |
203 | + public void gotoFragment(ViewPager viewPager) { | |
204 | + //fragment传递数据 | |
205 | + viewPager.setCurrentItem(1); | |
206 | + } | |
207 | + }); | |
208 | + mainActivity.forSkip(); | |
209 | + break; | |
195 | 210 | case R.id.presonal_sub: |
196 | 211 | Log.e("test", "你提交个人信息"); |
197 | 212 | if (TextUtils.isEmpty(presonal1) || | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/VersionsInfoFragment.java
... | ... | @@ -5,6 +5,7 @@ import android.os.Handler; |
5 | 5 | import android.os.Message; |
6 | 6 | import android.support.annotation.Nullable; |
7 | 7 | import android.support.v4.app.Fragment; |
8 | +import android.support.v4.view.ViewPager; | |
8 | 9 | import android.util.Log; |
9 | 10 | import android.view.LayoutInflater; |
10 | 11 | import android.view.View; |
... | ... | @@ -12,10 +13,12 @@ import android.view.ViewGroup; |
12 | 13 | import android.widget.AdapterView; |
13 | 14 | import android.widget.GridView; |
14 | 15 | import android.widget.ImageView; |
16 | +import android.widget.LinearLayout; | |
15 | 17 | import android.widget.TextView; |
16 | 18 | |
17 | 19 | import com.facebook.drawee.view.SimpleDraweeView; |
18 | 20 | import com.hjx.personalcenter.R; |
21 | +import com.hjx.personalcenter.activity.ChangePresonalInfoActivity; | |
19 | 22 | import com.hjx.personalcenter.adapter.GridAdapter; |
20 | 23 | import com.hjx.personalcenter.customdialog.VerSionDialog; |
21 | 24 | import com.hjx.personalcenter.db.SaveParam; |
... | ... | @@ -39,6 +42,7 @@ public class VersionsInfoFragment extends Fragment implements AdapterView.OnItem |
39 | 42 | private View mView; |
40 | 43 | private int type; |
41 | 44 | private ImageView cances; |
45 | + private LinearLayout tv_presons; | |
42 | 46 | private TextView publish, sub; |
43 | 47 | private SimpleDraweeView simpleDraweeView; |
44 | 48 | public static String TABLAYOUT_FRAGMENT = "versionfragment"; |
... | ... | @@ -101,17 +105,20 @@ public class VersionsInfoFragment extends Fragment implements AdapterView.OnItem |
101 | 105 | String graderidchilds = SaveParam.getInstance().getCustomizeParam(getActivity(), SaveParam.CHILDSGRADENS); |
102 | 106 | //账户类型 |
103 | 107 | String accounts = SaveParam.getInstance().getCustomizeParam(getActivity(), SaveParam.ACCOUNT); |
108 | + String childID = SaveParam.getInstance().getCustomizeParam(getActivity(),SaveParam.CHILDSID); | |
104 | 109 | try { |
105 | - int graderID; | |
106 | - long auserID = Long.parseLong(userID); | |
107 | - if ("2".equals(accounts)) { | |
108 | - graderID = Integer.parseInt(graderidchilds); | |
109 | - } else { | |
110 | - graderID = Integer.parseInt(graderid); | |
110 | + Object auserID; | |
111 | + int type; | |
112 | + int graderIDs =Integer.parseInt(graderid); | |
113 | + if ("2".equals(accounts)){ | |
114 | + type=Integer.parseInt(accounts); | |
115 | + auserID =childID; | |
116 | + }else { | |
117 | + type =Integer.parseInt(accounts); | |
118 | + auserID =Long.parseLong(userID); | |
111 | 119 | } |
112 | - | |
113 | 120 | //获取版本信息 |
114 | - HttpManager.getInstance().getpublishinfo(getActivity(), auserID, graderID, handler); | |
121 | + HttpManager.getInstance().getpublishinfo(getActivity(),auserID,graderIDs,type,handler); | |
115 | 122 | |
116 | 123 | } catch (NumberFormatException e) { |
117 | 124 | e.printStackTrace(); |
... | ... | @@ -131,6 +138,7 @@ public class VersionsInfoFragment extends Fragment implements AdapterView.OnItem |
131 | 138 | gridView = (GridView) mView.findViewById(R.id.grideview); |
132 | 139 | cances = (ImageView) mView.findViewById(R.id.cancel); |
133 | 140 | sub = (TextView) mView.findViewById(R.id.version_sub); |
141 | + tv_presons = (LinearLayout) mView.findViewById(R.id.tv_presons); | |
134 | 142 | |
135 | 143 | } |
136 | 144 | |
... | ... | @@ -143,6 +151,7 @@ public class VersionsInfoFragment extends Fragment implements AdapterView.OnItem |
143 | 151 | private void setLister() { |
144 | 152 | gridView.setOnItemClickListener(this); |
145 | 153 | sub.setOnClickListener(this); |
154 | + tv_presons.setOnClickListener(this); | |
146 | 155 | } |
147 | 156 | |
148 | 157 | @Override |
... | ... | @@ -180,7 +189,7 @@ public class VersionsInfoFragment extends Fragment implements AdapterView.OnItem |
180 | 189 | id = userID; |
181 | 190 | } |
182 | 191 | //修改版本信息 |
183 | - HttpManager.getInstance().changepublishinfo(getActivity(), id,math,english, chinese,physics,chemistry,history,geography,political,biology,science); | |
192 | + HttpManager.getInstance().changepublishinfo(getActivity(), id,chinese,math,english,physics,chemistry,history,geography,political,biology,science); | |
184 | 193 | |
185 | 194 | } catch (NumberFormatException e) { |
186 | 195 | e.printStackTrace(); |
... | ... | @@ -188,6 +197,18 @@ public class VersionsInfoFragment extends Fragment implements AdapterView.OnItem |
188 | 197 | |
189 | 198 | |
190 | 199 | break; |
200 | + case R.id.tv_presons: | |
201 | + final ChangePresonalInfoActivity mainActivity = (ChangePresonalInfoActivity) getActivity(); | |
202 | + mainActivity.setFragment2Fragment(new ChangePresonalInfoActivity.Fragment2Fragment() { | |
203 | + @Override | |
204 | + public void gotoFragment(ViewPager viewPager) { | |
205 | + //fragment传递数据 | |
206 | + viewPager.setCurrentItem(0); | |
207 | + } | |
208 | + }); | |
209 | + mainActivity.forSkip(); | |
210 | + break; | |
211 | + | |
191 | 212 | case R.id.cancel: |
192 | 213 | getActivity().finish(); |
193 | 214 | break; | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/http/HttpManager.java
... | ... | @@ -12,6 +12,7 @@ import android.widget.Toast; |
12 | 12 | |
13 | 13 | import com.google.gson.Gson; |
14 | 14 | import com.hjx.personalcenter.R; |
15 | +import com.hjx.personalcenter.activity.BangDingCode; | |
15 | 16 | import com.hjx.personalcenter.activity.LoginAndRegisterActivity; |
16 | 17 | import com.hjx.personalcenter.activity.TheStartPageActivity; |
17 | 18 | import com.hjx.personalcenter.db.Content; |
... | ... | @@ -297,11 +298,22 @@ public class HttpManager { |
297 | 298 | if (status.equals("1")) { |
298 | 299 | Log.e("test", "onSuccess" + jsonObject); |
299 | 300 | Toast.makeText(context, "保卡绑定成功!", Toast.LENGTH_LONG).show(); |
300 | - Intent intent = new Intent(); | |
301 | - intent.setClass((Activity) context, TheStartPageActivity.class); | |
302 | - ((Activity) context).startActivity(intent); | |
303 | - ((Activity) context).overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
304 | - ((Activity) context).finish(); | |
301 | + if (Content.cardintentflag ==1){ | |
302 | + Intent intent = new Intent(); | |
303 | + intent.setClass((Activity) context, TheStartPageActivity.class); | |
304 | + ((Activity) context).startActivity(intent); | |
305 | + ((Activity) context).overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
306 | + ((Activity) context).finish(); | |
307 | + }else if (Content.cardintentflag ==2){ | |
308 | + Intent intent = new Intent(); | |
309 | + intent.setClass((Activity) context, BangDingCode.class); | |
310 | + ((Activity) context).startActivity(intent); | |
311 | + ((Activity) context).overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
312 | + ((Activity) context).finish(); | |
313 | + | |
314 | + } | |
315 | + | |
316 | + | |
305 | 317 | } else { |
306 | 318 | Toast.makeText(context, "保卡绑定失败!", Toast.LENGTH_LONG).show(); |
307 | 319 | } |
... | ... | @@ -324,12 +336,12 @@ public class HttpManager { |
324 | 336 | } |
325 | 337 | |
326 | 338 | //获取保卡信息 |
327 | - public void getcardinfo(final Context mContext, long userId, final Handler handler) { | |
339 | + public void getcardinfo(final Context mContext, String deviceNumber, final Handler handler) { | |
328 | 340 | mProgress = DialogPermission.showProgress(mContext, null, "正在获取保卡信息...", |
329 | 341 | false, true, null); |
330 | 342 | HttpClient.getInstance().setTimeout(5 * 1000); |
331 | 343 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
332 | - HttpClient.getInstance().get(HttpUrl.getcardinfo + "?userId=" + userId, new AsyncHttpResponseHandler() { | |
344 | + HttpClient.getInstance().get(HttpUrl.getcardinfo + "?deviceNumber=" + deviceNumber, new AsyncHttpResponseHandler() { | |
333 | 345 | @Override |
334 | 346 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
335 | 347 | closeProgress(); |
... | ... | @@ -440,11 +452,11 @@ public class HttpManager { |
440 | 452 | } |
441 | 453 | |
442 | 454 | //验证是否保卡信息 |
443 | - public void cardinfocheck(final Context mContext, long userId, final Handler handler) { | |
455 | + public void cardinfocheck(final Context mContext, String deviceNumber, final Handler handler) { | |
444 | 456 | mProgress = DialogPermission.showProgress(mContext, null, "正在验证保卡信息...", |
445 | 457 | false, true, null); |
446 | 458 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
447 | - HttpClient.getInstance().get(HttpUrl.cardcheck + "?userId=" + userId, new AsyncHttpResponseHandler() { | |
459 | + HttpClient.getInstance().get(HttpUrl.cardcheck + "?deviceNumber=" + deviceNumber, new AsyncHttpResponseHandler() { | |
448 | 460 | @Override |
449 | 461 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
450 | 462 | Log.e("test", "---" + new String(arg2)); |
... | ... | @@ -695,17 +707,17 @@ public class HttpManager { |
695 | 707 | }); |
696 | 708 | } |
697 | 709 | //修改版本信息 |
698 | - public void changepublishinfo(final Context mContext, String userId, | |
699 | - String math, String english, String physics, String chinese, String chemistry, | |
710 | + public void changepublishinfo(final Context mContext, String userId, String chinese, | |
711 | + String math, String english, String physics, String chemistry, | |
700 | 712 | String history, String geography, String political, String biology, String science){ |
701 | 713 | mProgress = DialogPermission.showProgress(mContext, null, "正在保存个人信息...", |
702 | 714 | false, true, null); |
703 | 715 | RequestParams params = new RequestParams(); |
704 | 716 | params.put(HttpKey.USEID, userId); |
717 | + params.put(HttpKey.CHINESE, chinese); | |
705 | 718 | params.put(HttpKey.MATH, math); |
706 | 719 | params.put(HttpKey.ENGLISH, english); |
707 | 720 | params.put(HttpKey.PHYSICES, physics); |
708 | - params.put(HttpKey.CHINESE, chinese); | |
709 | 721 | params.put(HttpKey.CHEMISTRY, chemistry); |
710 | 722 | params.put(HttpKey.HISTIRY, history); |
711 | 723 | params.put(HttpKey.GEOGRAPHY, geography); |
... | ... | @@ -1411,9 +1423,9 @@ public class HttpManager { |
1411 | 1423 | }); |
1412 | 1424 | } |
1413 | 1425 | //获取版本信息接口 |
1414 | - public void getpublishinfo(final Context mContext, long userId,int gradeId, final Handler handler) { | |
1426 | + public void getpublishinfo(final Context mContext, Object userId,int gradeId, int type,final Handler handler) { | |
1415 | 1427 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
1416 | - HttpClient.getInstance().get(HttpUrl.getpublishURL + "?userId=" + userId+ "&gradeId=" + gradeId, new AsyncHttpResponseHandler() { | |
1428 | + HttpClient.getInstance().get(HttpUrl.getpublishURL + "?userId=" + userId+ "&gradeId=" + gradeId+ "&type=" + type, new AsyncHttpResponseHandler() { | |
1417 | 1429 | @Override |
1418 | 1430 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
1419 | 1431 | Log.e("test", "获取版本信息接口" + new String(arg2)); | ... | ... |
PersonalCenter/app/src/main/res/layout/activity_account_management.xml
... | ... | @@ -308,27 +308,10 @@ |
308 | 308 | android:layout_width="wrap_content" |
309 | 309 | android:layout_height="wrap_content" |
310 | 310 | android:layout_centerVertical="true" |
311 | - android:layout_toLeftOf="@+id/add_account" | |
312 | 311 | android:scrollbars="none"> |
313 | 312 | |
314 | 313 | </android.support.v7.widget.RecyclerView> |
315 | 314 | |
316 | - <LinearLayout | |
317 | - android:id="@+id/add_account" | |
318 | - android:layout_width="415dp" | |
319 | - android:layout_height="165dp" | |
320 | - android:layout_alignParentRight="true" | |
321 | - android:layout_marginLeft="10dp" | |
322 | - android:layout_marginRight="20dp" | |
323 | - android:background="@drawable/corcle_black_bg" | |
324 | - android:gravity="center"> | |
325 | - | |
326 | - <ImageView | |
327 | - android:layout_width="wrap_content" | |
328 | - android:layout_height="wrap_content" | |
329 | - android:src="@mipmap/jia" /> | |
330 | - | |
331 | - </LinearLayout> | |
332 | 315 | |
333 | 316 | |
334 | 317 | </RelativeLayout> | ... | ... |
PersonalCenter/app/src/main/res/layout/activity_account_management_add.xml
... | ... | @@ -0,0 +1,22 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
3 | + android:orientation="vertical" | |
4 | + android:layout_width="match_parent" | |
5 | + android:layout_height="match_parent"> | |
6 | + <LinearLayout | |
7 | + android:id="@+id/add_account" | |
8 | + android:layout_width="400dp" | |
9 | + android:layout_height="165dp" | |
10 | + android:layout_alignParentRight="true" | |
11 | + android:layout_marginRight="20dp" | |
12 | + android:background="@drawable/corcle_black_bg" | |
13 | + android:gravity="center"> | |
14 | + | |
15 | + <ImageView | |
16 | + android:layout_width="wrap_content" | |
17 | + android:layout_height="wrap_content" | |
18 | + android:src="@mipmap/jia" /> | |
19 | + | |
20 | + </LinearLayout> | |
21 | + | |
22 | +</LinearLayout> | |
0 | 23 | \ No newline at end of file | ... | ... |
PersonalCenter/app/src/main/res/layout/activity_change_preson_info.xml
... | ... | @@ -10,16 +10,15 @@ |
10 | 10 | <LinearLayout |
11 | 11 | android:layout_width="wrap_content" |
12 | 12 | android:layout_height="wrap_content" |
13 | - android:layout_marginTop="30dp" | |
14 | 13 | android:layout_below="@+id/title" |
15 | 14 | android:orientation="vertical"> |
16 | 15 | |
17 | - <com.hjx.personalcenter.thirdparty.SlidingTabLayout | |
18 | - android:id="@+id/TabLayout_id" | |
19 | - android:layout_gravity="center" | |
20 | - android:layout_width="wrap_content" | |
21 | - android:layout_height="50dp"> | |
22 | - </com.hjx.personalcenter.thirdparty.SlidingTabLayout> | |
16 | + <!--<com.hjx.personalcenter.thirdparty.SlidingTabLayout--> | |
17 | + <!--android:id="@+id/TabLayout_id"--> | |
18 | + <!--android:layout_gravity="center"--> | |
19 | + <!--android:layout_width="wrap_content"--> | |
20 | + <!--android:layout_height="50dp">--> | |
21 | + <!--</com.hjx.personalcenter.thirdparty.SlidingTabLayout>--> | |
23 | 22 | |
24 | 23 | <android.support.v4.view.ViewPager |
25 | 24 | android:id="@+id/viewpager_login" | ... | ... |
PersonalCenter/app/src/main/res/layout/activity_feedback.xml
PersonalCenter/app/src/main/res/layout/fragment_changge_presonal_info.xml
... | ... | @@ -44,6 +44,42 @@ |
44 | 44 | |
45 | 45 | |
46 | 46 | <LinearLayout |
47 | + android:layout_width="match_parent" | |
48 | + android:layout_height="wrap_content" | |
49 | + android:layout_marginTop="50dp" | |
50 | + android:orientation="horizontal"> | |
51 | + <LinearLayout | |
52 | + android:layout_width="0dp" | |
53 | + android:layout_weight="1" | |
54 | + android:gravity="center" | |
55 | + android:layout_height="match_parent"> | |
56 | + <TextView | |
57 | + android:id="@+id/tv_presonal" | |
58 | + android:layout_width="wrap_content" | |
59 | + android:layout_height="wrap_content" | |
60 | + android:textSize="22sp" | |
61 | + android:textColor="@color/login_edittext_pressed" | |
62 | + android:text="个人信息"/> | |
63 | + | |
64 | + </LinearLayout> | |
65 | + <LinearLayout | |
66 | + android:id="@+id/tv_version" | |
67 | + android:layout_width="0dp" | |
68 | + android:layout_weight="1" | |
69 | + android:gravity="center" | |
70 | + android:layout_height="match_parent"> | |
71 | + <TextView | |
72 | + android:textSize="22sp" | |
73 | + android:layout_width="wrap_content" | |
74 | + android:layout_height="wrap_content" | |
75 | + android:text="版本信息"/> | |
76 | + | |
77 | + </LinearLayout> | |
78 | + | |
79 | + </LinearLayout> | |
80 | + | |
81 | + | |
82 | + <LinearLayout | |
47 | 83 | android:layout_width="wrap_content" |
48 | 84 | android:layout_height="wrap_content" |
49 | 85 | android:layout_marginTop="80dp" | ... | ... |
PersonalCenter/app/src/main/res/layout/fragment_changge_version_info.xml
... | ... | @@ -40,13 +40,49 @@ |
40 | 40 | |
41 | 41 | |
42 | 42 | </RelativeLayout> |
43 | + <LinearLayout | |
44 | + android:id="@+id/tiles" | |
45 | + android:layout_width="match_parent" | |
46 | + android:layout_height="wrap_content" | |
47 | + android:layout_below="@+id/title" | |
48 | + android:layout_marginTop="50dp" | |
49 | + android:orientation="horizontal"> | |
50 | + <LinearLayout | |
51 | + android:id="@+id/tv_presons" | |
52 | + android:layout_width="0dp" | |
53 | + android:layout_weight="1" | |
54 | + android:gravity="center" | |
55 | + android:layout_height="match_parent"> | |
56 | + <TextView | |
57 | + android:id="@+id/tv_presonal" | |
58 | + android:layout_width="wrap_content" | |
59 | + android:layout_height="wrap_content" | |
60 | + android:textSize="22sp" | |
61 | + android:text="个人信息"/> | |
62 | + | |
63 | + </LinearLayout> | |
64 | + <LinearLayout | |
65 | + android:layout_width="0dp" | |
66 | + android:layout_weight="1" | |
67 | + android:gravity="center" | |
68 | + android:layout_height="match_parent"> | |
69 | + <TextView | |
70 | + android:textSize="22sp" | |
71 | + android:layout_width="wrap_content" | |
72 | + android:layout_height="wrap_content" | |
73 | + android:textColor="@color/login_edittext_pressed" | |
74 | + android:text="版本信息"/> | |
75 | + | |
76 | + </LinearLayout> | |
77 | + | |
78 | + </LinearLayout> | |
43 | 79 | <GridView |
44 | 80 | android:id="@+id/grideview" |
45 | 81 | android:layout_margin="30dp" |
46 | 82 | android:layout_width="match_parent" |
47 | 83 | android:layout_height="wrap_content" |
48 | 84 | android:gravity="center_vertical" |
49 | - android:layout_below="@+id/title" | |
85 | + android:layout_below="@+id/tiles" | |
50 | 86 | android:verticalSpacing="20dp" |
51 | 87 | android:numColumns="5"> |
52 | 88 | ... | ... |
PersonalCenter/app/src/main/res/layout/recycler_childaccunt_item_view.xml
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 3 | xmlns:fresco="http://schemas.android.com/apk/res-auto" |
4 | 4 | android:orientation="vertical" |
5 | - android:layout_width="415dp" | |
5 | + android:layout_width="400dp" | |
6 | 6 | android:layout_height="match_parent"> |
7 | 7 | <LinearLayout |
8 | 8 | android:id="@+id/ll_backgrangd" | ... | ... |