Commit ff014aa0bab93425e3ba5903570dc11509bd00c2
1 parent
70733fe33c
Exists in
master
接口调试
Showing
29 changed files
with
575 additions
and
186 deletions
Show diff stats
PersonalCenter/app/build.gradle
PersonalCenter/app/src/main/AndroidManifest.xml
... | ... | @@ -13,16 +13,17 @@ |
13 | 13 | android:name=".activity.MainActivity" |
14 | 14 | android:launchMode="singleTask" |
15 | 15 | android:screenOrientation="landscape"> |
16 | - <intent-filter> | |
17 | - <action android:name="android.intent.action.MAIN" /> | |
18 | - | |
19 | - <category android:name="android.intent.category.LAUNCHER" /> | |
20 | - </intent-filter> | |
21 | 16 | </activity> |
22 | 17 | <activity |
23 | 18 | android:name=".activity.LoginAndRegisterActivity" |
24 | 19 | android:launchMode="singleTask" |
20 | + | |
25 | 21 | android:screenOrientation="landscape"> |
22 | + <intent-filter> | |
23 | + <action android:name="android.intent.action.MAIN" /> | |
24 | + | |
25 | + <category android:name="android.intent.category.LAUNCHER" /> | |
26 | + </intent-filter> | |
26 | 27 | |
27 | 28 | </activity> |
28 | 29 | <activity | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/AccountManagementActivity.java
... | ... | @@ -8,13 +8,14 @@ import android.widget.TextView; |
8 | 8 | |
9 | 9 | import com.hjx.personalcenter.R; |
10 | 10 | import com.hjx.personalcenter.db.Content; |
11 | +import com.hjx.personalcenter.db.SaveParam; | |
11 | 12 | |
12 | 13 | /**账户管理 熊巍 |
13 | 14 | * Created by h on 2017/8/12. |
14 | 15 | */ |
15 | 16 | |
16 | 17 | public class AccountManagementActivity extends Activity implements View.OnClickListener { |
17 | - private TextView changbangding,changpassword; | |
18 | + private TextView changbangding,changpassword,usernames; | |
18 | 19 | @Override |
19 | 20 | protected void onCreate(Bundle savedInstanceState) { |
20 | 21 | super.onCreate(savedInstanceState); |
... | ... | @@ -27,9 +28,12 @@ public class AccountManagementActivity extends Activity implements View.OnClickL |
27 | 28 | private void initView() { |
28 | 29 | changbangding = (TextView) findViewById(R.id.changBangding); |
29 | 30 | changpassword = (TextView) findViewById(R.id.changpassword); |
31 | + usernames = (TextView) findViewById(R.id.cunt_username); | |
30 | 32 | } |
31 | 33 | |
32 | 34 | private void initData() { |
35 | + String cunt_username = SaveParam.getInstance().getLoginParam(this,"cunt_username"); | |
36 | + usernames.setText(cunt_username); | |
33 | 37 | |
34 | 38 | } |
35 | 39 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ChangeElectronicCardAdressInfoActivity.java
1 | 1 | package com.hjx.personalcenter.activity; |
2 | 2 | |
3 | -import android.app.Activity; | |
4 | 3 | import android.os.Bundle; |
5 | 4 | import android.os.Handler; |
6 | 5 | import android.os.Message; |
6 | +import android.support.v7.app.AppCompatActivity; | |
7 | 7 | import android.text.TextUtils; |
8 | 8 | import android.view.View; |
9 | 9 | import android.widget.Button; |
10 | 10 | import android.widget.EditText; |
11 | 11 | import android.widget.ImageView; |
12 | +import android.widget.TextView; | |
12 | 13 | |
13 | 14 | import com.hjx.personalcenter.R; |
15 | +import com.hjx.personalcenter.customdialog.CitysListDialog; | |
16 | +import com.hjx.personalcenter.customdialog.CountryDialog; | |
17 | +import com.hjx.personalcenter.customdialog.ProvinceListDialog; | |
18 | +import com.hjx.personalcenter.db.SaveParam; | |
14 | 19 | import com.hjx.personalcenter.http.HttpCode; |
15 | 20 | import com.hjx.personalcenter.http.HttpManager; |
21 | +import com.hjx.personalcenter.interfaces.DialogCallBack; | |
22 | +import com.hjx.personalcenter.model.CityInfo; | |
23 | +import com.hjx.personalcenter.model.CountyInfo; | |
24 | +import com.hjx.personalcenter.model.ProvinceInfo; | |
16 | 25 | import com.hjx.personalcenter.util.AlertUtils; |
17 | 26 | import com.hjx.personalcenter.util.Judgment; |
18 | 27 | import com.hjx.personalcenter.util.PhoneNumCheckUtils; |
19 | 28 | |
20 | 29 | import org.json.JSONObject; |
21 | 30 | |
31 | +import java.util.ArrayList; | |
32 | + | |
22 | 33 | /** |
23 | 34 | * Created by h on 2017/8/9. |
24 | 35 | */ |
25 | 36 | |
26 | -public class ChangeElectronicCardAdressInfoActivity extends Activity implements View.OnClickListener{ | |
37 | +public class ChangeElectronicCardAdressInfoActivity extends AppCompatActivity implements View.OnClickListener | |
38 | + ,DialogCallBack.ProvincesCallBack | |
39 | + ,DialogCallBack.CitysCallBack,DialogCallBack.CountryCallBack{ | |
27 | 40 | private ImageView back_forgit; |
28 | - private EditText forot_pwd_phone,forot_pwd_anthcode,adress,newadress; | |
41 | + private EditText forot_pwd_phone,forot_pwd_anthcode,newadress; | |
42 | + private TextView adress; | |
29 | 43 | private Button forot_pwd_sub,forot_pwd_getanthcode; |
30 | 44 | private String typeStr = "register"; |
31 | 45 | private int i = 0; |
... | ... | @@ -85,7 +99,7 @@ public class ChangeElectronicCardAdressInfoActivity extends Activity implements |
85 | 99 | private void initView() { |
86 | 100 | forot_pwd_phone = (EditText) findViewById(R.id.et_phonenumber); |
87 | 101 | forot_pwd_anthcode = (EditText) findViewById(R.id.et_authcode); |
88 | - adress = (EditText) findViewById(R.id.et_newpassword); | |
102 | + adress = (TextView) findViewById(R.id.et_newpassword); | |
89 | 103 | newadress = (EditText) findViewById(R.id.et_again_newpassword); |
90 | 104 | forot_pwd_sub = (Button) findViewById(R.id.btn_ok); |
91 | 105 | forot_pwd_getanthcode = (Button) findViewById(R.id.btn_authcode); |
... | ... | @@ -95,6 +109,7 @@ public class ChangeElectronicCardAdressInfoActivity extends Activity implements |
95 | 109 | back_forgit.setOnClickListener(this); |
96 | 110 | forot_pwd_sub.setOnClickListener(this); |
97 | 111 | forot_pwd_getanthcode.setOnClickListener(this); |
112 | + adress.setOnClickListener(this); | |
98 | 113 | |
99 | 114 | } |
100 | 115 | |
... | ... | @@ -115,7 +130,15 @@ public class ChangeElectronicCardAdressInfoActivity extends Activity implements |
115 | 130 | |
116 | 131 | } else { |
117 | 132 | //修改地址接口 |
118 | - HttpManager.getInstance().changecardadressinfo(this,111,forot_pwd_phone1,forot_pwd_anthcode1,forot_pwd_pwd3+forot_pwd_pwd4); | |
133 | + String userID = SaveParam.getInstance().getLoginParam(this,"userId"); | |
134 | + long auserID = 0; | |
135 | + try { | |
136 | + auserID = Long.parseLong(userID); | |
137 | + HttpManager.getInstance().changecardadressinfo(this,auserID,forot_pwd_phone1,forot_pwd_anthcode1,forot_pwd_pwd3+forot_pwd_pwd4); | |
138 | + } catch (NumberFormatException e) { | |
139 | + e.printStackTrace(); | |
140 | + } | |
141 | + | |
119 | 142 | } |
120 | 143 | break; |
121 | 144 | case R.id.btn_authcode: |
... | ... | @@ -129,12 +152,45 @@ public class ChangeElectronicCardAdressInfoActivity extends Activity implements |
129 | 152 | } |
130 | 153 | |
131 | 154 | break; |
155 | + case R.id.et_newpassword: | |
156 | + ProvinceListDialog.getInstance((DialogCallBack.ProvincesCallBack) ChangeElectronicCardAdressInfoActivity.this).show(getSupportFragmentManager(), "ProvinceListDialog"); | |
157 | + break; | |
132 | 158 | |
133 | 159 | case R.id.cancel: |
134 | 160 | finish(); |
135 | 161 | break; |
136 | 162 | } |
137 | 163 | } |
164 | + | |
165 | + @Override | |
166 | + public void province1OnItemClick(ArrayList<CityInfo.CitiesBean> data, int position, int type) { | |
167 | + String regionName = data.get(position).getRegionName(); | |
168 | + String provice = SaveParam.getInstance().getLoginParam(this,"sheng"); | |
169 | + SaveParam.getInstance().saveLoginParam(this,"shi",regionName); | |
170 | + CountryDialog.getInstance((DialogCallBack.CountryCallBack) this).show(getSupportFragmentManager(), "CountryDialog"); | |
171 | + adress.setText(""); | |
172 | + adress.setText(provice+regionName); | |
173 | + | |
174 | + | |
175 | + } | |
176 | + | |
177 | + @Override | |
178 | + public void province2OnItemClick(ArrayList<CountyInfo.CountiesBean> data, int position, int type) { | |
179 | + String regionName = data.get(position).getRegionName(); | |
180 | + String provices = SaveParam.getInstance().getLoginParam(this,"sheng"); | |
181 | + String citys = SaveParam.getInstance().getLoginParam(this,"shi"); | |
182 | + adress.setText(""); | |
183 | + adress.setText(provices+citys+regionName); | |
184 | + } | |
185 | + | |
186 | + @Override | |
187 | + public void provinceOnItemClick(ArrayList<ProvinceInfo.ProvincesBean> data, int position, int type) { | |
188 | + String regionName = data.get(position).getRegionName(); | |
189 | + SaveParam.getInstance().saveLoginParam(this,"sheng",regionName); | |
190 | + CitysListDialog.getInstance((DialogCallBack.CitysCallBack) this).show(getSupportFragmentManager(), "CitysListDialog"); | |
191 | + | |
192 | + } | |
193 | + | |
138 | 194 | // 线程类 定时器 |
139 | 195 | class ThreadShow implements Runnable { |
140 | 196 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ChoiseTextBookActivity.java
... | ... | @@ -12,6 +12,7 @@ import android.widget.SimpleAdapter; |
12 | 12 | |
13 | 13 | import com.hjx.personalcenter.R; |
14 | 14 | import com.hjx.personalcenter.customdialog.ElectronicCardDialog; |
15 | +import com.hjx.personalcenter.db.SaveParam; | |
15 | 16 | import com.hjx.personalcenter.http.HttpCode; |
16 | 17 | import com.hjx.personalcenter.http.HttpManager; |
17 | 18 | |
... | ... | @@ -122,7 +123,14 @@ public class ChoiseTextBookActivity extends AppCompatActivity implements View.On |
122 | 123 | public void onClick(View v) { |
123 | 124 | switch (v.getId()){ |
124 | 125 | case R.id.btn_ok: |
125 | - HttpManager.getInstance().cardinfocheck(this,836,handler); | |
126 | + String userID = SaveParam.getInstance().getLoginParam(this,"userId"); | |
127 | + try { | |
128 | + long auserID = Long.parseLong(userID); | |
129 | + HttpManager.getInstance().cardinfocheck(this,auserID,handler); | |
130 | + } catch (NumberFormatException e) { | |
131 | + e.printStackTrace(); | |
132 | + } | |
133 | + | |
126 | 134 | break; |
127 | 135 | } |
128 | 136 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ElectronicCardEditInfoActivity.java
1 | 1 | package com.hjx.personalcenter.activity; |
2 | 2 | |
3 | -import android.app.Activity; | |
4 | 3 | import android.content.Intent; |
5 | 4 | import android.graphics.Color; |
6 | 5 | import android.os.Bundle; |
6 | +import android.support.v7.app.AppCompatActivity; | |
7 | 7 | import android.text.TextUtils; |
8 | 8 | import android.view.View; |
9 | 9 | import android.widget.Button; |
... | ... | @@ -14,17 +14,28 @@ import android.widget.TextView; |
14 | 14 | |
15 | 15 | import com.bigkoo.pickerview.TimePickerView; |
16 | 16 | import com.hjx.personalcenter.R; |
17 | +import com.hjx.personalcenter.customdialog.CitysListDialog; | |
18 | +import com.hjx.personalcenter.customdialog.CountryDialog; | |
19 | +import com.hjx.personalcenter.customdialog.ProvinceListDialog; | |
20 | +import com.hjx.personalcenter.db.Content; | |
17 | 21 | import com.hjx.personalcenter.db.SaveParam; |
22 | +import com.hjx.personalcenter.interfaces.DialogCallBack; | |
23 | +import com.hjx.personalcenter.model.CityInfo; | |
24 | +import com.hjx.personalcenter.model.CountyInfo; | |
25 | +import com.hjx.personalcenter.model.ProvinceInfo; | |
18 | 26 | import com.hjx.personalcenter.util.AlertUtils; |
19 | 27 | |
20 | 28 | import java.text.SimpleDateFormat; |
29 | +import java.util.ArrayList; | |
21 | 30 | import java.util.Date; |
22 | 31 | |
23 | 32 | /**填写保卡信息 熊巍 |
24 | 33 | * Created by h on 2017/8/11. |
25 | 34 | */ |
26 | 35 | |
27 | -public class ElectronicCardEditInfoActivity extends Activity implements View.OnClickListener { | |
36 | +public class ElectronicCardEditInfoActivity extends AppCompatActivity implements View.OnClickListener | |
37 | + ,DialogCallBack.ProvincesCallBack | |
38 | + ,DialogCallBack.CitysCallBack,DialogCallBack.CountryCallBack{ | |
28 | 39 | private LinearLayout lineL_buy_time; |
29 | 40 | private TextView tv_buy_time,adress_shop,adress_custem; |
30 | 41 | private EditText username,store,detalAdress,telphone; |
... | ... | @@ -52,6 +63,7 @@ public class ElectronicCardEditInfoActivity extends Activity implements View.OnC |
52 | 63 | detalAdress = (EditText) findViewById(R.id.et_edit_adress_detail); |
53 | 64 | telphone = (EditText) findViewById(R.id.et_edit_telphone); |
54 | 65 | btn_change_info = (Button) findViewById(R.id.btn_change_info); |
66 | + iv_card_back = (ImageView) findViewById(R.id.iv_card_back); | |
55 | 67 | } |
56 | 68 | |
57 | 69 | private void initData() { |
... | ... | @@ -137,11 +149,17 @@ public class ElectronicCardEditInfoActivity extends Activity implements View.OnC |
137 | 149 | |
138 | 150 | break; |
139 | 151 | case R.id.tv_edit_adress_shop: |
152 | + Content.adressflag =1; | |
153 | + ProvinceListDialog.getInstance((DialogCallBack.ProvincesCallBack) this).show(getSupportFragmentManager(), "ProvinceListDialog"); | |
140 | 154 | |
141 | - adress_shop.setText("湖南省益阳市上河区"); | |
142 | 155 | break; |
143 | 156 | case R.id.tv_edit_adress_custem: |
144 | - adress_custem.setText("湖南省益阳市上河区"); | |
157 | + Content.adressflag =2; | |
158 | + ProvinceListDialog.getInstance((DialogCallBack.ProvincesCallBack) this).show(getSupportFragmentManager(), "ProvinceListDialog"); | |
159 | + | |
160 | + break; | |
161 | + case R.id.iv_card_back: | |
162 | + finish(); | |
145 | 163 | break; |
146 | 164 | |
147 | 165 | } |
... | ... | @@ -157,4 +175,46 @@ public class ElectronicCardEditInfoActivity extends Activity implements View.OnC |
157 | 175 | SaveParam.getInstance().saveCustomizeParam(this,SaveParam.SHOPTLEPHONE, telphone.getText().toString().trim()); |
158 | 176 | |
159 | 177 | } |
178 | + | |
179 | + @Override | |
180 | + public void province1OnItemClick(ArrayList<CityInfo.CitiesBean> data, int position, int type) { | |
181 | + String regionName = data.get(position).getRegionName(); | |
182 | + String provice = SaveParam.getInstance().getLoginParam(this,"sheng"); | |
183 | + SaveParam.getInstance().saveLoginParam(this,"shi",regionName); | |
184 | + CountryDialog.getInstance((DialogCallBack.CountryCallBack) this).show(getSupportFragmentManager(), "CountryDialog"); | |
185 | + if (Content.adressflag ==1){ | |
186 | + adress_shop.setText(""); | |
187 | + adress_shop.setText(provice+regionName); | |
188 | + }else { | |
189 | + adress_custem.setText(""); | |
190 | + adress_custem.setText(provice+regionName); | |
191 | + } | |
192 | + | |
193 | + } | |
194 | + | |
195 | + @Override | |
196 | + public void province2OnItemClick(ArrayList<CountyInfo.CountiesBean> data, int position, int type) { | |
197 | + String regionName = data.get(position).getRegionName(); | |
198 | + String provices = SaveParam.getInstance().getLoginParam(this,"sheng"); | |
199 | + String citys = SaveParam.getInstance().getLoginParam(this,"shi"); | |
200 | + if (Content.adressflag ==1){ | |
201 | + adress_shop.setText(""); | |
202 | + adress_shop.setText(provices+citys+regionName); | |
203 | + }else { | |
204 | + adress_custem.setText(""); | |
205 | + adress_custem.setText(provices+citys+regionName); | |
206 | + } | |
207 | + | |
208 | + | |
209 | + | |
210 | + } | |
211 | + | |
212 | + @Override | |
213 | + public void provinceOnItemClick(ArrayList<ProvinceInfo.ProvincesBean> data, int position, int type) { | |
214 | + String regionName = data.get(position).getRegionName(); | |
215 | + SaveParam.getInstance().saveLoginParam(this,"sheng",regionName); | |
216 | + CitysListDialog.getInstance((DialogCallBack.CitysCallBack) this).show(getSupportFragmentManager(), "CitysListDialog"); | |
217 | + | |
218 | + | |
219 | + } | |
160 | 220 | } | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ElectronicCardInfoOKActivity.java
... | ... | @@ -67,7 +67,14 @@ public class ElectronicCardInfoOKActivity extends Activity implements View.OnCli |
67 | 67 | public void onClick(View v) { |
68 | 68 | switch (v.getId()){ |
69 | 69 | case R.id.btn_finish: |
70 | - HttpManager.getInstance().subcardinfo(this,736,usename.getText().toString().trim(), | |
70 | + String userID = SaveParam.getInstance().getLoginParam(this,"userId"); | |
71 | + long auserID = 0; | |
72 | + try { | |
73 | + auserID = Long.parseLong(userID); | |
74 | + } catch (NumberFormatException e) { | |
75 | + e.printStackTrace(); | |
76 | + } | |
77 | + HttpManager.getInstance().subcardinfo(this,auserID,usename.getText().toString().trim(), | |
71 | 78 | customer_address.getText().toString().trim(),shopadress.getText().toString().trim(), |
72 | 79 | shoptime.getText().toString().trim(),tlePhone.getText().toString().trim(), |
73 | 80 | deviceModel.getText().toString().trim(),deviceNumber.getText().toString().trim(), | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ElectronicCardLookInfoActivity.java
... | ... | @@ -64,6 +64,19 @@ public class ElectronicCardLookInfoActivity extends AppCompatActivity implements |
64 | 64 | initData(); |
65 | 65 | initLister(); |
66 | 66 | } |
67 | + | |
68 | + @Override | |
69 | + protected void onResume() { | |
70 | + super.onResume(); | |
71 | + String userID = SaveParam.getInstance().getLoginParam(this,"userId"); | |
72 | + try { | |
73 | + Long a = Long.parseLong(userID); | |
74 | + HttpManager.getInstance().getcardinfo(this,a,handler); | |
75 | + } catch (NumberFormatException e) { | |
76 | + e.printStackTrace(); | |
77 | + } | |
78 | + } | |
79 | + | |
67 | 80 | private void initView() { |
68 | 81 | usename = (TextView) findViewById(R.id.iv_card_username); |
69 | 82 | iv_last_step = (ImageView) findViewById(R.id.cancel); |
... | ... | @@ -79,13 +92,6 @@ public class ElectronicCardLookInfoActivity extends AppCompatActivity implements |
79 | 92 | tv_card_phone_change = (TextView) findViewById(R.id.tv_card_phone_change); |
80 | 93 | } |
81 | 94 | private void initData() { |
82 | - String userID = SaveParam.getInstance().getLoginParam(this,"userId"); | |
83 | - try { | |
84 | - int a = Integer.parseInt(userID); | |
85 | - HttpManager.getInstance().getcardinfo(this,a,handler); | |
86 | - } catch (NumberFormatException e) { | |
87 | - e.printStackTrace(); | |
88 | - } | |
89 | 95 | |
90 | 96 | // //获取设备信息 |
91 | 97 | // deviceModel.setText(GetDevicesUtil.getDevicesInfo(this).getDeviceModel()); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ElectronicCardValidationActivity.java
... | ... | @@ -123,18 +123,26 @@ public class ElectronicCardValidationActivity extends Activity implements View.O |
123 | 123 | }else if (!authcode.equals(authcodeStr)){ |
124 | 124 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "您输入的验证码不正确"); |
125 | 125 | }else { |
126 | + String userID = SaveParam.getInstance().getLoginParam(this,"userId"); | |
127 | + int auserID = 0; | |
128 | + try { | |
129 | + auserID = Integer.parseInt(userID); | |
130 | + } catch (NumberFormatException e) { | |
131 | + e.printStackTrace(); | |
132 | + } | |
126 | 133 | if (Content.authcodeflag==1){ |
127 | 134 | //修改账户手机号 |
128 | 135 | HttpManager.getInstance().changecardinfophone(this, |
129 | - 736,usernameStr,authcodeStr); | |
136 | + auserID,usernameStr,authcodeStr); | |
130 | 137 | |
131 | 138 | |
132 | 139 | }else if (Content.authcodeflag==2){ |
133 | 140 | //修改保卡手机号 |
134 | 141 | HttpManager.getInstance().changecardinfophone(this, |
135 | - 736,usernameStr,authcodeStr); | |
142 | + auserID,usernameStr,authcodeStr); | |
136 | 143 | }else { |
137 | - SaveParam.getInstance().saveCustomizeParam(this,SaveParam.CARDPHONE, phonenumber.getText().toString().trim()); | |
144 | + String phone =phonenumber.getText().toString().trim(); | |
145 | + SaveParam.getInstance().saveCustomizeParam(this,SaveParam.CARDPHONE, phone ); | |
138 | 146 | Intent intent = new Intent(); |
139 | 147 | intent.setClass(ElectronicCardValidationActivity.this, ElectronicCardEditInfoActivity.class); |
140 | 148 | startActivity(intent); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/FeedBackActivity.java
... | ... | @@ -87,6 +87,7 @@ public class FeedBackActivity extends AppCompatActivity implements View.OnClickL |
87 | 87 | iv_cance.setOnClickListener(this); |
88 | 88 | iv_take.setOnClickListener(this); |
89 | 89 | tv_sub.setOnClickListener(this); |
90 | + mSimpleDraweeView.setOnClickListener(this); | |
90 | 91 | |
91 | 92 | } |
92 | 93 | |
... | ... | @@ -101,6 +102,9 @@ public class FeedBackActivity extends AppCompatActivity implements View.OnClickL |
101 | 102 | break; |
102 | 103 | case R.id.feedback_sub: |
103 | 104 | break; |
105 | + case R.id.show_iv: | |
106 | + | |
107 | + break; | |
104 | 108 | } |
105 | 109 | } |
106 | 110 | |
... | ... | @@ -208,7 +212,7 @@ public class FeedBackActivity extends AppCompatActivity implements View.OnClickL |
208 | 212 | .setDesiredAspectRatio(1f) |
209 | 213 | .setFailureImage(R.mipmap.blank) |
210 | 214 | //圆形头像 |
211 | - .setRoundingParams(RoundingParams.asCircle()) | |
215 | + .setRoundingParams(RoundingParams.fromCornersRadius(0.7f)) | |
212 | 216 | .build(); |
213 | 217 | |
214 | 218 | //加载本地图片 |
... | ... | @@ -227,10 +231,10 @@ public class FeedBackActivity extends AppCompatActivity implements View.OnClickL |
227 | 231 | intent.setDataAndType(uri, "image/*"); |
228 | 232 | intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); |
229 | 233 | intent.putExtra("crop", "true");// crop=true 有这句才能出来最后的裁剪页面. |
230 | - intent.putExtra("aspectX", 1);// 这两项为裁剪框的比例. | |
231 | - intent.putExtra("aspectY", 1);// x:y=1:1 | |
232 | -// intent.putExtra("outputX", 400);//图片输出大小 | |
233 | -// intent.putExtra("outputY", 400); | |
234 | +// intent.putExtra("aspectX", 1);// 这两项为裁剪框的比例. | |
235 | +// intent.putExtra("aspectY", 1);// x:y=1:1 | |
236 | + intent.putExtra("outputX", 400);//图片输出大小 | |
237 | + intent.putExtra("outputY", 400); | |
234 | 238 | intent.putExtra("output", Uri.fromFile(file)); |
235 | 239 | intent.putExtra("outputFormat", "JPEG");// 返回格式 |
236 | 240 | startActivityForResult(intent, REQUEST_CODE_CROUP_PHOTO); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/LoginAndRegisterActivity.java
1 | 1 | package com.hjx.personalcenter.activity; |
2 | 2 | |
3 | +import android.content.Intent; | |
3 | 4 | import android.os.Bundle; |
4 | 5 | import android.support.annotation.Nullable; |
5 | 6 | import android.support.v4.app.Fragment; |
... | ... | @@ -8,6 +9,7 @@ import android.support.v7.app.AppCompatActivity; |
8 | 9 | |
9 | 10 | import com.hjx.personalcenter.R; |
10 | 11 | import com.hjx.personalcenter.adapter.LoginAndRegisterAdapter; |
12 | +import com.hjx.personalcenter.db.SaveParam; | |
11 | 13 | import com.hjx.personalcenter.fragment.RegisterFragment; |
12 | 14 | import com.hjx.personalcenter.fragment.LoginFragment; |
13 | 15 | import com.hjx.personalcenter.thirdparty.SlidingTabLayout; |
... | ... | @@ -31,6 +33,15 @@ public class LoginAndRegisterActivity extends AppCompatActivity { |
31 | 33 | @Override |
32 | 34 | protected void onCreate(@Nullable Bundle savedInstanceState) { |
33 | 35 | super.onCreate(savedInstanceState); |
36 | + String islogin =SaveParam.getInstance().getLoginParam(this,"login"); | |
37 | + if ("true".equals(islogin)){ | |
38 | + Intent intent = new Intent(); | |
39 | + intent.setClass(this,MainActivity.class); | |
40 | + startActivity(intent); | |
41 | + overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
42 | + finish(); | |
43 | + | |
44 | + } | |
34 | 45 | setContentView(R.layout.activity_loginandregister); |
35 | 46 | initView(); |
36 | 47 | initData(); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/MainActivity.java
... | ... | @@ -12,6 +12,8 @@ import android.provider.MediaStore; |
12 | 12 | import android.support.annotation.NonNull; |
13 | 13 | import android.support.v4.content.FileProvider; |
14 | 14 | import android.support.v7.app.AppCompatActivity; |
15 | +import android.support.v7.widget.LinearLayoutManager; | |
16 | +import android.support.v7.widget.RecyclerView; | |
15 | 17 | import android.view.View; |
16 | 18 | import android.widget.ImageView; |
17 | 19 | import android.widget.LinearLayout; |
... | ... | @@ -25,6 +27,7 @@ import com.facebook.drawee.generic.RoundingParams; |
25 | 27 | import com.facebook.drawee.interfaces.DraweeController; |
26 | 28 | import com.facebook.drawee.view.SimpleDraweeView; |
27 | 29 | import com.hjx.personalcenter.R; |
30 | +import com.hjx.personalcenter.adapter.RecyclerViewAdapter; | |
28 | 31 | import com.hjx.personalcenter.customdialog.HeadDialog; |
29 | 32 | import com.hjx.personalcenter.db.SaveParam; |
30 | 33 | import com.hjx.personalcenter.http.HttpCode; |
... | ... | @@ -56,6 +59,9 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
56 | 59 | tv_useinfo_qq, tv_useinfo_school, tv_useinfo_gender; |
57 | 60 | private LinearLayout linel_mycuoti, linel_mynote, linel_mycollege, linel_myclass; |
58 | 61 | private TopRightMenu mTopRightMenu; |
62 | + //水平滑动 | |
63 | + private RecyclerView mRecyclerView; | |
64 | + private RecyclerViewAdapter RecyclerViewadapter; | |
59 | 65 | private boolean showIcon = true; |
60 | 66 | private boolean dimBg = true; |
61 | 67 | private boolean needAnim = true; |
... | ... | @@ -90,7 +96,12 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
90 | 96 | break; |
91 | 97 | case HttpCode.SIGN: |
92 | 98 | SignInfo.DataBean dataBean = (SignInfo.DataBean)msg.obj; |
93 | - tv_sign.setText(dataBean.getSignature()); | |
99 | + if (dataBean.getSignature()==null){ | |
100 | + tv_sign.setText("你还未设置个性签名"); | |
101 | + }else { | |
102 | + tv_sign.setText(dataBean.getSignature()); | |
103 | + } | |
104 | + | |
94 | 105 | break; |
95 | 106 | } |
96 | 107 | } |
... | ... | @@ -131,19 +142,22 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
131 | 142 | linel_mynote = (LinearLayout) findViewById(R.id.linel_mynote); |
132 | 143 | linel_mycollege = (LinearLayout) findViewById(R.id.linel_mycollege); |
133 | 144 | linel_myclass = (LinearLayout) findViewById(R.id.linel_myclass); |
145 | + // | |
146 | + mRecyclerView = (RecyclerView) findViewById(R.id.id_recyclerview_horizontal); | |
134 | 147 | |
135 | 148 | } |
136 | 149 | |
137 | - @Override | |
138 | - protected void onResume() { | |
139 | - super.onResume(); | |
140 | - //获取个人信息 | |
141 | - HttpManager.getInstance().getpresonalinfo(MainActivity.this,688,handler); | |
142 | - //获取个性签名 | |
143 | - HttpManager.getInstance().getsignatures(MainActivity.this,688,handler); | |
144 | - } | |
145 | - | |
146 | 150 | private void initData() { |
151 | + //加载最近学习视频 | |
152 | + List<String> datas = new ArrayList<>(); | |
153 | + datas.add("LiMing"); | |
154 | + datas.add("XiaoMing"); | |
155 | + datas.add("HanMeiMei"); | |
156 | + LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); | |
157 | + linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL); | |
158 | + mRecyclerView.setLayoutManager(linearLayoutManager); | |
159 | + RecyclerViewadapter = new RecyclerViewAdapter(this, datas); | |
160 | + mRecyclerView.setAdapter(RecyclerViewadapter); | |
147 | 161 | //加载个人信息 |
148 | 162 | String xiongzuo = SaveParam.getInstance().getLoginParam(this,SaveParam.CONSTELLATION); |
149 | 163 | if (xiongzuo==null){ |
... | ... | @@ -151,7 +165,19 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
151 | 165 | }else { |
152 | 166 | tv_mygad.setText(xiongzuo); |
153 | 167 | } |
154 | - //HttpManager.getInstance().getpresonalinfo(MainActivity.this,688,handler); | |
168 | + //加载版本信息 | |
169 | + | |
170 | + | |
171 | + //获取个性签名 | |
172 | + String userID = SaveParam.getInstance().getLoginParam(this,"userId"); | |
173 | + try { | |
174 | + long auserID = Long.parseLong(userID); | |
175 | + HttpManager.getInstance().getsignatures(MainActivity.this,auserID,handler); | |
176 | + | |
177 | + } catch (NumberFormatException e) { | |
178 | + e.printStackTrace(); | |
179 | + } | |
180 | + | |
155 | 181 | |
156 | 182 | |
157 | 183 | //初始化图片 |
... | ... | @@ -221,6 +247,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
221 | 247 | switch (position) { |
222 | 248 | case 0: |
223 | 249 | //清除数据 |
250 | + SaveParam.getInstance().clearData(MainActivity.this); | |
224 | 251 | Intent settingintent = new Intent(); |
225 | 252 | settingintent.setClass(MainActivity.this, LoginAndRegisterActivity.class); |
226 | 253 | startActivity(settingintent); |
... | ... | @@ -258,7 +285,14 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
258 | 285 | if (text.equals("")) { |
259 | 286 | AlertUtils.showToast(MainActivity.this, "请输入个性签名"); |
260 | 287 | } else { |
261 | - HttpManager.getInstance().changsignature(MainActivity.this,688,text); | |
288 | + try { | |
289 | + String userID = SaveParam.getInstance().getLoginParam(MainActivity.this,"userId"); | |
290 | + long auserID = Long.parseLong(userID); | |
291 | + HttpManager.getInstance().changsignature(MainActivity.this,auserID,text); | |
292 | + } catch (NumberFormatException e) { | |
293 | + e.printStackTrace(); | |
294 | + } | |
295 | + | |
262 | 296 | tv_sign.setText(text); |
263 | 297 | } |
264 | 298 | |
... | ... | @@ -281,6 +315,22 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe |
281 | 315 | } |
282 | 316 | |
283 | 317 | } |
318 | + | |
319 | + @Override | |
320 | + protected void onResume() { | |
321 | + super.onResume(); | |
322 | + String userID = SaveParam.getInstance().getLoginParam(this,"userId"); | |
323 | + try { | |
324 | + long auserID = Long.parseLong(userID); | |
325 | + //获取个人信息 | |
326 | + HttpManager.getInstance().getpresonalinfo(MainActivity.this,auserID,handler); | |
327 | + | |
328 | + } catch (NumberFormatException e) { | |
329 | + e.printStackTrace(); | |
330 | + } | |
331 | + | |
332 | + } | |
333 | + | |
284 | 334 | //回调头像监听 |
285 | 335 | @Override |
286 | 336 | public void heard(Context context, View v) { | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/TheStartPageActivity.java
... | ... | @@ -42,6 +42,7 @@ public class TheStartPageActivity extends Activity implements View.OnClickListen |
42 | 42 | intent.setClass(TheStartPageActivity.this,MainActivity.class); |
43 | 43 | startActivity(intent); |
44 | 44 | overridePendingTransition(R.anim.rightin, R.anim.rightout); |
45 | + finish(); | |
45 | 46 | break; |
46 | 47 | } |
47 | 48 | } | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/adapter/RecyclerViewAdapter.java
... | ... | @@ -0,0 +1,78 @@ |
1 | +package com.hjx.personalcenter.adapter; | |
2 | + | |
3 | +import android.content.Context; | |
4 | +import android.support.v7.widget.RecyclerView; | |
5 | +import android.view.LayoutInflater; | |
6 | +import android.view.View; | |
7 | +import android.view.ViewGroup; | |
8 | +import android.widget.Button; | |
9 | +import android.widget.TextView; | |
10 | + | |
11 | +import com.hjx.personalcenter.R; | |
12 | + | |
13 | +import java.util.List; | |
14 | + | |
15 | +/** | |
16 | + * Author: zhangmiao | |
17 | + * Date: 2017/6/14 | |
18 | + */ | |
19 | +public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapter.RecyclerHolder> { | |
20 | + | |
21 | + private static final String TAG = RecyclerViewAdapter.class.getSimpleName(); | |
22 | + | |
23 | + private List<String> dataList; | |
24 | + private Context mContext; | |
25 | + private RecyclerView recyclerView; | |
26 | + | |
27 | + public static int position = 0; | |
28 | + | |
29 | + public RecyclerViewAdapter(Context context, List<String> dataList) { | |
30 | + mContext = context; | |
31 | + this.dataList = dataList; | |
32 | + } | |
33 | + | |
34 | + @Override | |
35 | + public RecyclerHolder onCreateViewHolder(ViewGroup parent, int viewType) { | |
36 | + View view = LayoutInflater.from(mContext).inflate(R.layout.recycler_item_view, parent, false); | |
37 | + RecyclerHolder holder = new RecyclerHolder(view); | |
38 | + return holder; | |
39 | + } | |
40 | + | |
41 | + @Override | |
42 | + public void onBindViewHolder(RecyclerHolder holder, final int position) { | |
43 | + holder.textView.setText(dataList.get(position)); | |
44 | + if (position == dataList.size() - 1) { | |
45 | + holder.button.setVisibility(View.GONE); | |
46 | + } | |
47 | + holder.button.setOnClickListener(new View.OnClickListener() { | |
48 | + @Override | |
49 | + public void onClick(View v) { | |
50 | + recyclerView.smoothScrollToPosition(position + 1); | |
51 | + RecyclerViewAdapter.position++; | |
52 | + } | |
53 | + }); | |
54 | + } | |
55 | + | |
56 | + @Override | |
57 | + public void onAttachedToRecyclerView(RecyclerView recyclerView) { | |
58 | + super.onAttachedToRecyclerView(recyclerView); | |
59 | + this.recyclerView = recyclerView; | |
60 | + } | |
61 | + | |
62 | + @Override | |
63 | + public int getItemCount() { | |
64 | + return dataList.size(); | |
65 | + } | |
66 | + | |
67 | + public class RecyclerHolder extends RecyclerView.ViewHolder { | |
68 | + TextView textView; | |
69 | + Button button; | |
70 | + | |
71 | + public RecyclerHolder(View itemView) { | |
72 | + super(itemView); | |
73 | + textView = (TextView) itemView.findViewById(R.id.item_text); | |
74 | + button = (Button) itemView.findViewById(R.id.item_button); | |
75 | + } | |
76 | + } | |
77 | + | |
78 | +} | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/customdialog/ElectronicCardDialog.java
... | ... | @@ -39,11 +39,6 @@ public class ElectronicCardDialog extends BaseCircleDialog { |
39 | 39 | getView().findViewById(R.id.fill_card).setOnClickListener(new View.OnClickListener() { |
40 | 40 | @Override |
41 | 41 | public void onClick(View v) { |
42 | - //有保卡信息直接进入开始界面,没有则跳转保卡信息 | |
43 | -// Intent intent = new Intent(); | |
44 | -// intent.setClass(getActivity(),TheStartPageActivity.class); | |
45 | -// startActivity(intent); | |
46 | -// getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
47 | 42 | Intent intent = new Intent(); |
48 | 43 | intent.setClass(getActivity(),ElectronicCardValidationActivity.class); |
49 | 44 | startActivity(intent); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/db/Content.java
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/LoginFragment.java
... | ... | @@ -2,6 +2,8 @@ package com.hjx.personalcenter.fragment; |
2 | 2 | |
3 | 3 | import android.content.Intent; |
4 | 4 | import android.os.Bundle; |
5 | +import android.os.Handler; | |
6 | +import android.os.Message; | |
5 | 7 | import android.support.annotation.Nullable; |
6 | 8 | import android.support.v4.app.Fragment; |
7 | 9 | import android.text.TextUtils; |
... | ... | @@ -11,14 +13,20 @@ import android.view.ViewGroup; |
11 | 13 | import android.widget.Button; |
12 | 14 | import android.widget.EditText; |
13 | 15 | import android.widget.TextView; |
16 | +import android.widget.Toast; | |
14 | 17 | |
15 | 18 | import com.hjx.personalcenter.R; |
16 | 19 | import com.hjx.personalcenter.activity.ForgotPasswordActivity; |
17 | 20 | import com.hjx.personalcenter.activity.MainActivity; |
21 | +import com.hjx.personalcenter.customdialog.ElectronicCardDialog; | |
22 | +import com.hjx.personalcenter.http.HttpCode; | |
18 | 23 | import com.hjx.personalcenter.http.HttpManager; |
19 | 24 | import com.hjx.personalcenter.util.AlertUtils; |
20 | 25 | import com.hjx.personalcenter.util.PhoneNumCheckUtils; |
21 | 26 | |
27 | +import org.json.JSONException; | |
28 | +import org.json.JSONObject; | |
29 | + | |
22 | 30 | /** |
23 | 31 | * 登录 |
24 | 32 | * Created by h on 2017/8/8. |
... | ... | @@ -40,6 +48,71 @@ public class LoginFragment extends Fragment implements View.OnClickListener { |
40 | 48 | return fragment; |
41 | 49 | |
42 | 50 | } |
51 | + Handler handler = new Handler(){ | |
52 | + @Override | |
53 | + public void handleMessage(Message msg) { | |
54 | + super.handleMessage(msg); | |
55 | + | |
56 | + switch (msg.what){ | |
57 | + case HttpCode.LOGIN_SUCESS: | |
58 | + JSONObject jsonObject; | |
59 | + String status; | |
60 | + try { | |
61 | + jsonObject = new JSONObject((String) msg.obj); | |
62 | + status = jsonObject.getString("status"); | |
63 | + if (status.equals("100")) { | |
64 | + String access_token = jsonObject.getString("access_token"); | |
65 | + String userId = jsonObject.getString("userId"); | |
66 | + final String name = phonenumber.getText().toString().trim(); | |
67 | + final String pwd = login_pwwd.getText().toString().trim(); | |
68 | +// //登录成功,保存登录数据并且获取个人信息 | |
69 | + HttpManager.getInstance().saveLoginInfo(getActivity(), name, pwd, access_token, "true", userId); | |
70 | + try { | |
71 | + long auserID = Long.parseLong(userId); | |
72 | + //是否填写保卡 | |
73 | + HttpManager.getInstance().cardinfocheck(getActivity(),auserID,handler); | |
74 | + } catch (NumberFormatException e) { | |
75 | + e.printStackTrace(); | |
76 | + } | |
77 | + | |
78 | + | |
79 | + } else if (status.equals("200")) { | |
80 | + Toast.makeText(getActivity(), "用户名不存在!", Toast.LENGTH_LONG).show(); | |
81 | + return; | |
82 | + } else if (status.equals("204")) { | |
83 | + Toast.makeText(getActivity(), "密码错误!", Toast.LENGTH_LONG).show(); | |
84 | + } else { | |
85 | + Toast.makeText(getActivity(), "登录失败!请检查网络", Toast.LENGTH_LONG).show(); | |
86 | + | |
87 | + | |
88 | + } | |
89 | + } catch (JSONException e) { | |
90 | + e.printStackTrace(); | |
91 | + } | |
92 | + break; | |
93 | + case HttpCode.CHECKCARD: | |
94 | + try { | |
95 | + jsonObject = new JSONObject( (String) msg.obj); | |
96 | + status = jsonObject.optString("status"); | |
97 | + if (status.equals("1")){ | |
98 | + Intent intent = new Intent(); | |
99 | + intent.setClass(getActivity(), MainActivity.class); | |
100 | + getActivity().startActivity(intent); | |
101 | + getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
102 | + }else if(status.equals("2001")){ | |
103 | + ElectronicCardDialog.getInstance().show(getChildFragmentManager(), "ElectronicCardDialog"); | |
104 | + }else{ | |
105 | + Toast.makeText(getActivity(), "请检查网络", Toast.LENGTH_LONG).show(); | |
106 | + } | |
107 | + | |
108 | + } catch (JSONException e) { | |
109 | + e.printStackTrace(); | |
110 | + } | |
111 | + | |
112 | + break; | |
113 | + } | |
114 | + } | |
115 | + }; | |
43 | 116 | |
44 | 117 | @Override |
45 | 118 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
... | ... | @@ -93,11 +166,8 @@ public class LoginFragment extends Fragment implements View.OnClickListener { |
93 | 166 | }else if (!PhoneNumCheckUtils.isPhone(name)){ |
94 | 167 | AlertUtils.showToast(getActivity(), "请输入正确的手机号"); |
95 | 168 | }else { |
96 | - intent.setClass(getActivity(),MainActivity.class); | |
97 | - startActivity(intent); | |
98 | - getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
99 | 169 | //登录接口 |
100 | - HttpManager.getInstance().login(name,pwd, getActivity()); | |
170 | + HttpManager.getInstance().login(name,pwd, getActivity(),handler); | |
101 | 171 | } |
102 | 172 | |
103 | 173 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/PresonInfoFragment.java
... | ... | @@ -174,57 +174,66 @@ public class PresonInfoFragment extends Fragment implements View.OnClickListener |
174 | 174 | GradeListDialog.getInstance((DialogCallBack.GradeCallBack) PresonInfoFragment.this).show(getChildFragmentManager(), "GradeListDialog"); |
175 | 175 | break; |
176 | 176 | case R.id.presonal_sub: |
177 | + if (TextUtils.isEmpty(presonal1) || | |
178 | + TextUtils.isEmpty(presonal2) || TextUtils.isEmpty(presonal3) || TextUtils.isEmpty(presonal4) || | |
179 | + TextUtils.isEmpty(presonal5) || TextUtils.isEmpty(presonal6) || TextUtils.isEmpty(presonal7) || | |
180 | + TextUtils.isEmpty(presonal8)) { | |
181 | + AlertUtils.showToast(getActivity(), "请将信息填写完整!"); | |
182 | + return; | |
183 | + } else { | |
177 | 184 | |
178 | - int a = 0, b = 0; | |
179 | - long c = 0; | |
180 | - //保存星座 | |
181 | - if (!TextUtils.isEmpty(presonal5)) { | |
185 | + int a = 0, b = 0; | |
186 | + long c = 0; | |
187 | + //保存星座 | |
182 | 188 | BrithdayStar brithdayStar = new BrithdayStar(); |
183 | 189 | String s = brithdayStar.getConstellations(tv_useinfo_birthday.getText().toString()); |
184 | 190 | SaveParam.getInstance().saveLoginParam(getActivity(), SaveParam.CONSTELLATION, s); |
185 | - } | |
186 | - ChangeInfo changeinfo = new ChangeInfo(); | |
187 | - String regionId = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.COUNTRY); | |
188 | - String regionId1 = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.CITYS); | |
189 | - if (regionId == null) { | |
190 | - regionId = regionId1; | |
191 | - } | |
192 | - String grade = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.GRADENS); | |
193 | - String schoolid = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.GRADENS); | |
194 | - ChangeInfo.SchoolBean changeinfo2 = new ChangeInfo.SchoolBean(); | |
195 | - try { | |
196 | - a = Integer.parseInt(regionId); | |
197 | - b = Integer.parseInt(grade); | |
198 | - c = Long.parseLong(schoolid); | |
199 | - } catch (NumberFormatException e) { | |
200 | - e.printStackTrace(); | |
201 | - } | |
202 | - changeinfo.setId("688"); | |
203 | - changeinfo.setNickname(presonal1); | |
204 | - changeinfo.setRegionId(a); | |
205 | - changeinfo.setGradeId(b); | |
206 | - changeinfo2.setSchoolId(c); | |
207 | - if ("男".equals(presonal3)) { | |
208 | - changeinfo.setGender("0"); | |
209 | - } else { | |
210 | - changeinfo.setGender("1"); | |
211 | - } | |
212 | - changeinfo.setBirthday(presonal5); | |
213 | - ChangeInfo.ContactBean changeinfo1 = new ChangeInfo.ContactBean(); | |
214 | - changeinfo1.setQq(presonal8); | |
215 | - changeinfo.setRegionName(presonal4 + presonal2); | |
216 | - changeinfo.setSchool(changeinfo2); | |
217 | - changeinfo.setContact(changeinfo1); | |
218 | - | |
219 | - try { | |
220 | - //提交个人信息 | |
221 | - HttpManager.getInstance().changepresonalinfo(getActivity(), changeinfo); | |
222 | - } catch (UnsupportedEncodingException e) { | |
223 | - e.printStackTrace(); | |
224 | - } | |
225 | - | |
226 | 191 | |
227 | - break; | |
192 | + ChangeInfo changeinfo = new ChangeInfo(); | |
193 | + String regionId = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.COUNTRY); | |
194 | + String regionId1 = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.CITYS); | |
195 | + if (regionId == null) { | |
196 | + regionId = regionId1; | |
197 | + } | |
198 | + String grade = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.GRADENS); | |
199 | + String schoolid = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.GRADENS); | |
200 | + ChangeInfo.SchoolBean changeinfo2 = new ChangeInfo.SchoolBean(); | |
201 | + try { | |
202 | + a = Integer.parseInt(regionId); | |
203 | + b = Integer.parseInt(grade); | |
204 | + c = Long.parseLong(schoolid); | |
205 | + } catch (NumberFormatException e) { | |
206 | + e.printStackTrace(); | |
207 | + } | |
208 | + String userID = SaveParam.getInstance().getLoginParam(getActivity(), "userId"); | |
209 | + | |
210 | + changeinfo.setId(userID); | |
211 | + changeinfo.setNickname(presonal1); | |
212 | + changeinfo.setRegionId(a); | |
213 | + changeinfo.setGradeId(b); | |
214 | + changeinfo2.setSchoolId(c); | |
215 | + if ("男".equals(presonal3)) { | |
216 | + changeinfo.setGender("0"); | |
217 | + } else { | |
218 | + changeinfo.setGender("1"); | |
219 | + } | |
220 | + changeinfo.setBirthday(presonal5); | |
221 | + ChangeInfo.ContactBean changeinfo1 = new ChangeInfo.ContactBean(); | |
222 | + changeinfo1.setQq(presonal8); | |
223 | + changeinfo.setRegionName(presonal4 + presonal2); | |
224 | + changeinfo.setSchool(changeinfo2); | |
225 | + changeinfo.setContact(changeinfo1); | |
226 | + | |
227 | + try { | |
228 | + //提交个人信息 | |
229 | + HttpManager.getInstance().changepresonalinfo(getActivity(), changeinfo); | |
230 | + } catch (UnsupportedEncodingException e) { | |
231 | + e.printStackTrace(); | |
232 | + } | |
233 | + | |
234 | + | |
235 | + break; | |
236 | + } | |
228 | 237 | } |
229 | 238 | } |
230 | 239 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/RegisterFragment.java
... | ... | @@ -73,6 +73,7 @@ public class RegisterFragment extends Fragment implements View.OnClickListener { |
73 | 73 | String passwordStr = password.getText().toString().trim(); |
74 | 74 | HttpManager.getInstance().saveLoginInfo(getActivity(),usernameStr,passwordStr,access_token,"true",userId); |
75 | 75 | AlertUtils.showToast(getActivity(), "注册成功!"); |
76 | + //检查信息是否填写完整 | |
76 | 77 | Intent intent = new Intent(); |
77 | 78 | intent.setClass(getActivity(),RegisterInfoActivity.class); |
78 | 79 | startActivity(intent); |
... | ... | @@ -157,11 +158,7 @@ public class RegisterFragment extends Fragment implements View.OnClickListener { |
157 | 158 | switch (v.getId()){ |
158 | 159 | case R.id.btn_register: |
159 | 160 | //测试 |
160 | - Intent intent = new Intent(); | |
161 | - intent.setClass(getActivity(),RegisterInfoActivity.class); | |
162 | - startActivity(intent); | |
163 | - getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); | |
164 | - getActivity().finish(); | |
161 | +// | |
165 | 162 | |
166 | 163 | String usernameStr = phonenumber.getText().toString().trim(); |
167 | 164 | String authcodeStr = anth_6num.getText().toString().trim(); | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/http/HttpCode.java
... | ... | @@ -6,7 +6,7 @@ package com.hjx.personalcenter.http; |
6 | 6 | |
7 | 7 | public class HttpCode { |
8 | 8 | //查询保卡信息 |
9 | - public static final int SUCHCARDINFO = 1; | |
9 | + public static final int SUCHCARDINFO = 0; | |
10 | 10 | //是否填写保卡信息 |
11 | 11 | public static final int CHECKCARD = 1; |
12 | 12 | //注册 |
... | ... | @@ -37,6 +37,8 @@ public class HttpCode { |
37 | 37 | public static final int GETINFO = 16; |
38 | 38 | //获取个性签名 |
39 | 39 | public static final int SIGN = 17; |
40 | + //登录 | |
41 | + public static final int LOGIN_SUCESS = 18; | |
40 | 42 | |
41 | 43 | |
42 | 44 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/http/HttpManager.java
... | ... | @@ -61,42 +61,18 @@ public class HttpManager { |
61 | 61 | |
62 | 62 | //登录接口 |
63 | 63 | |
64 | - public void login(final String username, final String password, final Context mContext) { | |
64 | + public void login(final String username, final String password, final Context mContext, final Handler handler) { | |
65 | 65 | mProgress = DialogPermission.showProgress(mContext, null, "正在登录...", |
66 | 66 | false, true, null); |
67 | 67 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
68 | 68 | HttpClient.getInstance().get(HttpUrl.loginUrl + "?username=" + username + "&password=" + password, new AsyncHttpResponseHandler() { |
69 | 69 | @Override |
70 | 70 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
71 | - | |
72 | - String str = new String(arg2); | |
73 | - JSONObject jsonObject = null; | |
74 | - try { | |
75 | - jsonObject = new JSONObject(new String(arg2)); | |
76 | - String status = jsonObject.getString("status"); | |
77 | - if (status.equals("100")) { | |
78 | - String access_token = jsonObject.getString("access_token"); | |
79 | - String userId = jsonObject.getString("userId"); | |
80 | -// //登录成功,保存登录数据并且获取个人信息 | |
81 | - saveLoginInfo(mContext, username, password, access_token, "true", userId); | |
82 | - //HttpManager.getInstance().getuserinfo(username,mContext); | |
83 | - | |
84 | - } else if (status.equals("200")) { | |
85 | - closeProgress(); | |
86 | - Toast.makeText(mContext, "用户名不存在!", Toast.LENGTH_LONG).show(); | |
87 | - return; | |
88 | - } else if (status.equals("204")) { | |
89 | - closeProgress(); | |
90 | - Toast.makeText(mContext, "密码错误!", Toast.LENGTH_LONG).show(); | |
91 | - } else { | |
92 | - closeProgress(); | |
93 | - Toast.makeText(mContext, "登录失败!请检查网络", Toast.LENGTH_LONG).show(); | |
94 | - | |
95 | - | |
96 | - } | |
97 | - } catch (JSONException e) { | |
98 | - e.printStackTrace(); | |
99 | - } | |
71 | + closeProgress(); | |
72 | + Message msg = Message.obtain(); | |
73 | + msg.what = HttpCode.LOGIN_SUCESS; | |
74 | + msg.obj = new String(arg2); | |
75 | + handler.sendMessage(msg); | |
100 | 76 | |
101 | 77 | |
102 | 78 | } |
... | ... | @@ -409,7 +385,7 @@ public class HttpManager { |
409 | 385 | } |
410 | 386 | |
411 | 387 | //提交保卡信息 |
412 | - public void subcardinfo(final Context context, int userId, String customerName, String customerAddress, | |
388 | + public void subcardinfo(final Context context, long userId, String customerName, String customerAddress, | |
413 | 389 | String buyAddress, String buyTime, String alterSaleCall, |
414 | 390 | String productModel, String deviceNumber, String macAddress, |
415 | 391 | String mobilePhone) { |
... | ... | @@ -487,7 +463,7 @@ public class HttpManager { |
487 | 463 | |
488 | 464 | } |
489 | 465 | //获取保卡信息 |
490 | - public void getcardinfo(final Context mContext, int userId , final Handler handler) { | |
466 | + public void getcardinfo(final Context mContext, long userId , final Handler handler) { | |
491 | 467 | mProgress = DialogPermission.showProgress(mContext, null, "正在获取保卡信息...", |
492 | 468 | false, true, null); |
493 | 469 | HttpClient.getInstance().setTimeout(5 * 1000); |
... | ... | @@ -533,7 +509,7 @@ public class HttpManager { |
533 | 509 | }); |
534 | 510 | } |
535 | 511 | //修改保卡信息电话 |
536 | - public void changecardinfophone(final Context mContext, int userId, final String customerPhone, String authCode) { | |
512 | + public void changecardinfophone(final Context mContext, long userId, final String customerPhone, String authCode) { | |
537 | 513 | RequestParams params = new RequestParams(); |
538 | 514 | params.put("userId", userId); |
539 | 515 | params.put("customerPhone", customerPhone); |
... | ... | @@ -585,7 +561,7 @@ public class HttpManager { |
585 | 561 | }); |
586 | 562 | } |
587 | 563 | //修改保卡信息地址 |
588 | - public void changecardadressinfo(final Context mContext, int userId, final String customerPhone, String authCode, final String customerAddress) { | |
564 | + public void changecardadressinfo(final Context mContext, long userId, final String customerPhone, String authCode, final String customerAddress) { | |
589 | 565 | RequestParams params = new RequestParams(); |
590 | 566 | params.put("userId", userId); |
591 | 567 | params.put("customerPhone", customerPhone); |
... | ... | @@ -636,12 +612,15 @@ public class HttpManager { |
636 | 612 | }); |
637 | 613 | } |
638 | 614 | //验证是否保卡信息 |
639 | - public void cardinfocheck(final Context mContext, int userId, final Handler handler) { | |
615 | + public void cardinfocheck(final Context mContext, long userId, final Handler handler) { | |
616 | + mProgress = DialogPermission.showProgress(mContext, null, "正在验证保卡信息...", | |
617 | + false, true, null); | |
640 | 618 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
641 | 619 | HttpClient.getInstance().get(HttpUrl.cardcheck+ "?userId=" + userId, new AsyncHttpResponseHandler() { |
642 | 620 | @Override |
643 | 621 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
644 | 622 | Log.e("test", "---" + new String(arg2)); |
623 | + closeProgress(); | |
645 | 624 | Message msg = Message.obtain(); |
646 | 625 | msg.what = HttpCode.CHECKCARD; |
647 | 626 | msg.obj = new String(arg2); |
... | ... | @@ -650,6 +629,7 @@ public class HttpManager { |
650 | 629 | |
651 | 630 | @Override |
652 | 631 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { |
632 | + closeProgress(); | |
653 | 633 | new CircleDialog.Builder((FragmentActivity) mContext) |
654 | 634 | .setCanceledOnTouchOutside(false) |
655 | 635 | .setCancelable(false) |
... | ... | @@ -794,10 +774,11 @@ public class HttpManager { |
794 | 774 | * @param userId |
795 | 775 | * @param handler |
796 | 776 | */ |
797 | - public void getpresonalinfo(final Context mContext, int userId, final Handler handler) { | |
777 | + public void getpresonalinfo(final Context mContext, long userId, final Handler handler) { | |
798 | 778 | mProgress = DialogPermission.showProgress(mContext, null, "正在获取个人信息...", |
799 | 779 | false, true, null); |
800 | 780 | HttpClient.getInstance().addHeader("Accept", "application/json"); |
781 | + HttpClient.getInstance().setConnectTimeout(5*1000); | |
801 | 782 | HttpClient.getInstance().get(HttpUrl.getpresonalinfo+ "?userId=" + userId, new AsyncHttpResponseHandler() { |
802 | 783 | @Override |
803 | 784 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
... | ... | @@ -896,7 +877,7 @@ public class HttpManager { |
896 | 877 | }); |
897 | 878 | } |
898 | 879 | //修改个性签名 |
899 | - public void changsignature(final Context mContext, int userId, final String signature) { | |
880 | + public void changsignature(final Context mContext, long userId, final String signature) { | |
900 | 881 | RequestParams params = new RequestParams(); |
901 | 882 | params.put("userId", userId); |
902 | 883 | params.put("signature", signature); |
... | ... | @@ -949,7 +930,7 @@ public class HttpManager { |
949 | 930 | * @param userId |
950 | 931 | * @param handler |
951 | 932 | */ |
952 | - public void getsignatures(final Context mContext,int userId , final Handler handler) { | |
933 | + public void getsignatures(final Context mContext,long userId , final Handler handler) { | |
953 | 934 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
954 | 935 | HttpClient.getInstance().get(HttpUrl.getsignature+"?userId="+userId, new AsyncHttpResponseHandler() { |
955 | 936 | @Override | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/model/CardInfo.java
... | ... | @@ -77,7 +77,7 @@ public class CardInfo { |
77 | 77 | |
78 | 78 | private String customerName; |
79 | 79 | private String createTime; |
80 | - private String mobilePhone; | |
80 | + private String customerPhone; | |
81 | 81 | private String buyTime; |
82 | 82 | private String productModel; |
83 | 83 | private String buyAddress; |
... | ... | @@ -103,11 +103,11 @@ public class CardInfo { |
103 | 103 | } |
104 | 104 | |
105 | 105 | public String getMobilePhone() { |
106 | - return mobilePhone; | |
106 | + return customerPhone; | |
107 | 107 | } |
108 | 108 | |
109 | 109 | public void setMobilePhone(String mobilePhone) { |
110 | - this.mobilePhone = mobilePhone; | |
110 | + this.customerPhone = mobilePhone; | |
111 | 111 | } |
112 | 112 | |
113 | 113 | public String getBuyTime() { | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/model/SignInfo.java
... | ... | @@ -11,7 +11,7 @@ public class SignInfo implements Serializable{ |
11 | 11 | /** |
12 | 12 | * status : 1 |
13 | 13 | * pageSize : 0 |
14 | - * data : {"userId":645,"signature":"I Love You,WSQ"} | |
14 | + * data : {"userId":222222222243,"signature":"广告广告广告费"} | |
15 | 15 | * msg : success |
16 | 16 | * pageNum : 0 |
17 | 17 | */ |
... | ... | @@ -64,18 +64,18 @@ public class SignInfo implements Serializable{ |
64 | 64 | |
65 | 65 | public static class DataBean { |
66 | 66 | /** |
67 | - * userId : 645 | |
68 | - * signature : I Love You,WSQ | |
67 | + * userId : 222222222243 | |
68 | + * signature : 广告广告广告费 | |
69 | 69 | */ |
70 | 70 | |
71 | - private int userId; | |
71 | + private long userId; | |
72 | 72 | private String signature; |
73 | 73 | |
74 | - public int getUserId() { | |
74 | + public long getUserId() { | |
75 | 75 | return userId; |
76 | 76 | } |
77 | 77 | |
78 | - public void setUserId(int userId) { | |
78 | + public void setUserId(long userId) { | |
79 | 79 | this.userId = userId; |
80 | 80 | } |
81 | 81 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/util/BigPictrueUtil.java
PersonalCenter/app/src/main/res/layout/activity_account_management.xml
... | ... | @@ -66,12 +66,13 @@ |
66 | 66 | android:textSize="22sp" |
67 | 67 | android:text="当前绑定手机号"/> |
68 | 68 | <TextView |
69 | + android:id="@+id/cunt_username" | |
69 | 70 | android:layout_width="0dp" |
70 | 71 | android:layout_height="wrap_content" |
71 | 72 | android:layout_marginLeft="50dp" |
72 | 73 | android:layout_weight="6" |
73 | 74 | android:textSize="22sp" |
74 | - android:text="123556677"/> | |
75 | + android:text=""/> | |
75 | 76 | <TextView |
76 | 77 | android:id="@+id/changBangding" |
77 | 78 | android:layout_width="0dp" | ... | ... |
PersonalCenter/app/src/main/res/layout/activity_electronic_look_cardinfo.xml
... | ... | @@ -87,7 +87,7 @@ |
87 | 87 | android:layout_width="wrap_content" |
88 | 88 | android:layout_height="wrap_content" |
89 | 89 | android:layout_marginLeft="60dp" |
90 | - android:text="王小明" | |
90 | + android:text="" | |
91 | 91 | android:textColor="@color/btn_text_color" |
92 | 92 | android:textSize="22sp" /> |
93 | 93 | |
... | ... | @@ -120,7 +120,7 @@ |
120 | 120 | android:layout_width="wrap_content" |
121 | 121 | android:layout_height="wrap_content" |
122 | 122 | android:layout_marginLeft="50dp" |
123 | - android:text="IPone888" | |
123 | + android:text="" | |
124 | 124 | android:textSize="22sp" /> |
125 | 125 | |
126 | 126 | |
... | ... | @@ -136,6 +136,7 @@ |
136 | 136 | <TextView |
137 | 137 | android:layout_width="wrap_content" |
138 | 138 | android:layout_height="wrap_content" |
139 | + android:textColor="@color/btn_text_color" | |
139 | 140 | android:text="客户地址" |
140 | 141 | android:textSize="22sp" /> |
141 | 142 | |
... | ... | @@ -144,8 +145,7 @@ |
144 | 145 | android:layout_width="wrap_content" |
145 | 146 | android:layout_height="wrap_content" |
146 | 147 | android:layout_marginLeft="60dp" |
147 | - android:background="@null" | |
148 | - android:text="北京市昭阳区三里屯" | |
148 | + android:text="" | |
149 | 149 | android:textSize="22sp" /> |
150 | 150 | <TextView |
151 | 151 | android:id="@+id/tv_card_adress_change" |
... | ... | @@ -180,6 +180,7 @@ |
180 | 180 | <TextView |
181 | 181 | android:layout_width="wrap_content" |
182 | 182 | android:layout_height="wrap_content" |
183 | + android:textColor="@color/btn_text_color" | |
183 | 184 | android:text="MAC地址" |
184 | 185 | android:textSize="22sp" /> |
185 | 186 | |
... | ... | @@ -189,7 +190,7 @@ |
189 | 190 | android:layout_height="wrap_content" |
190 | 191 | android:layout_marginLeft="50dp" |
191 | 192 | android:background="@null" |
192 | - android:text="237462873463278" | |
193 | + android:text="" | |
193 | 194 | android:textSize="22sp" /> |
194 | 195 | |
195 | 196 | </LinearLayout> |
... | ... | @@ -214,7 +215,7 @@ |
214 | 215 | android:layout_height="wrap_content" |
215 | 216 | android:layout_marginLeft="60dp" |
216 | 217 | android:background="@null" |
217 | - android:text="4433322-334--34" | |
218 | + android:text="" | |
218 | 219 | android:textColor="@color/btn_text_color" |
219 | 220 | android:textSize="22sp" /> |
220 | 221 | </LinearLayout> |
... | ... | @@ -246,7 +247,7 @@ |
246 | 247 | android:layout_width="wrap_content" |
247 | 248 | android:layout_height="wrap_content" |
248 | 249 | android:layout_marginLeft="50dp" |
249 | - android:hint="473463746343" | |
250 | + android:hint="" | |
250 | 251 | android:textSize="22sp" /> |
251 | 252 | |
252 | 253 | </LinearLayout> |
... | ... | @@ -259,7 +260,6 @@ |
259 | 260 | android:gravity="center_vertical"> |
260 | 261 | |
261 | 262 | <TextView |
262 | - android:id="@+id/tv_card_shopAdress" | |
263 | 263 | android:layout_width="wrap_content" |
264 | 264 | android:layout_height="wrap_content" |
265 | 265 | android:text="购买地址" |
... | ... | @@ -267,10 +267,11 @@ |
267 | 267 | android:textSize="22sp" /> |
268 | 268 | |
269 | 269 | <TextView |
270 | + android:id="@+id/tv_card_shopAdress" | |
270 | 271 | android:layout_width="wrap_content" |
271 | 272 | android:layout_height="wrap_content" |
272 | 273 | android:layout_marginLeft="60dp" |
273 | - android:text="啥啥啥 专卖店" | |
274 | + android:text="" | |
274 | 275 | android:textColor="@color/btn_text_color" |
275 | 276 | android:textSize="22sp" /> |
276 | 277 | </LinearLayout> |
... | ... | @@ -303,7 +304,7 @@ |
303 | 304 | android:layout_width="wrap_content" |
304 | 305 | android:layout_height="wrap_content" |
305 | 306 | android:layout_marginLeft="50dp" |
306 | - android:text="IPone888" | |
307 | + android:text="" | |
307 | 308 | android:textSize="22sp" /> |
308 | 309 | <TextView |
309 | 310 | android:id="@+id/tv_card_phone_change" |
... | ... | @@ -330,6 +331,7 @@ |
330 | 331 | <TextView |
331 | 332 | android:layout_width="wrap_content" |
332 | 333 | android:layout_height="wrap_content" |
334 | + android:textColor="@color/btn_text_color" | |
333 | 335 | android:text="本地售后电话" |
334 | 336 | android:textSize="22sp" /> |
335 | 337 | |
... | ... | @@ -339,7 +341,7 @@ |
339 | 341 | android:layout_height="wrap_content" |
340 | 342 | android:layout_marginLeft="60dp" |
341 | 343 | android:background="@null" |
342 | - android:text="1111111" | |
344 | + android:text="" | |
343 | 345 | android:textSize="22sp" /> |
344 | 346 | |
345 | 347 | </LinearLayout> | ... | ... |
PersonalCenter/app/src/main/res/layout/activity_electroniccard_info.xml
... | ... | @@ -80,7 +80,6 @@ |
80 | 80 | android:layout_width="wrap_content" |
81 | 81 | android:layout_height="wrap_content" |
82 | 82 | android:text="客户姓名" |
83 | - android:textColor="@color/electronic_text" | |
84 | 83 | android:textSize="22sp" /> |
85 | 84 | |
86 | 85 | <EditText |
... | ... | @@ -105,7 +104,6 @@ |
105 | 104 | android:layout_width="150dp" |
106 | 105 | android:layout_height="wrap_content" |
107 | 106 | android:text="购买地址" |
108 | - android:textColor="@color/electronic_text" | |
109 | 107 | android:textSize="22sp" /> |
110 | 108 | |
111 | 109 | <TextView |
... | ... | @@ -113,7 +111,7 @@ |
113 | 111 | android:layout_width="wrap_content" |
114 | 112 | android:layout_height="wrap_content" |
115 | 113 | android:layout_marginLeft="20dp" |
116 | - android:text="请选择地区" | |
114 | + android:hint="请选择地区" | |
117 | 115 | android:textColor="@color/btn_text_color" |
118 | 116 | android:textSize="22sp" /> |
119 | 117 | |
... | ... | @@ -169,7 +167,6 @@ |
169 | 167 | android:layout_width="wrap_content" |
170 | 168 | android:layout_height="wrap_content" |
171 | 169 | android:text="客户地址" |
172 | - android:textColor="@color/electronic_text" | |
173 | 170 | android:textSize="22sp" /> |
174 | 171 | |
175 | 172 | <TextView |
... | ... | @@ -177,7 +174,7 @@ |
177 | 174 | android:layout_width="wrap_content" |
178 | 175 | android:layout_height="wrap_content" |
179 | 176 | android:layout_marginLeft="50dp" |
180 | - android:text="请选择地区" | |
177 | + android:hint="请选择地区" | |
181 | 178 | android:textSize="22sp" /> |
182 | 179 | |
183 | 180 | <ImageView |
... | ... | @@ -283,7 +280,6 @@ |
283 | 280 | android:layout_width="150dp" |
284 | 281 | android:layout_height="wrap_content" |
285 | 282 | android:text="本地售后电话" |
286 | - android:textColor="@color/electronic_text" | |
287 | 283 | android:textSize="22sp" /> |
288 | 284 | |
289 | 285 | <EditText |
... | ... | @@ -342,7 +338,6 @@ |
342 | 338 | android:layout_width="wrap_content" |
343 | 339 | android:layout_height="wrap_content" |
344 | 340 | android:text="购买时间" |
345 | - android:textColor="@color/pickerview_wheelview_textcolor_center" | |
346 | 341 | android:textSize="22sp" /> |
347 | 342 | |
348 | 343 | <TextView | ... | ... |
PersonalCenter/app/src/main/res/layout/activity_main.xml
... | ... | @@ -350,14 +350,15 @@ |
350 | 350 | android:layout_width="match_parent" |
351 | 351 | android:layout_height="wrap_content"> |
352 | 352 | |
353 | - <TextView | |
354 | - android:id="@+id/list_item_study" | |
353 | + <android.support.v7.widget.RecyclerView | |
354 | + android:id="@+id/id_recyclerview_horizontal" | |
355 | 355 | android:layout_width="match_parent" |
356 | - android:layout_height="100dp" | |
357 | - android:layout_marginLeft="20dp" | |
358 | - android:layout_marginTop="10dp" | |
359 | - android:gravity="center" | |
360 | - android:text="这里需要显示水平滑动的" /> | |
356 | + android:layout_height="wrap_content" | |
357 | + android:layout_centerVertical="true" | |
358 | + android:scrollbars="none" | |
359 | + > | |
360 | + | |
361 | + </android.support.v7.widget.RecyclerView> | |
361 | 362 | </LinearLayout> |
362 | 363 | |
363 | 364 | <View |
... | ... | @@ -434,7 +435,7 @@ |
434 | 435 | android:layout_width="0dp" |
435 | 436 | android:layout_height="wrap_content" |
436 | 437 | android:layout_weight="2" |
437 | - android:text="我的错题" | |
438 | + android:hint="未填写" | |
438 | 439 | android:textSize="20sp" /> |
439 | 440 | |
440 | 441 | <TextView |
... | ... | @@ -449,7 +450,7 @@ |
449 | 450 | android:layout_width="0dp" |
450 | 451 | android:layout_height="wrap_content" |
451 | 452 | android:layout_weight="2" |
452 | - android:text="我的错题" | |
453 | + android:hint="未填写" | |
453 | 454 | android:textSize="20sp" /> |
454 | 455 | </LinearLayout> |
455 | 456 | |
... | ... | @@ -472,7 +473,7 @@ |
472 | 473 | android:layout_width="0dp" |
473 | 474 | android:layout_height="wrap_content" |
474 | 475 | android:layout_weight="2" |
475 | - android:text="男" | |
476 | + android:hint="未填写" | |
476 | 477 | android:textSize="20sp" /> |
477 | 478 | |
478 | 479 | <TextView |
... | ... | @@ -487,7 +488,7 @@ |
487 | 488 | android:layout_width="0dp" |
488 | 489 | android:layout_height="wrap_content" |
489 | 490 | android:layout_weight="2" |
490 | - android:text="我的错题" | |
491 | + android:hint="未填写" | |
491 | 492 | android:textSize="20sp" /> |
492 | 493 | </LinearLayout> |
493 | 494 | |
... | ... | @@ -510,7 +511,7 @@ |
510 | 511 | android:layout_width="0dp" |
511 | 512 | android:layout_height="wrap_content" |
512 | 513 | android:layout_weight="2" |
513 | - android:text="我的错题" | |
514 | + android:hint="未填写" | |
514 | 515 | android:textSize="20sp" /> |
515 | 516 | |
516 | 517 | <TextView |
... | ... | @@ -525,7 +526,7 @@ |
525 | 526 | android:layout_width="0dp" |
526 | 527 | android:layout_height="wrap_content" |
527 | 528 | android:layout_weight="2" |
528 | - android:text="我的错题" | |
529 | + android:hint="未填写" | |
529 | 530 | android:textSize="20sp" /> |
530 | 531 | </LinearLayout> |
531 | 532 | |
... | ... | @@ -548,7 +549,7 @@ |
548 | 549 | android:layout_width="0dp" |
549 | 550 | android:layout_height="wrap_content" |
550 | 551 | android:layout_weight="2" |
551 | - android:text="我的错题" | |
552 | + android:hint="未填写" | |
552 | 553 | android:textSize="20sp" /> |
553 | 554 | |
554 | 555 | <TextView |
... | ... | @@ -563,7 +564,7 @@ |
563 | 564 | android:layout_width="0dp" |
564 | 565 | android:layout_height="wrap_content" |
565 | 566 | android:layout_weight="2" |
566 | - android:text="我的错题" | |
567 | + android:hint="未填写" | |
567 | 568 | android:textSize="20sp" /> |
568 | 569 | </LinearLayout> |
569 | 570 | ... | ... |
PersonalCenter/app/src/main/res/layout/recycler_item_view.xml
... | ... | @@ -0,0 +1,30 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
3 | + android:layout_width="match_parent" | |
4 | + android:layout_height="match_parent" | |
5 | + android:orientation="vertical"> | |
6 | + | |
7 | + <LinearLayout | |
8 | + android:layout_width="wrap_content" | |
9 | + android:layout_height="wrap_content" | |
10 | + android:layout_gravity="center" | |
11 | + android:gravity="center" | |
12 | + android:orientation="vertical"> | |
13 | + | |
14 | + <TextView | |
15 | + android:id="@+id/item_text" | |
16 | + android:layout_width="wrap_content" | |
17 | + android:layout_height="wrap_content" | |
18 | + android:text="test" | |
19 | + android:textColor="@android:color/black" | |
20 | + android:textSize="36sp" /> | |
21 | + | |
22 | + <Button | |
23 | + android:id="@+id/item_button" | |
24 | + android:layout_width="wrap_content" | |
25 | + android:layout_height="wrap_content" | |
26 | + android:layout_marginTop="36dp" | |
27 | + android:text="下一页" | |
28 | + android:textSize="24sp" /> | |
29 | + </LinearLayout> | |
30 | +</LinearLayout> | |
0 | 31 | \ No newline at end of file | ... | ... |