Commit dcad913bbd96964a89d7662af53d198b97f0c575
1 parent
d9f4ba632f
Exists in
master
主界面的整理和完善
Showing
27 changed files
with
1033 additions
and
92 deletions
Show diff stats
PersonalCenter/app/build.gradle
| 1 | apply plugin: 'com.android.application' | 1 | apply plugin: 'com.android.application' |
| 2 | 2 | ||
| 3 | android { | 3 | android { |
| 4 | compileSdkVersion 25 | 4 | compileSdkVersion 25 |
| 5 | buildToolsVersion "25.0.3" | 5 | buildToolsVersion "25.0.3" |
| 6 | defaultConfig { | 6 | defaultConfig { |
| 7 | applicationId "com.hjx.personalcenter" | 7 | applicationId "com.hjx.personalcenter" |
| 8 | minSdkVersion 15 | 8 | minSdkVersion 15 |
| 9 | targetSdkVersion 25 | 9 | targetSdkVersion 25 |
| 10 | versionCode 1 | 10 | versionCode 1 |
| 11 | versionName "1.0" | 11 | versionName "1.0" |
| 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| 13 | } | 13 | } |
| 14 | buildTypes { | 14 | buildTypes { |
| 15 | release { | 15 | release { |
| 16 | minifyEnabled false | 16 | minifyEnabled false |
| 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 18 | } | 18 | } |
| 19 | } | 19 | } |
| 20 | useLibrary 'org.apache.http.legacy' | 20 | useLibrary 'org.apache.http.legacy' |
| 21 | sourceSets { | 21 | sourceSets { |
| 22 | main { | 22 | main { |
| 23 | jniLibs.srcDirs = ['libs'] | 23 | jniLibs.srcDirs = ['libs'] |
| 24 | } | 24 | } |
| 25 | } | 25 | } |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | dependencies { | 28 | dependencies { |
| 29 | compile fileTree(include: ['*.jar'], dir: 'libs') | 29 | compile fileTree(include: ['*.jar'], dir: 'libs') |
| 30 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { | 30 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { |
| 31 | exclude group: 'com.android.support', module: 'support-annotations' | 31 | exclude group: 'com.android.support', module: 'support-annotations' |
| 32 | }) | 32 | }) |
| 33 | compile 'com.tencent.bugly:crashreport:latest.release' | 33 | compile 'com.tencent.bugly:crashreport:latest.release' |
| 34 | compile 'org.apache.httpcomponents:httpcore:4.4.1' | 34 | compile 'org.apache.httpcomponents:httpcore:4.4.1' |
| 35 | compile 'org.apache.httpcomponents:httpclient:4.5' | 35 | compile 'org.apache.httpcomponents:httpclient:4.5' |
| 36 | compile 'com.android.support:appcompat-v7:25.3.1' | 36 | compile 'com.android.support:appcompat-v7:25.3.1' |
| 37 | testCompile 'junit:junit:4.12' | 37 | testCompile 'junit:junit:4.12' |
| 38 | compile project(':circledialog') | 38 | compile project(':circledialog') |
| 39 | compile project(':pickerview') | 39 | compile project(':pickerview') |
| 40 | compile files('libs/android-async-http-1.4.8.jar') | 40 | compile files('libs/android-async-http-1.4.8.jar') |
| 41 | compile 'com.google.code.gson:gson:2.7' | 41 | compile 'com.google.code.gson:gson:2.7' |
| 42 | compile 'com.zaaach:toprightmenu:1.0' | ||
| 43 | |||
| 42 | } | 44 | } |
| 43 | 45 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/AccountManagementActivity.java
| 1 | package com.hjx.personalcenter.activity; | 1 | package com.hjx.personalcenter.activity; |
| 2 | 2 | ||
| 3 | import android.app.Activity; | 3 | import android.app.Activity; |
| 4 | import android.content.Intent; | ||
| 4 | import android.os.Bundle; | 5 | import android.os.Bundle; |
| 6 | import android.view.View; | ||
| 7 | import android.widget.TextView; | ||
| 5 | 8 | ||
| 6 | import com.hjx.personalcenter.R; | 9 | import com.hjx.personalcenter.R; |
| 10 | import com.hjx.personalcenter.db.Content; | ||
| 7 | 11 | ||
| 8 | /**账户管理 熊巍 | 12 | /**账户管理 熊巍 |
| 9 | * Created by h on 2017/8/12. | 13 | * Created by h on 2017/8/12. |
| 10 | */ | 14 | */ |
| 11 | 15 | ||
| 12 | public class AccountManagementActivity extends Activity { | 16 | public class AccountManagementActivity extends Activity implements View.OnClickListener { |
| 17 | private TextView changbangding,changpassword; | ||
| 13 | @Override | 18 | @Override |
| 14 | protected void onCreate(Bundle savedInstanceState) { | 19 | protected void onCreate(Bundle savedInstanceState) { |
| 15 | super.onCreate(savedInstanceState); | 20 | super.onCreate(savedInstanceState); |
| 16 | setContentView(R.layout.activity_account_management); | 21 | setContentView(R.layout.activity_account_management); |
| 22 | initView(); | ||
| 23 | initData(); | ||
| 24 | initLister(); | ||
| 25 | } | ||
| 26 | |||
| 27 | private void initView() { | ||
| 28 | changbangding = (TextView) findViewById(R.id.changBangding); | ||
| 29 | changpassword = (TextView) findViewById(R.id.changpassword); | ||
| 30 | } | ||
| 31 | |||
| 32 | private void initData() { | ||
| 33 | |||
| 34 | } | ||
| 35 | |||
| 36 | private void initLister() { | ||
| 37 | changbangding.setOnClickListener(this); | ||
| 38 | changpassword.setOnClickListener(this); | ||
| 39 | |||
| 40 | |||
| 41 | } | ||
| 42 | |||
| 43 | @Override | ||
| 44 | public void onClick(View v) { | ||
| 45 | switch (v.getId()){ | ||
| 46 | case R.id.changBangding: | ||
| 47 | Intent changebangding = new Intent(); | ||
| 48 | changebangding.setClass(AccountManagementActivity.this,ChangeBangDingActivity.class); | ||
| 49 | startActivity(changebangding); | ||
| 50 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | ||
| 51 | break; | ||
| 52 | case R.id.changpassword: | ||
| 53 | Content.authcodeflag = 1; | ||
| 54 | Intent changpwd = new Intent(); | ||
| 55 | changpwd.setClass(AccountManagementActivity.this,ChangePasswordActivity.class); | ||
| 56 | startActivity(changpwd); | ||
| 57 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | ||
| 58 | break; | ||
| 59 | } | ||
| 60 | |||
| 17 | } | 61 | } |
| 18 | } | 62 | } |
| 19 | 63 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ChangeElectronicCardAdressInfoActivity.java
| 1 | package com.hjx.personalcenter.activity; | 1 | package com.hjx.personalcenter.activity; |
| 2 | 2 | ||
| 3 | import android.app.Activity; | 3 | import android.app.Activity; |
| 4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 5 | import android.os.Handler; | ||
| 6 | import android.os.Message; | ||
| 7 | import android.text.TextUtils; | ||
| 8 | import android.view.View; | ||
| 9 | import android.widget.Button; | ||
| 10 | import android.widget.EditText; | ||
| 11 | import android.widget.ImageView; | ||
| 5 | 12 | ||
| 6 | import com.hjx.personalcenter.R; | 13 | import com.hjx.personalcenter.R; |
| 14 | import com.hjx.personalcenter.http.HttpCode; | ||
| 15 | import com.hjx.personalcenter.http.HttpManager; | ||
| 16 | import com.hjx.personalcenter.util.AlertUtils; | ||
| 17 | import com.hjx.personalcenter.util.Judgment; | ||
| 18 | import com.hjx.personalcenter.util.PhoneNumCheckUtils; | ||
| 19 | |||
| 20 | import org.json.JSONObject; | ||
| 7 | 21 | ||
| 8 | /** | 22 | /** |
| 9 | * Created by h on 2017/8/9. | 23 | * Created by h on 2017/8/9. |
| 10 | */ | 24 | */ |
| 11 | 25 | ||
| 12 | public class ChangeElectronicCardAdressInfoActivity extends Activity{ | 26 | public class ChangeElectronicCardAdressInfoActivity extends Activity implements View.OnClickListener{ |
| 27 | private ImageView back_forgit; | ||
| 28 | private EditText forot_pwd_phone,forot_pwd_anthcode,adress,newadress; | ||
| 29 | private Button forot_pwd_sub,forot_pwd_getanthcode; | ||
| 30 | private String typeStr = "register"; | ||
| 31 | private int i = 0; | ||
| 32 | private Thread thread; | ||
| 33 | Handler handler = new Handler() { | ||
| 34 | @Override | ||
| 35 | public void handleMessage(Message msg) { | ||
| 36 | super.handleMessage(msg); | ||
| 37 | JSONObject jsonObject; | ||
| 38 | String status; | ||
| 39 | switch (msg.what) { | ||
| 40 | case HttpCode.AUTHCODE_SUCESS1: | ||
| 41 | jsonObject = (JSONObject) msg.obj; | ||
| 42 | status = jsonObject.optString("status"); | ||
| 43 | if (status.equals("100")) { | ||
| 44 | AlertUtils.showToast(ChangeElectronicCardAdressInfoActivity.this, "验证码发送成功"); | ||
| 45 | } | ||
| 46 | //AlertUtils.showToast(ForgotPassword.this, jsonObject.optString("message")); | ||
| 47 | break; | ||
| 48 | case HttpCode.AUTHCODE_FAIL1: | ||
| 49 | jsonObject = (JSONObject) msg.obj; | ||
| 50 | AlertUtils.showToast(ChangeElectronicCardAdressInfoActivity.this, jsonObject.optString("验证码发送失败,请检查网络")); | ||
| 51 | break; | ||
| 52 | case 1: | ||
| 53 | forot_pwd_getanthcode.setEnabled(false); | ||
| 54 | forot_pwd_getanthcode.setClickable(false); | ||
| 55 | forot_pwd_getanthcode.setText(Integer.toString(i--)+" s"); | ||
| 56 | if (i<=0){ | ||
| 57 | forot_pwd_getanthcode.setEnabled(true); | ||
| 58 | forot_pwd_getanthcode.setClickable(true); | ||
| 59 | forot_pwd_getanthcode.setText("获取验证码"); | ||
| 60 | |||
| 61 | } | ||
| 62 | break; | ||
| 63 | } | ||
| 64 | } | ||
| 65 | }; | ||
| 13 | @Override | 66 | @Override |
| 14 | protected void onCreate(Bundle savedInstanceState) { | 67 | protected void onCreate(Bundle savedInstanceState) { |
| 15 | super.onCreate(savedInstanceState); | 68 | super.onCreate(savedInstanceState); |
| 16 | setContentView(R.layout.activity_change_card_validation); | 69 | setContentView(R.layout.activity_change_card_validation); |
| 70 | initView(); | ||
| 71 | setLister(); | ||
| 72 | } | ||
| 73 | //获取验证码 | ||
| 74 | private void getauthcode() { | ||
| 75 | forot_pwd_anthcode.requestFocus(); | ||
| 76 | String forot_pwd_phone1 = forot_pwd_phone.getText().toString().trim(); | ||
| 77 | HttpManager.getInstance().authCode(typeStr, forot_pwd_phone1, handler, this); | ||
| 78 | i = 60; | ||
| 79 | if(thread == null){ | ||
| 80 | thread = new Thread( new ThreadShow()); | ||
| 81 | thread.start(); | ||
| 82 | } | ||
| 83 | |||
| 84 | } | ||
| 85 | private void initView() { | ||
| 86 | forot_pwd_phone = (EditText) findViewById(R.id.et_phonenumber); | ||
| 87 | forot_pwd_anthcode = (EditText) findViewById(R.id.et_authcode); | ||
| 88 | adress = (EditText) findViewById(R.id.et_newpassword); | ||
| 89 | newadress = (EditText) findViewById(R.id.et_again_newpassword); | ||
| 90 | forot_pwd_sub = (Button) findViewById(R.id.btn_ok); | ||
| 91 | forot_pwd_getanthcode = (Button) findViewById(R.id.btn_authcode); | ||
| 92 | back_forgit= (ImageView) findViewById(R.id.cancel); | ||
| 17 | } | 93 | } |
| 94 | private void setLister() { | ||
| 95 | back_forgit.setOnClickListener(this); | ||
| 96 | forot_pwd_sub.setOnClickListener(this); | ||
| 97 | forot_pwd_getanthcode.setOnClickListener(this); | ||
| 98 | |||
| 99 | } | ||
| 100 | |||
| 101 | @Override | ||
| 102 | public void onClick(View view) { | ||
| 103 | switch (view.getId()){ | ||
| 104 | case R.id.btn_ok: | ||
| 105 | String forot_pwd_phone1 = forot_pwd_phone.getText().toString().trim(); | ||
| 106 | String forot_pwd_anthcode1 = forot_pwd_anthcode.getText().toString().trim(); | ||
| 107 | String forot_pwd_pwd3 = adress.getText().toString().trim(); | ||
| 108 | String forot_pwd_pwd4 = newadress.getText().toString().trim(); | ||
| 109 | if (TextUtils.isEmpty(forot_pwd_phone1)|| | ||
| 110 | TextUtils.isEmpty(forot_pwd_pwd3) || TextUtils.isEmpty(forot_pwd_pwd4)){ | ||
| 111 | AlertUtils.showToast(ChangeElectronicCardAdressInfoActivity.this, "请将必填项填写完整"); | ||
| 112 | return; | ||
| 113 | }else if (Judgment.getInstance().isPhoneNum(forot_pwd_phone1)){ | ||
| 114 | AlertUtils.showToast(ChangeElectronicCardAdressInfoActivity.this, "手机号码输入有误"); | ||
| 115 | |||
| 116 | } else { | ||
| 117 | //修改地址接口 | ||
| 118 | HttpManager.getInstance().changecardadressinfo(this,111,forot_pwd_phone1,forot_pwd_anthcode1,forot_pwd_pwd3+forot_pwd_pwd4); | ||
| 119 | } | ||
| 120 | break; | ||
| 121 | case R.id.btn_authcode: | ||
| 122 | forot_pwd_phone1 = forot_pwd_phone.getText().toString().trim(); | ||
| 123 | if (!PhoneNumCheckUtils.isPhone(forot_pwd_phone1)){ | ||
| 124 | AlertUtils.showToast(ChangeElectronicCardAdressInfoActivity.this, "请输入正确的手机号"); | ||
| 125 | }else { | ||
| 126 | forot_pwd_anthcode.requestFocus(); | ||
| 127 | getauthcode(); | ||
| 128 | |||
| 129 | } | ||
| 130 | |||
| 131 | break; | ||
| 132 | |||
| 133 | case R.id.cancel: | ||
| 134 | finish(); | ||
| 135 | break; | ||
| 136 | } | ||
| 137 | } | ||
| 138 | // 线程类 定时器 | ||
| 139 | class ThreadShow implements Runnable { | ||
| 140 | |||
| 141 | @Override | ||
| 142 | public void run() { | ||
| 143 | // TODO Auto-generated method stub | ||
| 144 | while (true) { | ||
| 145 | try { | ||
| 146 | Thread.sleep(1000); | ||
| 147 | Message msg = new Message(); | ||
| 148 | msg.what = 1; | ||
| 149 | handler.sendMessage(msg); | ||
| 150 | System.out.println("send..."); | ||
| 151 | } catch (Exception e) { | ||
| 152 | // TODO Auto-generated catch block | ||
| 153 | e.printStackTrace(); | ||
| 154 | System.out.println("thread error..."); | ||
| 155 | } | ||
| 156 | } | ||
| 157 | } | ||
| 158 | } | ||
| 159 | |||
| 18 | } | 160 | } |
| 19 | 161 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ChangePasswordActivity.java
| 1 | package com.hjx.personalcenter.activity; | 1 | package com.hjx.personalcenter.activity; |
| 2 | 2 | ||
| 3 | import android.app.Activity; | 3 | import android.app.Activity; |
| 4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 5 | import android.text.TextUtils; | 5 | import android.text.TextUtils; |
| 6 | import android.text.method.HideReturnsTransformationMethod; | 6 | import android.text.method.HideReturnsTransformationMethod; |
| 7 | import android.text.method.PasswordTransformationMethod; | 7 | import android.text.method.PasswordTransformationMethod; |
| 8 | import android.view.View; | 8 | import android.view.View; |
| 9 | import android.widget.Button; | 9 | import android.widget.Button; |
| 10 | import android.widget.EditText; | 10 | import android.widget.EditText; |
| 11 | import android.widget.ImageView; | 11 | import android.widget.ImageView; |
| 12 | 12 | ||
| 13 | import com.hjx.personalcenter.R; | 13 | import com.hjx.personalcenter.R; |
| 14 | import com.hjx.personalcenter.http.HttpManager; | 14 | import com.hjx.personalcenter.http.HttpManager; |
| 15 | import com.hjx.personalcenter.util.AlertUtils; | 15 | import com.hjx.personalcenter.util.AlertUtils; |
| 16 | import com.hjx.personalcenter.util.PasswordCheckUtils; | 16 | import com.hjx.personalcenter.util.PasswordCheckUtils; |
| 17 | import com.hjx.personalcenter.db.SaveParam; | 17 | import com.hjx.personalcenter.db.SaveParam; |
| 18 | 18 | ||
| 19 | /**修改密码 | 19 | /**修改密码 |
| 20 | * Created by h on 2017/6/27. | 20 | * Created by h on 2017/6/27. |
| 21 | */ | 21 | */ |
| 22 | 22 | ||
| 23 | public class ChangePasswordActivity extends Activity implements View.OnClickListener { | 23 | public class ChangePasswordActivity extends Activity implements View.OnClickListener { |
| 24 | private EditText old_pwd,newpassword,newpassword1; | 24 | private EditText old_pwd,newpassword,newpassword1; |
| 25 | private Button sub_change_pwd; | 25 | private Button sub_change_pwd; |
| 26 | private ImageView back_change_pwd,eyes_iv_change1,eyes_iv_change2; | 26 | private ImageView back_change_pwd,eyes_iv_change1; |
| 27 | public static Boolean showPassword = false; | 27 | public static Boolean showPassword = false; |
| 28 | @Override | 28 | @Override |
| 29 | protected void onCreate(Bundle savedInstanceState) { | 29 | protected void onCreate(Bundle savedInstanceState) { |
| 30 | super.onCreate(savedInstanceState); | 30 | super.onCreate(savedInstanceState); |
| 31 | setContentView(R.layout.activity_changepsword); | 31 | setContentView(R.layout.activity_changepsword); |
| 32 | initView(); | 32 | initView(); |
| 33 | setLister(); | 33 | setLister(); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | private void initView() { | 36 | private void initView() { |
| 37 | old_pwd = (EditText) findViewById(R.id.et_oldpassword); | 37 | old_pwd = (EditText) findViewById(R.id.et_oldpassword); |
| 38 | newpassword = (EditText) findViewById(R.id.et_newpassword); | 38 | newpassword = (EditText) findViewById(R.id.et_newpassword); |
| 39 | newpassword1 = (EditText) findViewById(R.id.et_again_newpassword); | 39 | newpassword1 = (EditText) findViewById(R.id.et_again_newpassword); |
| 40 | sub_change_pwd = (Button) findViewById(R.id.btn_ok); | 40 | sub_change_pwd = (Button) findViewById(R.id.btn_ok); |
| 41 | back_change_pwd = (ImageView) findViewById(R.id.cancel); | 41 | back_change_pwd = (ImageView) findViewById(R.id.cancel); |
| 42 | eyes_iv_change1 = (ImageView) findViewById(R.id.iv_pwd_change); | 42 | eyes_iv_change1 = (ImageView) findViewById(R.id.iv_pwd_change); |
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | private void setLister() { | 47 | private void setLister() { |
| 48 | sub_change_pwd.setOnClickListener(this); | 48 | sub_change_pwd.setOnClickListener(this); |
| 49 | back_change_pwd.setOnClickListener(this); | 49 | back_change_pwd.setOnClickListener(this); |
| 50 | eyes_iv_change1.setOnClickListener(this); | 50 | eyes_iv_change1.setOnClickListener(this); |
| 51 | eyes_iv_change2.setOnClickListener(this); | ||
| 52 | } | 51 | } |
| 53 | 52 | ||
| 54 | @Override | 53 | @Override |
| 55 | public void onClick(View v) { | 54 | public void onClick(View v) { |
| 56 | String old_pwd1 = old_pwd.getText().toString().trim(); | 55 | String old_pwd1 = old_pwd.getText().toString().trim(); |
| 57 | String newpassword3 = newpassword.getText().toString().trim(); | 56 | String newpassword3 = newpassword.getText().toString().trim(); |
| 58 | String newpassword4 = newpassword1.getText().toString().trim(); | 57 | String newpassword4 = newpassword1.getText().toString().trim(); |
| 59 | switch (v.getId()){ | 58 | switch (v.getId()){ |
| 60 | //确认修改 | 59 | //确认修改 |
| 61 | case R.id.btn_ok: | 60 | case R.id.btn_ok: |
| 62 | 61 | ||
| 63 | //Log.e("test","sp保存的密码是"+sp.getLoginParam(ChangePwd.this, "password")); | 62 | //Log.e("test","sp保存的密码是"+sp.getLoginParam(ChangePwd.this, "password")); |
| 64 | if (TextUtils.isEmpty(old_pwd1)|| | 63 | if (TextUtils.isEmpty(old_pwd1)|| |
| 65 | TextUtils.isEmpty(newpassword3) || TextUtils.isEmpty(newpassword4)){ | 64 | TextUtils.isEmpty(newpassword3) || TextUtils.isEmpty(newpassword4)){ |
| 66 | AlertUtils.showToast(ChangePasswordActivity.this, "请将必填项填写完整"); | 65 | AlertUtils.showToast(ChangePasswordActivity.this, "请将必填项填写完整"); |
| 67 | return; | 66 | return; |
| 68 | }else if(newpassword3.length()<8||newpassword4.length()<8){ | 67 | }else if(newpassword3.length()<8||newpassword4.length()<8){ |
| 69 | AlertUtils.showToast(ChangePasswordActivity.this,"密码不能少于8位"); | 68 | AlertUtils.showToast(ChangePasswordActivity.this,"密码不能少于8位"); |
| 70 | }else if(!newpassword3.matches(PasswordCheckUtils.PASSWORD_CHAR_AND_NUMBER)||!newpassword4.matches(PasswordCheckUtils.PASSWORD_CHAR_AND_NUMBER)){ | 69 | }else if(!newpassword3.matches(PasswordCheckUtils.PASSWORD_CHAR_AND_NUMBER)||!newpassword4.matches(PasswordCheckUtils.PASSWORD_CHAR_AND_NUMBER)){ |
| 71 | AlertUtils.showToast(ChangePasswordActivity.this, "密码必须由数字和字母组成"); | 70 | AlertUtils.showToast(ChangePasswordActivity.this, "密码必须由数字和字母组成"); |
| 72 | } | 71 | } |
| 73 | //得到原密码并且判断是否输入的一样 | 72 | //得到原密码并且判断是否输入的一样 |
| 74 | else if(!SaveParam.getInstance().getLoginParam(ChangePasswordActivity.this,"password").equals(old_pwd1)){ | 73 | else if(!SaveParam.getInstance().getLoginParam(ChangePasswordActivity.this,"password").equals(old_pwd1)){ |
| 75 | 74 | ||
| 76 | AlertUtils.showToast(ChangePasswordActivity.this, "原密码输入错误"); | 75 | AlertUtils.showToast(ChangePasswordActivity.this, "原密码输入错误"); |
| 77 | 76 | ||
| 78 | }else if (!newpassword3.equals(newpassword4)){ | 77 | }else if (!newpassword3.equals(newpassword4)){ |
| 79 | AlertUtils.showToast(ChangePasswordActivity.this, "两次密码输入不一致"); | 78 | AlertUtils.showToast(ChangePasswordActivity.this, "两次密码输入不一致"); |
| 80 | return; | 79 | return; |
| 81 | }else{ | 80 | }else{ |
| 82 | //修改密码接口 | 81 | //修改密码接口 |
| 83 | String name = SaveParam.getInstance().getLoginParam(ChangePasswordActivity.this,"username"); | 82 | String name = SaveParam.getInstance().getLoginParam(ChangePasswordActivity.this,"username"); |
| 84 | HttpManager.getInstance().changepwd(this,name,old_pwd1,newpassword3); | 83 | HttpManager.getInstance().changepwd(this,name,old_pwd1,newpassword3); |
| 85 | } | 84 | } |
| 86 | 85 | ||
| 87 | break; | 86 | break; |
| 88 | case R.id.iv_pwd_change: | 87 | case R.id.iv_pwd_change: |
| 89 | if(showPassword){//显示密码 | 88 | if(showPassword){//显示密码 |
| 90 | showPassword = !showPassword; | 89 | showPassword = !showPassword; |
| 91 | eyes_iv_change1.setImageResource(R.mipmap.pwd_open); | 90 | eyes_iv_change1.setImageResource(R.mipmap.pwd_open); |
| 92 | newpassword.setTransformationMethod(HideReturnsTransformationMethod.getInstance()); | 91 | newpassword.setTransformationMethod(HideReturnsTransformationMethod.getInstance()); |
| 93 | newpassword.setSelection(newpassword.getText().toString().length()); | 92 | newpassword.setSelection(newpassword.getText().toString().length()); |
| 94 | }else{//隐藏密码 | 93 | }else{//隐藏密码 |
| 95 | showPassword = !showPassword; | 94 | showPassword = !showPassword; |
| 96 | eyes_iv_change1.setImageResource(R.mipmap.pwd_hide); | 95 | eyes_iv_change1.setImageResource(R.mipmap.pwd_hide); |
| 97 | newpassword.setTransformationMethod(PasswordTransformationMethod.getInstance()); | 96 | newpassword.setTransformationMethod(PasswordTransformationMethod.getInstance()); |
| 98 | newpassword.setSelection(newpassword.getText().toString().length()); | 97 | newpassword.setSelection(newpassword.getText().toString().length()); |
| 99 | } | 98 | } |
| 100 | break; | 99 | break; |
| 101 | 100 | ||
| 102 | case R.id.cancel: | 101 | case R.id.cancel: |
| 103 | finish(); | 102 | finish(); |
| 104 | break; | 103 | break; |
| 105 | } | 104 | } |
| 106 | 105 | ||
| 107 | } | 106 | } |
| 108 | } | 107 | } |
| 109 | 108 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ElectronicCardLookInfoActivity.java
| 1 | package com.hjx.personalcenter.activity; | 1 | package com.hjx.personalcenter.activity; |
| 2 | 2 | ||
| 3 | import android.content.Intent; | 3 | import android.content.Intent; |
| 4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 5 | import android.os.Handler; | 5 | import android.os.Handler; |
| 6 | import android.os.Message; | 6 | import android.os.Message; |
| 7 | import android.support.v7.app.AppCompatActivity; | 7 | import android.support.v7.app.AppCompatActivity; |
| 8 | import android.view.View; | 8 | import android.view.View; |
| 9 | import android.widget.ImageView; | 9 | import android.widget.ImageView; |
| 10 | import android.widget.TextView; | 10 | import android.widget.TextView; |
| 11 | 11 | ||
| 12 | import com.hjx.personalcenter.R; | 12 | import com.hjx.personalcenter.R; |
| 13 | import com.hjx.personalcenter.db.Content; | 13 | import com.hjx.personalcenter.db.Content; |
| 14 | import com.hjx.personalcenter.db.SaveParam; | 14 | import com.hjx.personalcenter.db.SaveParam; |
| 15 | import com.hjx.personalcenter.http.HttpCode; | 15 | import com.hjx.personalcenter.http.HttpCode; |
| 16 | import com.hjx.personalcenter.http.HttpManager; | 16 | import com.hjx.personalcenter.http.HttpManager; |
| 17 | import com.hjx.personalcenter.model.CardInfo; | ||
| 17 | import com.hjx.personalcenter.util.AlertUtils; | 18 | import com.hjx.personalcenter.util.AlertUtils; |
| 18 | import com.hjx.personalcenter.util.GetDevicesUtil; | 19 | import com.hjx.personalcenter.util.GetDevicesUtil; |
| 19 | 20 | ||
| 20 | import org.json.JSONException; | 21 | import org.json.JSONException; |
| 21 | import org.json.JSONObject; | 22 | import org.json.JSONObject; |
| 22 | 23 | ||
| 23 | /** | 24 | /** |
| 24 | * Created by h on 2017/8/11. | 25 | * Created by h on 2017/8/11. |
| 25 | */ | 26 | */ |
| 26 | 27 | ||
| 27 | public class ElectronicCardLookInfoActivity extends AppCompatActivity implements View.OnClickListener{ | 28 | public class ElectronicCardLookInfoActivity extends AppCompatActivity implements View.OnClickListener{ |
| 28 | private ImageView iv_last_step; | 29 | private ImageView iv_last_step; |
| 29 | private TextView usename,deviceModel,customer_address,mac_adress,shoptime,deviceNumber, | 30 | private TextView usename,deviceModel,customer_address,mac_adress,shoptime,deviceNumber, |
| 30 | shopadress,phone,tlePhone,tv_card_adress_change,tv_card_phone_change; | 31 | shopadress,phone,tlePhone,tv_card_adress_change,tv_card_phone_change; |
| 31 | 32 | ||
| 32 | Handler handler = new Handler(){ | 33 | Handler handler = new Handler(){ |
| 33 | @Override | 34 | @Override |
| 34 | public void handleMessage(Message msg) { | 35 | public void handleMessage(Message msg) { |
| 35 | super.handleMessage(msg); | 36 | super.handleMessage(msg); |
| 36 | JSONObject jsonObject; | 37 | JSONObject jsonObject; |
| 37 | String status; | 38 | String status; |
| 38 | switch (msg.what){ | 39 | switch (msg.what){ |
| 40 | |||
| 39 | case HttpCode.SUCHCARDINFO: | 41 | case HttpCode.SUCHCARDINFO: |
| 42 | CardInfo cardInfo = new CardInfo(); | ||
| 40 | try { | 43 | try { |
| 41 | jsonObject = new JSONObject( (String) msg.obj); | 44 | jsonObject = new JSONObject( (String) msg.obj); |
| 42 | status = jsonObject.optString("status"); | 45 | status = jsonObject.optString("status"); |
| 43 | if (status.equals("1")){ | 46 | if (status.equals("1")){ |
| 44 | AlertUtils.showToast(ElectronicCardLookInfoActivity.this,"显示电子保卡信息"); | 47 | AlertUtils.showToast(ElectronicCardLookInfoActivity.this,"显示电子保卡信息"); |
| 48 | cardInfo.setCustomerName(jsonObject.optString("customerName")); | ||
| 49 | |||
| 45 | }else { | 50 | }else { |
| 46 | AlertUtils.showToast(ElectronicCardLookInfoActivity.this,"保卡信息查询失败"); | 51 | AlertUtils.showToast(ElectronicCardLookInfoActivity.this,"保卡信息查询失败"); |
| 47 | } | 52 | } |
| 48 | 53 | ||
| 49 | } catch (JSONException e) { | 54 | } catch (JSONException e) { |
| 50 | e.printStackTrace(); | 55 | e.printStackTrace(); |
| 51 | } | 56 | } |
| 52 | 57 | ||
| 53 | break; | 58 | break; |
| 54 | 59 | ||
| 55 | } | 60 | } |
| 56 | 61 | ||
| 57 | } | 62 | } |
| 58 | }; | 63 | }; |
| 59 | 64 | ||
| 60 | @Override | 65 | @Override |
| 61 | protected void onCreate(Bundle savedInstanceState) { | 66 | protected void onCreate(Bundle savedInstanceState) { |
| 62 | super.onCreate(savedInstanceState); | 67 | super.onCreate(savedInstanceState); |
| 63 | setContentView(R.layout.activity_electronic_look_cardinfo); | 68 | setContentView(R.layout.activity_electronic_look_cardinfo); |
| 64 | initView(); | 69 | initView(); |
| 65 | initData(); | 70 | initData(); |
| 66 | initLister(); | 71 | initLister(); |
| 67 | } | 72 | } |
| 68 | private void initView() { | 73 | private void initView() { |
| 69 | usename = (TextView) findViewById(R.id.iv_card_username); | 74 | usename = (TextView) findViewById(R.id.iv_card_username); |
| 70 | iv_last_step = (ImageView) findViewById(R.id.cancel); | 75 | iv_last_step = (ImageView) findViewById(R.id.cancel); |
| 71 | deviceModel = (TextView) findViewById(R.id.tv_card_deviceModel); | 76 | deviceModel = (TextView) findViewById(R.id.tv_card_deviceModel); |
| 72 | customer_address = (TextView) findViewById(R.id.tv_card_adress); | 77 | customer_address = (TextView) findViewById(R.id.tv_card_adress); |
| 73 | mac_adress = (TextView) findViewById(R.id.tv_card_mac); | 78 | mac_adress = (TextView) findViewById(R.id.tv_card_mac); |
| 74 | shoptime = (TextView) findViewById(R.id.tv_card_time); | 79 | shoptime = (TextView) findViewById(R.id.tv_card_time); |
| 75 | deviceNumber = (TextView) findViewById(R.id.tv_card_deviceNumber); | 80 | deviceNumber = (TextView) findViewById(R.id.tv_card_deviceNumber); |
| 76 | shopadress = (TextView) findViewById(R.id.tv_card_shopAdress); | 81 | shopadress = (TextView) findViewById(R.id.tv_card_shopAdress); |
| 77 | phone = (TextView) findViewById(R.id.tv_card_phone); | 82 | phone = (TextView) findViewById(R.id.tv_card_phone); |
| 78 | tlePhone = (TextView) findViewById(R.id.tv_card_tleNember); | 83 | tlePhone = (TextView) findViewById(R.id.tv_card_tleNember); |
| 79 | tv_card_adress_change = (TextView) findViewById(R.id.tv_card_adress_change); | 84 | tv_card_adress_change = (TextView) findViewById(R.id.tv_card_adress_change); |
| 80 | tv_card_phone_change = (TextView) findViewById(R.id.tv_card_phone_change); | 85 | tv_card_phone_change = (TextView) findViewById(R.id.tv_card_phone_change); |
| 81 | } | 86 | } |
| 82 | private void initData() { | 87 | private void initData() { |
| 83 | HttpManager.getInstance().getcardinfo(this,736,handler); | 88 | HttpManager.getInstance().getcardinfo(this,736,handler); |
| 84 | //获取设备信息 | 89 | //获取设备信息 |
| 85 | deviceModel.setText(GetDevicesUtil.getDevicesInfo(this).getDeviceModel()); | 90 | deviceModel.setText(GetDevicesUtil.getDevicesInfo(this).getDeviceModel()); |
| 86 | deviceNumber.setText(GetDevicesUtil.getDevicesInfo(this).getDeviceNumber()); | 91 | deviceNumber.setText(GetDevicesUtil.getDevicesInfo(this).getDeviceNumber()); |
| 87 | mac_adress.setText(GetDevicesUtil.getDevicesInfo(this).getMac()); | 92 | mac_adress.setText(GetDevicesUtil.getDevicesInfo(this).getMac()); |
| 88 | //获取保卡信息 | 93 | //获取保卡信息 |
| 89 | usename.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.CUNSTEMNAME)); | 94 | usename.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.CUNSTEMNAME)); |
| 90 | customer_address.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.ADRESSCUNSTEM)); | 95 | customer_address.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.ADRESSCUNSTEM)); |
| 91 | shoptime.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.SHOPTIME)); | 96 | shoptime.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.SHOPTIME)); |
| 92 | shopadress.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.SHOPADRESS)); | 97 | shopadress.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.SHOPADRESS)); |
| 93 | tlePhone.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.SHOPTLEPHONE)); | 98 | tlePhone.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.SHOPTLEPHONE)); |
| 94 | phone.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.CARDPHONE)); | 99 | phone.setText(SaveParam.getInstance().getCustomizeParam(this,SaveParam.CARDPHONE)); |
| 95 | 100 | ||
| 96 | 101 | ||
| 97 | } | 102 | } |
| 98 | private void initLister() { | 103 | private void initLister() { |
| 99 | tv_card_adress_change.setOnClickListener(this); | 104 | tv_card_adress_change.setOnClickListener(this); |
| 100 | tv_card_phone_change.setOnClickListener(this); | 105 | tv_card_phone_change.setOnClickListener(this); |
| 101 | iv_last_step.setOnClickListener(this); | 106 | iv_last_step.setOnClickListener(this); |
| 102 | } | 107 | } |
| 103 | @Override | 108 | @Override |
| 104 | public void onClick(View v) { | 109 | public void onClick(View v) { |
| 105 | switch (v.getId()){ | 110 | switch (v.getId()){ |
| 106 | case R.id.tv_card_adress_change: | 111 | case R.id.tv_card_adress_change: |
| 107 | Intent intent = new Intent(); | 112 | Intent intent = new Intent(); |
| 108 | intent.setClass(this,ChangeElectronicCardAdressInfoActivity.class); | 113 | intent.setClass(this,ChangeElectronicCardAdressInfoActivity.class); |
| 109 | startActivity(intent); | 114 | startActivity(intent); |
| 110 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | 115 | overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 111 | 116 | ||
| 112 | break; | 117 | break; |
| 113 | case R.id.tv_card_phone_change: | 118 | case R.id.tv_card_phone_change: |
| 114 | Content.authcodeflag =2; | 119 | Content.authcodeflag =2; |
| 115 | Intent intent1 = new Intent(); | 120 | Intent intent1 = new Intent(); |
| 116 | intent1.setClass(this,ElectronicCardValidationActivity.class); | 121 | intent1.setClass(this,ElectronicCardValidationActivity.class); |
| 117 | startActivity(intent1); | 122 | startActivity(intent1); |
| 118 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | 123 | overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 119 | 124 | ||
| 120 | 125 | ||
| 121 | break; | 126 | break; |
| 122 | case R.id.cancel: | 127 | case R.id.cancel: |
| 123 | finish(); | 128 | finish(); |
| 124 | break; | 129 | break; |
| 125 | } | 130 | } |
| 126 | } | 131 | } |
| 127 | 132 | ||
| 128 | } | 133 | } |
| 129 | 134 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ElectronicCardValidationActivity.java
| 1 | package com.hjx.personalcenter.activity; | 1 | package com.hjx.personalcenter.activity; |
| 2 | 2 | ||
| 3 | import android.app.Activity; | 3 | import android.app.Activity; |
| 4 | import android.content.Intent; | 4 | import android.content.Intent; |
| 5 | import android.os.Bundle; | 5 | import android.os.Bundle; |
| 6 | import android.os.Handler; | 6 | import android.os.Handler; |
| 7 | import android.os.Message; | 7 | import android.os.Message; |
| 8 | import android.text.TextUtils; | 8 | import android.text.TextUtils; |
| 9 | import android.view.View; | 9 | import android.view.View; |
| 10 | import android.widget.Button; | 10 | import android.widget.Button; |
| 11 | import android.widget.EditText; | 11 | import android.widget.EditText; |
| 12 | import android.widget.TextView; | 12 | import android.widget.TextView; |
| 13 | 13 | ||
| 14 | import com.hjx.personalcenter.R; | 14 | import com.hjx.personalcenter.R; |
| 15 | import com.hjx.personalcenter.db.Content; | 15 | import com.hjx.personalcenter.db.Content; |
| 16 | import com.hjx.personalcenter.db.SaveParam; | 16 | import com.hjx.personalcenter.db.SaveParam; |
| 17 | import com.hjx.personalcenter.http.HttpCode; | 17 | import com.hjx.personalcenter.http.HttpCode; |
| 18 | import com.hjx.personalcenter.http.HttpManager; | 18 | import com.hjx.personalcenter.http.HttpManager; |
| 19 | import com.hjx.personalcenter.util.AlertUtils; | 19 | import com.hjx.personalcenter.util.AlertUtils; |
| 20 | import com.hjx.personalcenter.util.PhoneNumCheckUtils; | 20 | import com.hjx.personalcenter.util.PhoneNumCheckUtils; |
| 21 | 21 | ||
| 22 | import org.json.JSONObject; | 22 | import org.json.JSONObject; |
| 23 | 23 | ||
| 24 | /** | 24 | /** |
| 25 | * Created by h on 2017/8/9. | 25 | * Created by h on 2017/8/9. |
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | public class ElectronicCardValidationActivity extends Activity implements View.OnClickListener { | 28 | public class ElectronicCardValidationActivity extends Activity implements View.OnClickListener { |
| 29 | private Button btn_card_valiyanzhen,get_authcode; | 29 | private Button btn_card_valiyanzhen,get_authcode; |
| 30 | private EditText phonenumber,anth_6num;//;//密码 | 30 | private EditText phonenumber,anth_6num;//;//密码 |
| 31 | private TextView menu_title; | 31 | private TextView menu_title; |
| 32 | private int i = 0; | 32 | private int i = 0; |
| 33 | private Thread thread; | 33 | private Thread thread; |
| 34 | private String sourceStr ="android"; | 34 | private String sourceStr ="android"; |
| 35 | private String typeStr = "register"; | 35 | private String typeStr = "register"; |
| 36 | String authcode = ""; | 36 | String authcode = ""; |
| 37 | Handler handler = new Handler() { | 37 | Handler handler = new Handler() { |
| 38 | @Override | 38 | @Override |
| 39 | public void handleMessage(Message msg) { | 39 | public void handleMessage(Message msg) { |
| 40 | super.handleMessage(msg); | 40 | super.handleMessage(msg); |
| 41 | JSONObject jsonObject; | 41 | JSONObject jsonObject; |
| 42 | String status; | 42 | String status; |
| 43 | switch (msg.what) { | 43 | switch (msg.what) { |
| 44 | case HttpCode.AUTHCODE_SUCESS: | 44 | case HttpCode.AUTHCODE_SUCESS: |
| 45 | jsonObject = (JSONObject) msg.obj; | 45 | jsonObject = (JSONObject) msg.obj; |
| 46 | status = jsonObject.optString("status"); | 46 | status = jsonObject.optString("status"); |
| 47 | authcode = jsonObject.optString("jsessionid"); | 47 | authcode = jsonObject.optString("jsessionid"); |
| 48 | if (status.equals("100")) { | 48 | if (status.equals("100")) { |
| 49 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "验证码发送成功"); | 49 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "验证码发送成功"); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | break; | 52 | break; |
| 53 | case HttpCode.AUTHCODE_FAIL: | 53 | case HttpCode.AUTHCODE_FAIL: |
| 54 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "验证码发送失败"); | 54 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "验证码发送失败"); |
| 55 | break; | 55 | break; |
| 56 | case 1: | 56 | case 1: |
| 57 | get_authcode.setEnabled(false); | 57 | get_authcode.setEnabled(false); |
| 58 | get_authcode.setClickable(false); | 58 | get_authcode.setClickable(false); |
| 59 | get_authcode.setText(Integer.toString(i--)+" s"); | 59 | get_authcode.setText(Integer.toString(i--)+" s"); |
| 60 | if (i<=0){ | 60 | if (i<=0){ |
| 61 | get_authcode.setEnabled(true); | 61 | get_authcode.setEnabled(true); |
| 62 | get_authcode.setClickable(true); | 62 | get_authcode.setClickable(true); |
| 63 | get_authcode.setText("获取验证码"); | 63 | get_authcode.setText("获取验证码"); |
| 64 | } | 64 | } |
| 65 | break; | 65 | break; |
| 66 | } | 66 | } |
| 67 | } | 67 | } |
| 68 | }; | 68 | }; |
| 69 | @Override | 69 | @Override |
| 70 | protected void onCreate(Bundle savedInstanceState) { | 70 | protected void onCreate(Bundle savedInstanceState) { |
| 71 | super.onCreate(savedInstanceState); | 71 | super.onCreate(savedInstanceState); |
| 72 | setContentView(R.layout.activity_electroniccard_validation); | 72 | setContentView(R.layout.activity_electroniccard_validation); |
| 73 | initView(); | 73 | initView(); |
| 74 | initData(); | 74 | initData(); |
| 75 | initLister(); | 75 | initLister(); |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | private void initView() { | 78 | private void initView() { |
| 79 | btn_card_valiyanzhen = (Button) findViewById(R.id.btn_card_valiyanzhen); | 79 | btn_card_valiyanzhen = (Button) findViewById(R.id.btn_card_valiyanzhen); |
| 80 | get_authcode = (Button) findViewById(R.id.btn_authcode); | 80 | get_authcode = (Button) findViewById(R.id.btn_authcode); |
| 81 | anth_6num = (EditText) findViewById(R.id.et_authcode); | 81 | anth_6num = (EditText) findViewById(R.id.et_authcode); |
| 82 | phonenumber = (EditText) findViewById(R.id.et_phonenumber); | 82 | phonenumber = (EditText) findViewById(R.id.et_phonenumber); |
| 83 | menu_title = (TextView) findViewById(R.id.menu_title); | 83 | menu_title = (TextView) findViewById(R.id.menu_title); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | private void initData() { | 86 | private void initData() { |
| 87 | if (Content.authcodeflag==1){ | 87 | if (Content.authcodeflag==1){ |
| 88 | menu_title.setText("填写保卡信息"); | 88 | menu_title.setText("更换绑定"); |
| 89 | btn_card_valiyanzhen.setText("下一步"); | 89 | btn_card_valiyanzhen.setText("确定"); |
| 90 | 90 | ||
| 91 | }else if (Content.authcodeflag==2){ | 91 | }else if (Content.authcodeflag==2){ |
| 92 | menu_title.setText("修改保卡信息"); | 92 | menu_title.setText("修改保卡信息"); |
| 93 | btn_card_valiyanzhen.setText("确定"); | 93 | btn_card_valiyanzhen.setText("确定"); |
| 94 | 94 | ||
| 95 | }else { | 95 | }else { |
| 96 | menu_title.setText("更换绑定"); | 96 | menu_title.setText("填写保卡信息"); |
| 97 | btn_card_valiyanzhen.setText("确定"); | 97 | btn_card_valiyanzhen.setText("下一步"); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | 100 | ||
| 101 | 101 | ||
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | private void initLister() { | 104 | private void initLister() { |
| 105 | get_authcode.setOnClickListener(this); | 105 | get_authcode.setOnClickListener(this); |
| 106 | btn_card_valiyanzhen.setOnClickListener(this); | 106 | btn_card_valiyanzhen.setOnClickListener(this); |
| 107 | 107 | ||
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | @Override | 110 | @Override |
| 111 | public void onClick(View v) { | 111 | public void onClick(View v) { |
| 112 | switch (v.getId()){ | 112 | switch (v.getId()){ |
| 113 | case R.id.btn_card_valiyanzhen: | 113 | case R.id.btn_card_valiyanzhen: |
| 114 | 114 | ||
| 115 | String usernameStr = phonenumber.getText().toString().trim(); | 115 | String usernameStr = phonenumber.getText().toString().trim(); |
| 116 | String authcodeStr = anth_6num.getText().toString().trim(); | 116 | String authcodeStr = anth_6num.getText().toString().trim(); |
| 117 | if (TextUtils.isEmpty(usernameStr) || TextUtils.isEmpty(authcodeStr)) { | 117 | if (TextUtils.isEmpty(usernameStr) || TextUtils.isEmpty(authcodeStr)) { |
| 118 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "手机号,和验证码不能为空"); | 118 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "手机号,和验证码不能为空"); |
| 119 | return; | 119 | return; |
| 120 | } else if (!PhoneNumCheckUtils.isPhone(usernameStr)){ | 120 | } else if (!PhoneNumCheckUtils.isPhone(usernameStr)){ |
| 121 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "手机号码输入错误"); | 121 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "手机号码输入错误"); |
| 122 | 122 | ||
| 123 | }else if (!authcode.equals(authcodeStr)){ | 123 | }else if (!authcode.equals(authcodeStr)){ |
| 124 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "您输入的验证码不正确"); | 124 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "您输入的验证码不正确"); |
| 125 | }else { | 125 | }else { |
| 126 | if (Content.authcodeflag==1){ | 126 | if (Content.authcodeflag==1){ |
| 127 | SaveParam.getInstance().saveCustomizeParam(this,SaveParam.CARDPHONE, phonenumber.getText().toString().trim()); | 127 | //修改账户手机号 |
| 128 | Intent intent = new Intent(); | 128 | HttpManager.getInstance().changecardinfophone(this, |
| 129 | intent.setClass(ElectronicCardValidationActivity.this, ElectronicCardEditInfoActivity.class); | 129 | 736,usernameStr,authcodeStr); |
| 130 | startActivity(intent); | 130 | |
| 131 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | ||
| 132 | 131 | ||
| 133 | }else if (Content.authcodeflag==2){ | 132 | }else if (Content.authcodeflag==2){ |
| 134 | //修改保卡手机号 | 133 | //修改保卡手机号 |
| 135 | HttpManager.getInstance().changecardinfophone(this, | 134 | HttpManager.getInstance().changecardinfophone(this, |
| 136 | 736,usernameStr,authcodeStr); | 135 | 736,usernameStr,authcodeStr); |
| 137 | }else { | 136 | }else { |
| 138 | //修改手机号 | 137 | SaveParam.getInstance().saveCustomizeParam(this,SaveParam.CARDPHONE, phonenumber.getText().toString().trim()); |
| 139 | menu_title.setText("更换绑定"); | 138 | Intent intent = new Intent(); |
| 139 | intent.setClass(ElectronicCardValidationActivity.this, ElectronicCardEditInfoActivity.class); | ||
| 140 | startActivity(intent); | ||
| 141 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | ||
| 140 | } | 142 | } |
| 141 | // SaveParam.getInstance().saveLoginParam(this,SaveParam.CARDPHONE, phonenumber.getText().toString().trim()); | 143 | // SaveParam.getInstance().saveLoginParam(this,SaveParam.CARDPHONE, phonenumber.getText().toString().trim()); |
| 142 | // Intent intent = new Intent(); | 144 | // Intent intent = new Intent(); |
| 143 | // intent.setClass(ElectronicCardValidationActivity.this, ElectronicCardEditInfoActivity.class); | 145 | // intent.setClass(ElectronicCardValidationActivity.this, ElectronicCardEditInfoActivity.class); |
| 144 | // startActivity(intent); | 146 | // startActivity(intent); |
| 145 | // overridePendingTransition(R.anim.rightin, R.anim.rightout); | 147 | // overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 146 | } | 148 | } |
| 147 | break; | 149 | break; |
| 148 | case R.id.btn_authcode: | 150 | case R.id.btn_authcode: |
| 149 | String usernameStr1 = phonenumber.getText().toString().trim(); | 151 | String usernameStr1 = phonenumber.getText().toString().trim(); |
| 150 | if (!PhoneNumCheckUtils.isPhone(usernameStr1)){ | 152 | if (!PhoneNumCheckUtils.isPhone(usernameStr1)){ |
| 151 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "请输入正确的手机号"); | 153 | AlertUtils.showToast(ElectronicCardValidationActivity.this, "请输入正确的手机号"); |
| 152 | }else { | 154 | }else { |
| 153 | anth_6num.requestFocus(); | 155 | anth_6num.requestFocus(); |
| 154 | HttpManager.getInstance().authCode(typeStr, usernameStr1, handler, ElectronicCardValidationActivity.this); | 156 | HttpManager.getInstance().authCode(typeStr, usernameStr1, handler, ElectronicCardValidationActivity.this); |
| 155 | i = 60; | 157 | i = 60; |
| 156 | if(thread == null){ | 158 | if(thread == null){ |
| 157 | thread = new Thread( new ThreadShow()); | 159 | thread = new Thread( new ThreadShow()); |
| 158 | thread.start(); | 160 | thread.start(); |
| 159 | } | 161 | } |
| 160 | 162 | ||
| 161 | } | 163 | } |
| 162 | 164 | ||
| 163 | break; | 165 | break; |
| 164 | } | 166 | } |
| 165 | } | 167 | } |
| 166 | // 线程类 定时器 | 168 | // 线程类 定时器 |
| 167 | class ThreadShow implements Runnable { | 169 | class ThreadShow implements Runnable { |
| 168 | 170 | ||
| 169 | @Override | 171 | @Override |
| 170 | public void run() { | 172 | public void run() { |
| 171 | // TODO Auto-generated method stub | 173 | // TODO Auto-generated method stub |
| 172 | while (true) { | 174 | while (true) { |
| 173 | try { | 175 | try { |
| 174 | Thread.sleep(1000); | 176 | Thread.sleep(1000); |
| 175 | Message msg = new Message(); | 177 | Message msg = new Message(); |
| 176 | msg.what = 1; | 178 | msg.what = 1; |
| 177 | handler.sendMessage(msg); | 179 | handler.sendMessage(msg); |
| 178 | System.out.println("send..."); | 180 | System.out.println("send..."); |
| 179 | } catch (Exception e) { | 181 | } catch (Exception e) { |
| 180 | // TODO Auto-generated catch block | 182 | // TODO Auto-generated catch block |
| 181 | e.printStackTrace(); | 183 | e.printStackTrace(); |
| 182 | System.out.println("thread error..."); | 184 | System.out.println("thread error..."); |
| 183 | } | 185 | } |
| 184 | } | 186 | } |
| 185 | } | 187 | } |
| 186 | } | 188 | } |
| 187 | } | 189 | } |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/MainActivity.java
| 1 | package com.hjx.personalcenter.activity; | 1 | package com.hjx.personalcenter.activity; |
| 2 | 2 | ||
| 3 | import android.content.Context; | ||
| 3 | import android.content.Intent; | 4 | import android.content.Intent; |
| 4 | import android.os.Bundle; | 5 | import android.os.Bundle; |
| 5 | import android.support.v7.app.AppCompatActivity; | 6 | import android.support.v7.app.AppCompatActivity; |
| 7 | import android.view.LayoutInflater; | ||
| 6 | import android.view.View; | 8 | import android.view.View; |
| 9 | import android.view.ViewGroup; | ||
| 7 | import android.widget.ImageView; | 10 | import android.widget.ImageView; |
| 11 | import android.widget.LinearLayout; | ||
| 8 | import android.widget.TextView; | 12 | import android.widget.TextView; |
| 9 | 13 | ||
| 10 | import com.hjx.personalcenter.R; | 14 | import com.hjx.personalcenter.R; |
| 15 | import com.hjx.personalcenter.customdialog.HeadDialog; | ||
| 16 | import com.hjx.personalcenter.interfaces.DialogCallBack; | ||
| 17 | import com.hjx.personalcenter.util.AlertUtils; | ||
| 11 | import com.mylhyl.circledialog.CircleDialog; | 18 | import com.mylhyl.circledialog.CircleDialog; |
| 12 | import com.mylhyl.circledialog.callback.ConfigInput; | 19 | import com.mylhyl.circledialog.callback.ConfigInput; |
| 13 | import com.mylhyl.circledialog.params.InputParams; | 20 | import com.mylhyl.circledialog.params.InputParams; |
| 14 | import com.mylhyl.circledialog.view.listener.OnInputClickListener; | 21 | import com.mylhyl.circledialog.view.listener.OnInputClickListener; |
| 22 | import com.zaaach.toprightmenu.MenuItem; | ||
| 23 | import com.zaaach.toprightmenu.TopRightMenu; | ||
| 24 | |||
| 25 | import java.util.ArrayList; | ||
| 26 | import java.util.List; | ||
| 27 | |||
| 28 | public class MainActivity extends AppCompatActivity implements View.OnClickListener, DialogCallBack.CallBackView { | ||
| 29 | private ImageView iv_imformatioan, iv_look_card, iv_setting, iv_sign, iv_head, iv_sex; | ||
| 30 | private TextView tv_edit_presoninfo, tv_sign, oktakephone, cancetakephone, | ||
| 31 | tv_username, tv_username1, tv_mygad, tv_sex, tv_useinfo_adress, tv_useinfo_birthday, | ||
| 32 | tv_useinfo_qq, tv_useinfo_school, tv_useinfo_gender; | ||
| 33 | private LinearLayout linel_mycuoti, linel_mynote, linel_mycollege, linel_myclass; | ||
| 34 | private TopRightMenu mTopRightMenu; | ||
| 35 | private boolean showIcon = true; | ||
| 36 | private boolean dimBg = true; | ||
| 37 | private boolean needAnim = true; | ||
| 15 | 38 | ||
| 16 | public class MainActivity extends AppCompatActivity implements View.OnClickListener { | ||
| 17 | private ImageView iv_imformatioan,iv_look_card,iv_setting,iv_sign; | ||
| 18 | private TextView tv_edit_presoninfo,tv_sign; | ||
| 19 | @Override | 39 | @Override |
| 20 | protected void onCreate(Bundle savedInstanceState) { | 40 | protected void onCreate(Bundle savedInstanceState) { |
| 21 | super.onCreate(savedInstanceState); | 41 | super.onCreate(savedInstanceState); |
| 22 | setContentView(R.layout.activity_main); | 42 | setContentView(R.layout.activity_main); |
| 23 | initView(); | 43 | initView(); |
| 24 | initData(); | 44 | initData(); |
| 25 | initLister(); | 45 | initLister(); |
| 26 | } | 46 | } |
| 27 | 47 | ||
| 28 | private void initView() { | 48 | private void initView() { |
| 29 | iv_imformatioan = (ImageView) findViewById(R.id.iv_imformatioan); | 49 | iv_imformatioan = (ImageView) findViewById(R.id.iv_imformatioan); |
| 30 | iv_look_card = (ImageView) findViewById(R.id.iv_look_card); | 50 | iv_look_card = (ImageView) findViewById(R.id.iv_look_card); |
| 31 | tv_edit_presoninfo = (TextView) findViewById(R.id.tv_edit_presoninfo); | 51 | tv_edit_presoninfo = (TextView) findViewById(R.id.tv_edit_presoninfo); |
| 32 | iv_setting = (ImageView) findViewById(R.id.iv_setting); | 52 | iv_setting = (ImageView) findViewById(R.id.iv_setting); |
| 33 | iv_sign = (ImageView) findViewById(R.id.iv_sign); | 53 | iv_sign = (ImageView) findViewById(R.id.iv_sign); |
| 34 | tv_sign = (TextView) findViewById(R.id.tv_sign); | 54 | tv_sign = (TextView) findViewById(R.id.tv_sign); |
| 55 | //头像 | ||
| 56 | iv_head = (ImageView) findViewById(R.id.iv_head); | ||
| 57 | //初始化个人信息 | ||
| 58 | iv_sex = (ImageView) findViewById(R.id.iv_sex); | ||
| 59 | tv_username = (TextView) findViewById(R.id.tv_username); | ||
| 60 | tv_username1 = (TextView) findViewById(R.id.tv_username1); | ||
| 61 | tv_mygad = (TextView) findViewById(R.id.tv_mygad); | ||
| 62 | tv_sex = (TextView) findViewById(R.id.tv_sex); | ||
| 63 | tv_useinfo_adress = (TextView) findViewById(R.id.tv_useinfo_adress); | ||
| 64 | tv_useinfo_birthday = (TextView) findViewById(R.id.tv_useinfo_birthday); | ||
| 65 | tv_useinfo_qq = (TextView) findViewById(R.id.tv_useinfo_qq); | ||
| 66 | tv_useinfo_school = (TextView) findViewById(R.id.tv_useinfo_school); | ||
| 67 | tv_useinfo_gender = (TextView) findViewById(R.id.tv_useinfo_gender); | ||
| 68 | //跳转其他应用 | ||
| 69 | linel_mycuoti = (LinearLayout) findViewById(R.id.linel_mycuoti); | ||
| 70 | linel_mynote = (LinearLayout) findViewById(R.id.linel_mynote); | ||
| 71 | linel_mycollege = (LinearLayout) findViewById(R.id.linel_mycollege); | ||
| 72 | linel_myclass = (LinearLayout) findViewById(R.id.linel_myclass); | ||
| 73 | |||
| 35 | } | 74 | } |
| 36 | 75 | ||
| 37 | private void initData() { | 76 | private void initData() { |
| 77 | //加载个人信息 | ||
| 38 | 78 | ||
| 39 | } | 79 | } |
| 40 | 80 | ||
| 41 | private void initLister() { | 81 | private void initLister() { |
| 42 | iv_imformatioan.setOnClickListener(this); | 82 | iv_imformatioan.setOnClickListener(this); |
| 43 | iv_look_card.setOnClickListener(this); | 83 | iv_look_card.setOnClickListener(this); |
| 44 | tv_edit_presoninfo.setOnClickListener(this); | 84 | tv_edit_presoninfo.setOnClickListener(this); |
| 45 | iv_setting.setOnClickListener(this); | 85 | iv_setting.setOnClickListener(this); |
| 46 | iv_sign.setOnClickListener(this); | 86 | iv_sign.setOnClickListener(this); |
| 87 | iv_head.setOnClickListener(this); | ||
| 88 | linel_mycuoti.setOnClickListener(this); | ||
| 89 | linel_mynote.setOnClickListener(this); | ||
| 90 | linel_mycollege.setOnClickListener(this); | ||
| 91 | linel_myclass.setOnClickListener(this); | ||
| 47 | 92 | ||
| 48 | } | 93 | } |
| 49 | 94 | ||
| 50 | @Override | 95 | @Override |
| 51 | public void onClick(View v) { | 96 | public void onClick(View v) { |
| 52 | switch (v.getId()){ | 97 | switch (v.getId()) { |
| 53 | case R.id.iv_imformatioan: | 98 | case R.id.iv_imformatioan: |
| 54 | Intent intent = new Intent(); | 99 | Intent intent = new Intent(); |
| 55 | intent.setClass(MainActivity.this,FeedBackActivity.class); | 100 | intent.setClass(MainActivity.this, FeedBackActivity.class); |
| 56 | startActivity(intent); | 101 | startActivity(intent); |
| 57 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | 102 | overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 58 | break; | 103 | break; |
| 59 | case R.id.iv_look_card: | 104 | case R.id.iv_look_card: |
| 60 | Intent lookintent = new Intent(); | 105 | Intent lookintent = new Intent(); |
| 61 | lookintent.setClass(MainActivity.this,ElectronicCardLookInfoActivity.class); | 106 | lookintent.setClass(MainActivity.this, ElectronicCardLookInfoActivity.class); |
| 62 | startActivity(lookintent); | 107 | startActivity(lookintent); |
| 63 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | 108 | overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 64 | break; | 109 | break; |
| 65 | case R.id.tv_edit_presoninfo: | 110 | case R.id.tv_edit_presoninfo: |
| 66 | Intent editintent = new Intent(); | 111 | Intent editintent = new Intent(); |
| 67 | editintent.setClass(MainActivity.this,ChangePresonalInfoActivity.class); | 112 | editintent.setClass(MainActivity.this, ChangePresonalInfoActivity.class); |
| 68 | startActivity(editintent); | 113 | startActivity(editintent); |
| 69 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | 114 | overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 70 | break; | 115 | break; |
| 116 | case R.id.iv_head: | ||
| 117 | HeadDialog.getInstance(this).show(getSupportFragmentManager(), "HeadDialog"); | ||
| 118 | break; | ||
| 71 | case R.id.iv_setting: | 119 | case R.id.iv_setting: |
| 72 | Intent settingintent = new Intent(); | 120 | mTopRightMenu = new TopRightMenu(MainActivity.this); |
| 73 | settingintent.setClass(MainActivity.this,LoginAndRegisterActivity.class); | 121 | List<MenuItem> menuItems = new ArrayList<>(); |
| 74 | startActivity(settingintent); | 122 | menuItems.add(new MenuItem(R.mipmap.blank, "切换账户")); |
| 75 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | 123 | menuItems.add(new MenuItem(R.mipmap.blank, "账户管理")); |
| 124 | mTopRightMenu | ||
| 125 | .setHeight(150) //默认高度480 | ||
| 126 | .setWidth(320) //默认宽度wrap_content | ||
| 127 | .showIcon(showIcon) //显示菜单图标,默认为true | ||
| 128 | .dimBackground(dimBg) //背景变暗,默认为true | ||
| 129 | .needAnimationStyle(needAnim) //显示动画,默认为true | ||
| 130 | .setAnimationStyle(R.style.TRM_ANIM_STYLE) //默认为R.style.TRM_ANIM_STYLE | ||
| 131 | .setOnMenuItemClickListener(new TopRightMenu.OnMenuItemClickListener() { | ||
| 132 | @Override | ||
| 133 | public void onMenuItemClick(int position) { | ||
| 134 | switch (position) { | ||
| 135 | case 0: | ||
| 136 | //清除数据 | ||
| 137 | Intent settingintent = new Intent(); | ||
| 138 | settingintent.setClass(MainActivity.this, LoginAndRegisterActivity.class); | ||
| 139 | startActivity(settingintent); | ||
| 140 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | ||
| 141 | break; | ||
| 142 | case 1: | ||
| 143 | Intent accontMintent = new Intent(); | ||
| 144 | accontMintent.setClass(MainActivity.this, AccountManagementActivity.class); | ||
| 145 | startActivity(accontMintent); | ||
| 146 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | ||
| 147 | break; | ||
| 148 | } | ||
| 149 | } | ||
| 150 | }) | ||
| 151 | .addMenuList(menuItems) | ||
| 152 | .showAsDropDown(iv_setting, -250, 0); | ||
| 76 | break; | 153 | break; |
| 77 | case R.id.iv_sign: | 154 | case R.id.iv_sign: |
| 78 | new CircleDialog.Builder(this) | 155 | new CircleDialog.Builder(this) |
| 79 | .setCanceledOnTouchOutside(false) | 156 | .setCanceledOnTouchOutside(false) |
| 80 | .setCancelable(true) | 157 | .setCancelable(true) |
| 81 | .setTitle("个性签名") | 158 | .setTitle("个性签名") |
| 82 | .setInputHint("请输入个性签名") | 159 | .setInputHint("请输入个性签名") |
| 83 | .setWidth(0.5f) | 160 | .setWidth(0.5f) |
| 84 | .configInput(new ConfigInput() { | 161 | .configInput(new ConfigInput() { |
| 85 | @Override | 162 | @Override |
| 86 | public void onConfig(InputParams params) { | 163 | public void onConfig(InputParams params) { |
| 87 | // params.inputBackgroundResourceId = R.drawable.bg_input; | 164 | // params.inputBackgroundResourceId = R.drawable.bg_input; |
| 88 | } | 165 | } |
| 89 | }) | 166 | }) |
| 90 | .setNegative("取消", null) | 167 | .setNegative("取消", null) |
| 91 | .setPositiveInput("确定", new OnInputClickListener() { | 168 | .setPositiveInput("确定", new OnInputClickListener() { |
| 92 | @Override | 169 | @Override |
| 93 | public void onClick(String text, View v) { | 170 | public void onClick(String text, View v) { |
| 94 | tv_sign.setText(text); | 171 | if (text.equals("")) { |
| 172 | AlertUtils.showToast(MainActivity.this, "请输入个性签名"); | ||
| 173 | } else { | ||
| 174 | tv_sign.setText(text); | ||
| 175 | } | ||
| 176 | |||
| 95 | } | 177 | } |
| 96 | }) | 178 | }) |
| 97 | .show(); | 179 | .show(); |
| 98 | break; | 180 | break; |
| 181 | case R.id.linel_mycuoti: | ||
| 182 | AlertUtils.showToast(this, "hhahahah "); | ||
| 183 | break; | ||
| 184 | case R.id.linel_mynote: | ||
| 185 | AlertUtils.showToast(this, "hhahahah "); | ||
| 186 | break; | ||
| 187 | case R.id.linel_mycollege: | ||
| 188 | AlertUtils.showToast(this, "hhahahah "); | ||
| 189 | break; | ||
| 190 | case R.id.linel_myclass: | ||
| 191 | AlertUtils.showToast(this, "hhahahah "); | ||
| 192 | break; | ||
| 193 | case R.id.oktakephone: | ||
| 194 | AlertUtils.showToast(this, "hhahahah "); | ||
| 195 | break; | ||
| 196 | case R.id.canceltakephone: | ||
| 197 | AlertUtils.showToast(this, "hhahahah "); | ||
| 198 | break; | ||
| 99 | 199 | ||
| 100 | } | 200 | } |
| 101 | 201 | ||
| 102 | } | 202 | } |
| 203 | |||
| 204 | @Override | ||
| 205 | public void provinceOnItemClick(Context context, LayoutInflater inflater, ViewGroup container) { | ||
| 206 | View mView = inflater.inflate(R.layout.custom_adilog_lhead, container, false); | ||
| 207 | oktakephone = (TextView) mView.findViewById(R.id.oktakephone); | ||
| 208 | cancetakephone = (TextView) mView.findViewById(R.id.canceltakephone); | ||
| 209 | oktakephone.setOnClickListener(this); | ||
| 210 | cancetakephone.setOnClickListener(this); | ||
| 211 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/RegisterInfoActivity.java
| 1 | package com.hjx.personalcenter.activity; | 1 | package com.hjx.personalcenter.activity; |
| 2 | 2 | ||
| 3 | import android.content.Intent; | 3 | import android.content.Intent; |
| 4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 5 | import android.support.v7.app.AppCompatActivity; | 5 | import android.support.v7.app.AppCompatActivity; |
| 6 | import android.view.View; | 6 | import android.view.View; |
| 7 | import android.widget.AdapterView; | 7 | import android.widget.AdapterView; |
| 8 | import android.widget.Button; | 8 | import android.widget.Button; |
| 9 | import android.widget.EditText; | 9 | import android.widget.EditText; |
| 10 | import android.widget.TextView; | 10 | import android.widget.TextView; |
| 11 | 11 | ||
| 12 | import com.hjx.personalcenter.R; | 12 | import com.hjx.personalcenter.R; |
| 13 | import com.hjx.personalcenter.customdialog.GradeListDialog; | 13 | import com.hjx.personalcenter.customdialog.GradeListDialog; |
| 14 | import com.hjx.personalcenter.customdialog.ProvinceListDialog; | 14 | import com.hjx.personalcenter.customdialog.ProvinceListDialog; |
| 15 | import com.hjx.personalcenter.http.HttpManager; | 15 | import com.hjx.personalcenter.http.HttpManager; |
| 16 | import com.hjx.personalcenter.interfaces.DialogCallBack; | 16 | import com.hjx.personalcenter.interfaces.DialogCallBack; |
| 17 | 17 | ||
| 18 | /**填写注册信息 熊巍 | 18 | /**填写注册信息 熊巍 |
| 19 | * Created by h on 2017/8/9. | 19 | * Created by h on 2017/8/9. |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | public class RegisterInfoActivity extends AppCompatActivity implements View.OnClickListener,DialogCallBack.CallBack { | 22 | public class RegisterInfoActivity extends AppCompatActivity implements View.OnClickListener,DialogCallBack.CallBack { |
| 23 | private EditText et_username; | 23 | private EditText et_username; |
| 24 | private TextView et_region,et_grade,et_school; | 24 | private TextView et_region,et_grade,et_school; |
| 25 | private Button btn_ok; | 25 | private Button btn_ok; |
| 26 | String[] items; | 26 | String[] items; |
| 27 | 27 | ||
| 28 | @Override | 28 | @Override |
| 29 | protected void onCreate(Bundle savedInstanceState) { | 29 | protected void onCreate(Bundle savedInstanceState) { |
| 30 | super.onCreate(savedInstanceState); | 30 | super.onCreate(savedInstanceState); |
| 31 | setContentView(R.layout.activity_registerinfo); | 31 | setContentView(R.layout.activity_registerinfo); |
| 32 | initView(); | 32 | initView(); |
| 33 | initData(); | 33 | initData(); |
| 34 | initLister(); | 34 | initLister(); |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | private void initView() { | 37 | private void initView() { |
| 38 | et_username = (EditText) findViewById(R.id.et_username); | 38 | et_username = (EditText) findViewById(R.id.et_username); |
| 39 | et_region = (TextView) findViewById(R.id.et_region); | 39 | et_region = (TextView) findViewById(R.id.et_region); |
| 40 | et_grade = (TextView) findViewById(R.id.et_grade); | 40 | et_grade = (TextView) findViewById(R.id.et_grade); |
| 41 | et_school = (TextView) findViewById(R.id.et_school); | 41 | et_school = (TextView) findViewById(R.id.et_school); |
| 42 | btn_ok = (Button) findViewById(R.id.btn_ok); | 42 | btn_ok = (Button) findViewById(R.id.btn_ok); |
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | private void initData() { | 47 | private void initData() { |
| 48 | items = new String[] { "魏", "蜀", "吴" }; | 48 | items = new String[] { "魏", "蜀", "吴" }; |
| 49 | 49 | ||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | private void initLister() { | 52 | private void initLister() { |
| 53 | et_region.setOnClickListener(this); | 53 | et_region.setOnClickListener(this); |
| 54 | et_grade.setOnClickListener(this); | 54 | et_grade.setOnClickListener(this); |
| 55 | et_school.setOnClickListener(this); | 55 | et_school.setOnClickListener(this); |
| 56 | btn_ok.setOnClickListener(this); | 56 | btn_ok.setOnClickListener(this); |
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | @Override | 61 | @Override |
| 62 | public void onClick(View v) { | 62 | public void onClick(View v) { |
| 63 | switch (v.getId()){ | 63 | switch (v.getId()){ |
| 64 | case R.id.et_region: | 64 | case R.id.et_region: |
| 65 | choiseregion(); | 65 | choiseregion(); |
| 66 | break; | 66 | break; |
| 67 | case R.id.et_grade: | 67 | case R.id.et_grade: |
| 68 | choisegrade(); | 68 | choisegrade(); |
| 69 | break; | 69 | break; |
| 70 | case R.id.et_school: | 70 | case R.id.et_school: |
| 71 | break; | 71 | break; |
| 72 | case R.id.btn_ok: | 72 | case R.id.btn_ok: |
| 73 | Intent intent = new Intent(); | 73 | Intent intent = new Intent(); |
| 74 | intent.setClass(RegisterInfoActivity.this,ChoiseTextBookActivity.class); | 74 | intent.setClass(RegisterInfoActivity.this,ChoiseTextBookActivity.class); |
| 75 | startActivity(intent); | 75 | startActivity(intent); |
| 76 | overridePendingTransition(R.anim.rightin, R.anim.rightout); | 76 | overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 77 | break; | 77 | break; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | } | 80 | } |
| 81 | //选择地区 | 81 | //选择地区 |
| 82 | private void choiseregion() { | 82 | private void choiseregion() { |
| 83 | HttpManager.getInstance().provices(RegisterInfoActivity.this); | 83 | HttpManager.getInstance().provices(RegisterInfoActivity.this); |
| 84 | ProvinceListDialog.getInstance(this).show(getSupportFragmentManager(), "ProvinceListDialog"); | 84 | ProvinceListDialog.getInstance(this).show(getSupportFragmentManager(), "ProvinceListDialog"); |
| 85 | // HttpManager.getInstance().cityinfo(RegisterInfoActivity.this,111); | ||
| 86 | // CitysListDialog.getInstance(this).show(getSupportFragmentManager(), "CitysListDialog"); | ||
| 85 | 87 | ||
| 86 | } | 88 | } |
| 87 | //选择年级 | 89 | //选择年级 |
| 88 | private void choisegrade() { | 90 | private void choisegrade() { |
| 89 | GradeListDialog.getInstance().show(getSupportFragmentManager(), "GradeListDialog"); | 91 | GradeListDialog.getInstance().show(getSupportFragmentManager(), "GradeListDialog"); |
| 90 | 92 | ||
| 91 | } | 93 | } |
| 92 | 94 | ||
| 93 | @Override | 95 | @Override |
| 94 | public void provinceOnItemClick(AdapterView<?> parent, View view, int position, long id) { | 96 | public void provinceOnItemClick(AdapterView<?> parent, View view, int position, long id) { |
| 95 | 97 | ||
| 96 | View gradeView = parent.getChildAt(position); | 98 | View gradeView = parent.getChildAt(position); |
| 97 | TextView gradeTv = (TextView)gradeView.findViewById(R.id.list_items); | 99 | TextView gradeTv = (TextView)gradeView.findViewById(R.id.list_items); |
| 98 | et_region.setText(gradeTv.getText().toString()); | 100 | et_region.setText(gradeTv.getText().toString()); |
| 99 | 101 | ||
| 100 | 102 | ||
| 101 | } | 103 | } |
| 102 | } | 104 | } |
| 103 | 105 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/customdialog/CitysListDialog.java
| 1 | package com.hjx.personalcenter.customdialog; | 1 | package com.hjx.personalcenter.customdialog; |
| 2 | 2 | ||
| 3 | import android.content.Context; | 3 | import android.content.Context; |
| 4 | import android.graphics.Color; | 4 | import android.graphics.Color; |
| 5 | import android.os.Bundle; | 5 | import android.os.Bundle; |
| 6 | import android.view.Gravity; | 6 | import android.view.Gravity; |
| 7 | import android.view.LayoutInflater; | 7 | import android.view.LayoutInflater; |
| 8 | import android.view.View; | 8 | import android.view.View; |
| 9 | import android.view.ViewGroup; | 9 | import android.view.ViewGroup; |
| 10 | import android.widget.AdapterView; | 10 | import android.widget.AdapterView; |
| 11 | import android.widget.ListView; | 11 | import android.widget.ListView; |
| 12 | 12 | ||
| 13 | import com.hjx.personalcenter.R; | 13 | import com.hjx.personalcenter.R; |
| 14 | import com.hjx.personalcenter.adapter.CitysAdapter; | 14 | import com.hjx.personalcenter.adapter.CitysAdapter; |
| 15 | import com.hjx.personalcenter.db.SaveParam; | 15 | import com.hjx.personalcenter.db.SaveParam; |
| 16 | import com.hjx.personalcenter.interfaces.DialogCallBack; | 16 | import com.hjx.personalcenter.interfaces.DialogCallBack; |
| 17 | import com.hjx.personalcenter.model.CityInfo; | 17 | import com.hjx.personalcenter.model.CityInfo; |
| 18 | import com.mylhyl.circledialog.BaseCircleDialog; | 18 | import com.mylhyl.circledialog.BaseCircleDialog; |
| 19 | import com.mylhyl.circledialog.res.values.CircleDimen; | 19 | import com.mylhyl.circledialog.res.values.CircleDimen; |
| 20 | 20 | ||
| 21 | import java.util.ArrayList; | 21 | import java.util.ArrayList; |
| 22 | 22 | ||
| 23 | /** | 23 | /** |
| 24 | * 自定义市级列表对话框 | 24 | * 自定义市级列表对话框 |
| 25 | * Created by h on 2017/8/10. | 25 | * Created by h on 2017/8/10. |
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | public class CitysListDialog extends BaseCircleDialog implements AdapterView.OnItemClickListener { | 28 | public class CitysListDialog extends BaseCircleDialog implements AdapterView.OnItemClickListener { |
| 29 | private CitysAdapter listadapter; | 29 | private CitysAdapter listadapter; |
| 30 | private ListView listView; | 30 | private ListView listView; |
| 31 | private DialogCallBack.CallBack mCallBack; | 31 | private DialogCallBack.CallBack mCallBack; |
| 32 | private ArrayList<CityInfo.CitiesBean> data = new ArrayList<>(); | 32 | private ArrayList<CityInfo.CitiesBean> data = new ArrayList<>(); |
| 33 | public static CitysListDialog getInstance() { | 33 | public CitysListDialog(DialogCallBack.CallBack callBack) { |
| 34 | CitysListDialog dialogFragment = new CitysListDialog(); | 34 | this.mCallBack = callBack; |
| 35 | } | ||
| 36 | public static CitysListDialog getInstance(DialogCallBack.CallBack callBack) { | ||
| 37 | CitysListDialog dialogFragment = new CitysListDialog(callBack); | ||
| 35 | dialogFragment.setCanceledBack(true); | 38 | dialogFragment.setCanceledBack(true); |
| 36 | dialogFragment.setCanceledOnTouchOutside(true); | 39 | dialogFragment.setCanceledOnTouchOutside(true); |
| 37 | dialogFragment.setRadius(CircleDimen.RADIUS); | 40 | dialogFragment.setRadius(CircleDimen.RADIUS); |
| 38 | dialogFragment.setWidth(0.5f); | 41 | dialogFragment.setWidth(0.5f); |
| 39 | dialogFragment.setGravity(Gravity.CENTER); | 42 | dialogFragment.setGravity(Gravity.CENTER); |
| 40 | dialogFragment.setBackgroundColor(Color.WHITE); | 43 | dialogFragment.setBackgroundColor(Color.WHITE); |
| 41 | return dialogFragment; | 44 | return dialogFragment; |
| 42 | } | 45 | } |
| 43 | 46 | ||
| 44 | @Override | 47 | @Override |
| 45 | public View createView(Context context, LayoutInflater inflater, ViewGroup container) { | 48 | public View createView(Context context, LayoutInflater inflater, ViewGroup container) { |
| 46 | return inflater.inflate(R.layout.custom_adilog_provicelist, container, false); | 49 | return inflater.inflate(R.layout.custom_adilog_provicelist, container, false); |
| 47 | } | 50 | } |
| 48 | 51 | ||
| 49 | @Override | 52 | @Override |
| 50 | public void onActivityCreated(Bundle savedInstanceState) { | 53 | public void onActivityCreated(Bundle savedInstanceState) { |
| 51 | super.onActivityCreated(savedInstanceState); | 54 | super.onActivityCreated(savedInstanceState); |
| 52 | listView = (ListView) getView().findViewById(R.id.listadapter); | 55 | listView = (ListView) getView().findViewById(R.id.listadapter); |
| 53 | String provinces = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.CITYS); | 56 | String provinces = SaveParam.getInstance().getLoginParam(getActivity(), SaveParam.CITYS); |
| 54 | // if (provinces != null) { | 57 | // if (provinces != null) { |
| 55 | // | 58 | // |
| 56 | // for (int i = 0; i < provinces.split(",").length; i++) { | 59 | // for (int i = 0; i < provinces.split(",").length; i++) { |
| 57 | // String[] itmt = provinces.split(","); | 60 | // String[] itmt = provinces.split(","); |
| 58 | // data.add(itmt[i] + "区"); | 61 | // data.add(itmt[i] + "区"); |
| 59 | // //data.add(i,provinces.replaceAll(",","省")); | 62 | // //data.add(i,provinces.replaceAll(",","省")); |
| 60 | // | 63 | // |
| 61 | // } | 64 | // } |
| 62 | // } else { | 65 | // } else { |
| 63 | // HttpManager.getInstance().provices(getActivity()); | 66 | // HttpManager.getInstance().provices(getActivity()); |
| 64 | // } | 67 | // } |
| 65 | 68 | ||
| 66 | listadapter = new CitysAdapter(data,getActivity()); | 69 | listadapter = new CitysAdapter(data,getActivity()); |
| 67 | listView.setAdapter(listadapter); | 70 | listView.setAdapter(listadapter); |
| 68 | listView.setOnItemClickListener(this); | 71 | listView.setOnItemClickListener(this); |
| 69 | 72 | ||
| 70 | } | 73 | } |
| 71 | 74 | ||
| 72 | @Override | 75 | @Override |
| 73 | public void onItemClick(AdapterView<?> parent, View view, int position, long id) { | 76 | public void onItemClick(AdapterView<?> parent, View view, int position, long id) { |
| 74 | //Toast.makeText(getActivity(), "你点击了第" + position + "个", Toast.LENGTH_LONG).show(); | 77 | mCallBack.provinceOnItemClick(parent,view,position,id); |
| 75 | switch (position){ | ||
| 76 | |||
| 77 | |||
| 78 | |||
| 79 | } | ||
| 80 | 78 | ||
| 81 | 79 | ||
| 82 | 80 | ||
| 83 | dismiss(); | 81 | dismiss(); |
| 84 | 82 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/customdialog/ElectronicCardDialog.java
| 1 | package com.hjx.personalcenter.customdialog; | 1 | package com.hjx.personalcenter.customdialog; |
| 2 | 2 | ||
| 3 | import android.content.Context; | 3 | import android.content.Context; |
| 4 | import android.content.Intent; | 4 | import android.content.Intent; |
| 5 | import android.graphics.Color; | 5 | import android.graphics.Color; |
| 6 | import android.os.Bundle; | 6 | import android.os.Bundle; |
| 7 | import android.view.Gravity; | 7 | import android.view.Gravity; |
| 8 | import android.view.LayoutInflater; | 8 | import android.view.LayoutInflater; |
| 9 | import android.view.View; | 9 | import android.view.View; |
| 10 | import android.view.ViewGroup; | 10 | import android.view.ViewGroup; |
| 11 | 11 | ||
| 12 | import com.hjx.personalcenter.R; | 12 | import com.hjx.personalcenter.R; |
| 13 | import com.hjx.personalcenter.activity.ElectronicCardValidationActivity; | 13 | import com.hjx.personalcenter.activity.ElectronicCardValidationActivity; |
| 14 | import com.hjx.personalcenter.db.Content; | ||
| 15 | import com.mylhyl.circledialog.BaseCircleDialog; | 14 | import com.mylhyl.circledialog.BaseCircleDialog; |
| 16 | import com.mylhyl.circledialog.res.values.CircleDimen; | 15 | import com.mylhyl.circledialog.res.values.CircleDimen; |
| 17 | 16 | ||
| 18 | /** | 17 | /** |
| 19 | * Created by h on 2017/8/10. | 18 | * Created by h on 2017/8/10. |
| 20 | */ | 19 | */ |
| 21 | 20 | ||
| 22 | public class ElectronicCardDialog extends BaseCircleDialog { | 21 | public class ElectronicCardDialog extends BaseCircleDialog { |
| 23 | public static ElectronicCardDialog getInstance() { | 22 | public static ElectronicCardDialog getInstance() { |
| 24 | ElectronicCardDialog dialogFragment = new ElectronicCardDialog(); | 23 | ElectronicCardDialog dialogFragment = new ElectronicCardDialog(); |
| 25 | dialogFragment.setCanceledBack(true); | 24 | dialogFragment.setCanceledBack(true); |
| 26 | dialogFragment.setCanceledOnTouchOutside(true); | 25 | dialogFragment.setCanceledOnTouchOutside(true); |
| 27 | dialogFragment.setRadius(CircleDimen.RADIUS); | 26 | dialogFragment.setRadius(CircleDimen.RADIUS); |
| 28 | dialogFragment.setWidth(0.8f); | 27 | dialogFragment.setWidth(0.8f); |
| 29 | dialogFragment.setGravity(Gravity.CENTER); | 28 | dialogFragment.setGravity(Gravity.CENTER); |
| 30 | dialogFragment.setBackgroundColor(Color.WHITE); | 29 | dialogFragment.setBackgroundColor(Color.WHITE); |
| 31 | return dialogFragment; | 30 | return dialogFragment; |
| 32 | } | 31 | } |
| 33 | @Override | 32 | @Override |
| 34 | public View createView(Context context, LayoutInflater inflater, ViewGroup container) { | 33 | public View createView(Context context, LayoutInflater inflater, ViewGroup container) { |
| 35 | return inflater.inflate(R.layout.custom_adilog_electroniccard, container, false); | 34 | return inflater.inflate(R.layout.custom_adilog_electroniccard, container, false); |
| 36 | } | 35 | } |
| 37 | @Override | 36 | @Override |
| 38 | public void onActivityCreated(Bundle savedInstanceState) { | 37 | public void onActivityCreated(Bundle savedInstanceState) { |
| 39 | super.onActivityCreated(savedInstanceState); | 38 | super.onActivityCreated(savedInstanceState); |
| 40 | getView().findViewById(R.id.fill_card).setOnClickListener(new View.OnClickListener() { | 39 | getView().findViewById(R.id.fill_card).setOnClickListener(new View.OnClickListener() { |
| 41 | @Override | 40 | @Override |
| 42 | public void onClick(View v) { | 41 | public void onClick(View v) { |
| 43 | //有保卡信息直接进入开始界面,没有则跳转保卡信息 | 42 | //有保卡信息直接进入开始界面,没有则跳转保卡信息 |
| 44 | // Intent intent = new Intent(); | 43 | // Intent intent = new Intent(); |
| 45 | // intent.setClass(getActivity(),TheStartPageActivity.class); | 44 | // intent.setClass(getActivity(),TheStartPageActivity.class); |
| 46 | // startActivity(intent); | 45 | // startActivity(intent); |
| 47 | // getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); | 46 | // getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 48 | Content.authcodeflag =1; | ||
| 49 | Intent intent = new Intent(); | 47 | Intent intent = new Intent(); |
| 50 | intent.setClass(getActivity(),ElectronicCardValidationActivity.class); | 48 | intent.setClass(getActivity(),ElectronicCardValidationActivity.class); |
| 51 | startActivity(intent); | 49 | startActivity(intent); |
| 52 | getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); | 50 | getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 51 | getActivity().finish(); | ||
| 53 | 52 | ||
| 54 | } | 53 | } |
| 55 | }); | 54 | }); |
| 56 | 55 | ||
| 57 | } | 56 | } |
| 58 | 57 | ||
| 59 | } | 58 | } |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/customdialog/HeadDialog.java
| File was created | 1 | package com.hjx.personalcenter.customdialog; | |
| 2 | |||
| 3 | import android.content.Context; | ||
| 4 | import android.graphics.Color; | ||
| 5 | import android.view.Gravity; | ||
| 6 | import android.view.LayoutInflater; | ||
| 7 | import android.view.View; | ||
| 8 | import android.view.ViewGroup; | ||
| 9 | |||
| 10 | import com.hjx.personalcenter.R; | ||
| 11 | import com.hjx.personalcenter.interfaces.DialogCallBack; | ||
| 12 | import com.mylhyl.circledialog.BaseCircleDialog; | ||
| 13 | import com.mylhyl.circledialog.res.values.CircleDimen; | ||
| 14 | |||
| 15 | /** | ||
| 16 | * Created by h on 2017/8/20. | ||
| 17 | */ | ||
| 18 | |||
| 19 | public class HeadDialog extends BaseCircleDialog { | ||
| 20 | private View mView; | ||
| 21 | private DialogCallBack.CallBackView mCallBack; | ||
| 22 | |||
| 23 | public HeadDialog(DialogCallBack.CallBackView callBack) { | ||
| 24 | this.mCallBack = callBack; | ||
| 25 | } | ||
| 26 | public static HeadDialog getInstance(DialogCallBack.CallBackView callBackview) { | ||
| 27 | HeadDialog dialogFragment = new HeadDialog(callBackview); | ||
| 28 | dialogFragment.setCanceledBack(true); | ||
| 29 | dialogFragment.setCanceledOnTouchOutside(true); | ||
| 30 | dialogFragment.setRadius(CircleDimen.RADIUS); | ||
| 31 | dialogFragment.setWidth(0.4f); | ||
| 32 | dialogFragment.setGravity(Gravity.CENTER); | ||
| 33 | dialogFragment.setBackgroundColor(Color.WHITE); | ||
| 34 | return dialogFragment; | ||
| 35 | } | ||
| 36 | |||
| 37 | @Override | ||
| 38 | public View createView(Context context, LayoutInflater inflater, ViewGroup container) { | ||
| 39 | |||
| 40 | if (mView == null) { | ||
| 41 | mView = inflater.inflate(R.layout.custom_adilog_lhead, container, false); | ||
| 42 | mCallBack.provinceOnItemClick(context,inflater,container); | ||
| 43 | } | ||
| 44 | return mView; | ||
| 45 | } | ||
| 46 | } | ||
| 47 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/PresonInfoFragment.java
| 1 | package com.hjx.personalcenter.fragment; | 1 | package com.hjx.personalcenter.fragment; |
| 2 | 2 | ||
| 3 | import android.graphics.Color; | ||
| 3 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 4 | import android.support.annotation.Nullable; | 5 | import android.support.annotation.Nullable; |
| 5 | import android.support.v4.app.Fragment; | 6 | import android.support.v4.app.Fragment; |
| 6 | import android.view.LayoutInflater; | 7 | import android.view.LayoutInflater; |
| 7 | import android.view.View; | 8 | import android.view.View; |
| 8 | import android.view.ViewGroup; | 9 | import android.view.ViewGroup; |
| 10 | import android.widget.EditText; | ||
| 11 | import android.widget.TextView; | ||
| 9 | 12 | ||
| 13 | import com.bigkoo.pickerview.TimePickerView; | ||
| 10 | import com.hjx.personalcenter.R; | 14 | import com.hjx.personalcenter.R; |
| 15 | import com.hjx.personalcenter.util.AlertUtils; | ||
| 16 | |||
| 17 | import java.text.SimpleDateFormat; | ||
| 18 | import java.util.Date; | ||
| 11 | 19 | ||
| 12 | /** | 20 | /** |
| 13 | * Created by h on 2017/8/12. | 21 | * Created by h on 2017/8/12. |
| 14 | */ | 22 | */ |
| 15 | 23 | ||
| 16 | public class PresonInfoFragment extends Fragment { | 24 | public class PresonInfoFragment extends Fragment implements View.OnClickListener { |
| 17 | private View mView; | 25 | private View mView; |
| 18 | private int type; | 26 | private int type; |
| 27 | private TimePickerView pvTime; | ||
| 28 | private EditText tv_username1,tv_useinfo_adress1,tv_useinfo_qq; | ||
| 29 | private TextView tv_sex, tv_useinfo_adress, tv_useinfo_birthday, tv_useinfo_school, tv_useinfo_gender; | ||
| 19 | public static String TABLAYOUT_FRAGMENT = "tab_fragment"; | 30 | public static String TABLAYOUT_FRAGMENT = "tab_fragment"; |
| 20 | 31 | ||
| 21 | public static PresonInfoFragment newInstance(int type) { | 32 | public static PresonInfoFragment newInstance(int type) { |
| 22 | PresonInfoFragment fragment = new PresonInfoFragment(); | 33 | PresonInfoFragment fragment = new PresonInfoFragment(); |
| 23 | Bundle bundle = new Bundle(); | 34 | Bundle bundle = new Bundle(); |
| 24 | bundle.putSerializable(TABLAYOUT_FRAGMENT, type); | 35 | bundle.putSerializable(TABLAYOUT_FRAGMENT, type); |
| 25 | fragment.setArguments(bundle); | 36 | fragment.setArguments(bundle); |
| 26 | return fragment; | 37 | return fragment; |
| 27 | 38 | ||
| 28 | } | 39 | } |
| 29 | @Override | 40 | @Override |
| 30 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | 41 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
| 31 | if (mView == null) { | 42 | if (mView == null) { |
| 32 | mView = inflater.inflate(R.layout.fragment_changge_presonal_info, container, false); | 43 | mView = inflater.inflate(R.layout.fragment_changge_presonal_info, container, false); |
| 33 | initView(mView); | 44 | initView(mView); |
| 34 | initData(); | 45 | initData(); |
| 35 | setLister(); | 46 | setLister(); |
| 47 | initTimePicker(); | ||
| 36 | 48 | ||
| 37 | 49 | ||
| 38 | } | 50 | } |
| 39 | return mView; | 51 | return mView; |
| 40 | } | 52 | } |
| 41 | //初始化 | 53 | //初始化 |
| 42 | private void initView(View mView) { | 54 | private void initView(View mView) { |
| 55 | tv_username1 = (EditText) mView.findViewById(R.id.tv_username1); | ||
| 56 | tv_useinfo_adress1 = (EditText) mView.findViewById(R.id.tv_useinfo_adress1); | ||
| 57 | tv_useinfo_qq = (EditText) mView.findViewById(R.id.tv_useinfo_qq); | ||
| 58 | tv_sex = (TextView) mView.findViewById(R.id.tv_sex); | ||
| 59 | tv_useinfo_adress = (TextView) mView.findViewById(R.id.tv_useinfo_adress); | ||
| 60 | tv_useinfo_birthday = (TextView) mView.findViewById(R.id.tv_useinfo_birthday); | ||
| 61 | tv_useinfo_school = (TextView) mView.findViewById(R.id.tv_useinfo_school); | ||
| 62 | tv_useinfo_gender = (TextView) mView.findViewById(R.id.tv_useinfo_gender); | ||
| 63 | |||
| 64 | |||
| 43 | 65 | ||
| 44 | } | 66 | } |
| 45 | private void initData() { | 67 | private void initData() { |
| 46 | } | 68 | } |
| 47 | private void setLister() { | 69 | private void setLister() { |
| 70 | tv_sex.setOnClickListener(this); | ||
| 71 | tv_useinfo_adress.setOnClickListener(this); | ||
| 72 | tv_useinfo_birthday.setOnClickListener(this); | ||
| 73 | tv_useinfo_school.setOnClickListener(this); | ||
| 74 | tv_useinfo_gender.setOnClickListener(this); | ||
| 48 | } | 75 | } |
| 49 | 76 | ||
| 77 | @Override | ||
| 78 | public void onClick(View v) { | ||
| 79 | switch (v.getId()){ | ||
| 80 | case R.id.tv_sex: | ||
| 81 | AlertUtils.showToast(getActivity(),"正在开发"); | ||
| 82 | break; | ||
| 83 | case R.id.tv_useinfo_adress: | ||
| 84 | AlertUtils.showToast(getActivity(),"正在开发"); | ||
| 85 | break; | ||
| 86 | case R.id.tv_useinfo_birthday: | ||
| 87 | pvTime.show(tv_useinfo_birthday);//弹出时间选择器,传递参数过去,回调的时候则可以绑定此view | ||
| 88 | break; | ||
| 89 | case R.id.tv_useinfo_school: | ||
| 90 | AlertUtils.showToast(getActivity(),"正在开发"); | ||
| 91 | break; | ||
| 92 | case R.id.tv_useinfo_gender: | ||
| 93 | AlertUtils.showToast(getActivity(),"正在开发"); | ||
| 94 | break; | ||
| 95 | } | ||
| 96 | } | ||
| 97 | //自定义时间选择器 | ||
| 98 | private void initTimePicker() { | ||
| 99 | //控制时间范围(如果不设置范围,则使用默认时间1900-2100年,此段代码可注释) | ||
| 100 | //因为系统Calendar的月份是从0-11的,所以如果是调用Calendar的set方法来设置时间,月份的范围也要是从0-11 | ||
| 101 | // Calendar selectedDate = Calendar.getInstance(); | ||
| 102 | // Calendar startDate = Calendar.getInstance(); | ||
| 103 | // startDate.set(1900, 1, 1); | ||
| 104 | // Calendar endDate = Calendar.getInstance(); | ||
| 105 | // endDate.set(2100, 1, 1); | ||
| 106 | //时间选择器 | ||
| 107 | pvTime = new TimePickerView.Builder(getActivity(), new TimePickerView.OnTimeSelectListener() { | ||
| 108 | @Override | ||
| 109 | public void onTimeSelect(Date date, View v) {//选中事件回调 | ||
| 110 | // 这里回调过来的v,就是show()方法里面所添加的 View 参数,如果show的时候没有添加参数,v则为null | ||
| 111 | /*btn_Time.setText(getTime(date));*/ | ||
| 112 | TextView btn = (TextView) v; | ||
| 113 | btn.setText(getTime(date)); | ||
| 114 | } | ||
| 115 | }) | ||
| 116 | //年月日时分秒 的显示与否,不设置则默认全部显示 | ||
| 117 | .setType(new boolean[]{true, true, true, false, false, false}) | ||
| 118 | .setLabel("", "", "", "", "", "") | ||
| 119 | .isCenterLabel(false) | ||
| 120 | .setDividerColor(Color.DKGRAY) | ||
| 121 | .setContentSize(21) | ||
| 122 | // .setDate(selectedDate) | ||
| 123 | // .setRangDate(startDate, endDate) | ||
| 124 | .setBackgroundId(0x80000000) //设置外部遮罩颜色 | ||
| 125 | .setDecorView(null) | ||
| 126 | .setTitleText("购买日期") | ||
| 127 | .setTitleSize(22) | ||
| 128 | .setCancelColor(Color.GRAY) | ||
| 129 | .setSubCalSize(22) | ||
| 130 | .setDividerColor(Color.GRAY) | ||
| 131 | .setSubmitColor(Color.GRAY) | ||
| 132 | .build(); | ||
| 133 | } | ||
| 134 | private String getTime(Date date) {//可根据需要自行截取数据显示 | ||
| 135 | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 136 | return format.format(date); | ||
| 137 | } | ||
| 50 | } | 138 | } |
| 51 | 139 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/RegisterFragment.java
| 1 | package com.hjx.personalcenter.fragment; | 1 | package com.hjx.personalcenter.fragment; |
| 2 | 2 | ||
| 3 | import android.content.Intent; | 3 | import android.content.Intent; |
| 4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 5 | import android.os.Handler; | 5 | import android.os.Handler; |
| 6 | import android.os.Message; | 6 | import android.os.Message; |
| 7 | import android.support.annotation.Nullable; | 7 | import android.support.annotation.Nullable; |
| 8 | import android.support.v4.app.Fragment; | 8 | import android.support.v4.app.Fragment; |
| 9 | import android.text.TextUtils; | 9 | import android.text.TextUtils; |
| 10 | import android.text.method.HideReturnsTransformationMethod; | 10 | import android.text.method.HideReturnsTransformationMethod; |
| 11 | import android.text.method.PasswordTransformationMethod; | 11 | import android.text.method.PasswordTransformationMethod; |
| 12 | import android.view.LayoutInflater; | 12 | import android.view.LayoutInflater; |
| 13 | import android.view.View; | 13 | import android.view.View; |
| 14 | import android.view.ViewGroup; | 14 | import android.view.ViewGroup; |
| 15 | import android.widget.Button; | 15 | import android.widget.Button; |
| 16 | import android.widget.EditText; | 16 | import android.widget.EditText; |
| 17 | import android.widget.ImageView; | 17 | import android.widget.ImageView; |
| 18 | 18 | ||
| 19 | import com.hjx.personalcenter.R; | 19 | import com.hjx.personalcenter.R; |
| 20 | import com.hjx.personalcenter.activity.RegisterInfoActivity; | 20 | import com.hjx.personalcenter.activity.RegisterInfoActivity; |
| 21 | import com.hjx.personalcenter.http.HttpCode; | 21 | import com.hjx.personalcenter.http.HttpCode; |
| 22 | import com.hjx.personalcenter.http.HttpManager; | 22 | import com.hjx.personalcenter.http.HttpManager; |
| 23 | import com.hjx.personalcenter.util.AlertUtils; | 23 | import com.hjx.personalcenter.util.AlertUtils; |
| 24 | import com.hjx.personalcenter.util.PasswordCheckUtils; | 24 | import com.hjx.personalcenter.util.PasswordCheckUtils; |
| 25 | import com.hjx.personalcenter.util.PhoneNumCheckUtils; | 25 | import com.hjx.personalcenter.util.PhoneNumCheckUtils; |
| 26 | 26 | ||
| 27 | import org.json.JSONException; | 27 | import org.json.JSONException; |
| 28 | import org.json.JSONObject; | 28 | import org.json.JSONObject; |
| 29 | 29 | ||
| 30 | /** | 30 | /** |
| 31 | * 注册 | 31 | * 注册 |
| 32 | * Created by Administrator on 2016/11/7. | 32 | * Created by Administrator on 2016/11/7. |
| 33 | */ | 33 | */ |
| 34 | 34 | ||
| 35 | public class RegisterFragment extends Fragment implements View.OnClickListener { | 35 | public class RegisterFragment extends Fragment implements View.OnClickListener { |
| 36 | private View mView; | 36 | private View mView; |
| 37 | 37 | ||
| 38 | private Button btn_register,get_authcode; | 38 | private Button btn_register,get_authcode; |
| 39 | private EditText phonenumber,password,anth_6num;//;//密码 | 39 | private EditText phonenumber,password,anth_6num;//;//密码 |
| 40 | private ImageView openeyes; | 40 | private ImageView openeyes; |
| 41 | private String sourceStr ="android"; | 41 | private String sourceStr ="android"; |
| 42 | private String typeStr = "register"; | 42 | private String typeStr = "register"; |
| 43 | private int i = 0; | 43 | private int i = 0; |
| 44 | private Thread thread; | 44 | private Thread thread; |
| 45 | private int type; | 45 | private int type; |
| 46 | public static Boolean showPassword = false; | 46 | public static Boolean showPassword = false; |
| 47 | public static String TABLAYOUT_FRAGMENT = "tab_fragment"; | 47 | public static String TABLAYOUT_FRAGMENT = "tab_fragment"; |
| 48 | 48 | ||
| 49 | public static RegisterFragment newInstance(int type) { | 49 | public static RegisterFragment newInstance(int type) { |
| 50 | RegisterFragment fragment = new RegisterFragment(); | 50 | RegisterFragment fragment = new RegisterFragment(); |
| 51 | Bundle bundle = new Bundle(); | 51 | Bundle bundle = new Bundle(); |
| 52 | bundle.putSerializable(TABLAYOUT_FRAGMENT, type); | 52 | bundle.putSerializable(TABLAYOUT_FRAGMENT, type); |
| 53 | fragment.setArguments(bundle); | 53 | fragment.setArguments(bundle); |
| 54 | return fragment; | 54 | return fragment; |
| 55 | 55 | ||
| 56 | } | 56 | } |
| 57 | Handler handler = new Handler() { | 57 | Handler handler = new Handler() { |
| 58 | @Override | 58 | @Override |
| 59 | public void handleMessage(Message msg) { | 59 | public void handleMessage(Message msg) { |
| 60 | super.handleMessage(msg); | 60 | super.handleMessage(msg); |
| 61 | try { | 61 | try { |
| 62 | JSONObject jsonObject; | 62 | JSONObject jsonObject; |
| 63 | String status; | 63 | String status; |
| 64 | switch (msg.what) { | 64 | switch (msg.what) { |
| 65 | case HttpCode.REGISTERED_SUCESS: | 65 | case HttpCode.REGISTERED_SUCESS: |
| 66 | jsonObject = (JSONObject) msg.obj; | 66 | jsonObject = (JSONObject) msg.obj; |
| 67 | status = jsonObject.getString("status"); | 67 | status = jsonObject.getString("status"); |
| 68 | //AlertUtils.showToast(RegisterActivity.this, jsonObject.optString("message")); | 68 | //AlertUtils.showToast(RegisterActivity.this, jsonObject.optString("message")); |
| 69 | String access_token = jsonObject.getString("access_token"); | 69 | String access_token = jsonObject.getString("access_token"); |
| 70 | String userId = jsonObject.getString("userId"); | 70 | String userId = jsonObject.getString("userId"); |
| 71 | if (status.equals("100")) { | 71 | if (status.equals("100")) { |
| 72 | String usernameStr = phonenumber.getText().toString().trim(); | 72 | String usernameStr = phonenumber.getText().toString().trim(); |
| 73 | String passwordStr = password.getText().toString().trim(); | 73 | String passwordStr = password.getText().toString().trim(); |
| 74 | //HttpManager.getInstance().saveLoginInfo(usernameStr,passwordStr,access_token,"true",userId); | 74 | HttpManager.getInstance().saveLoginInfo(getActivity(),usernameStr,passwordStr,access_token,"true",userId); |
| 75 | AlertUtils.showToast(getActivity(), "注册成功!"); | 75 | AlertUtils.showToast(getActivity(), "注册成功!"); |
| 76 | Intent intent = new Intent(); | 76 | Intent intent = new Intent(); |
| 77 | intent.setClass(getActivity(),RegisterInfoActivity.class); | 77 | intent.setClass(getActivity(),RegisterInfoActivity.class); |
| 78 | startActivity(intent); | 78 | startActivity(intent); |
| 79 | getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); | 79 | getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 80 | getActivity().finish(); | 80 | getActivity().finish(); |
| 81 | } | 81 | } |
| 82 | break; | 82 | break; |
| 83 | case HttpCode.REGISTERED_FAIL: | 83 | case HttpCode.REGISTERED_FAIL: |
| 84 | AlertUtils.showToast(getActivity(), "注册失败"); | 84 | AlertUtils.showToast(getActivity(), "注册失败"); |
| 85 | break; | 85 | break; |
| 86 | case HttpCode.AUTHCODE_SUCESS: | 86 | case HttpCode.AUTHCODE_SUCESS: |
| 87 | jsonObject = (JSONObject) msg.obj; | 87 | jsonObject = (JSONObject) msg.obj; |
| 88 | status = jsonObject.optString("status"); | 88 | status = jsonObject.optString("status"); |
| 89 | if (status.equals("100")) { | 89 | if (status.equals("100")) { |
| 90 | AlertUtils.showToast(getActivity(), "验证码发送成功"); | 90 | AlertUtils.showToast(getActivity(), "验证码发送成功"); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | break; | 93 | break; |
| 94 | case HttpCode.AUTHCODE_FAIL: | 94 | case HttpCode.AUTHCODE_FAIL: |
| 95 | jsonObject = (JSONObject) msg.obj; | 95 | jsonObject = (JSONObject) msg.obj; |
| 96 | AlertUtils.showToast(getActivity(), "验证码发送失败"); | 96 | AlertUtils.showToast(getActivity(), "验证码发送失败"); |
| 97 | break; | 97 | break; |
| 98 | case HttpCode.IS_REFISTER: | 98 | case HttpCode.IS_REFISTER: |
| 99 | jsonObject = (JSONObject) msg.obj; | 99 | jsonObject = (JSONObject) msg.obj; |
| 100 | status = jsonObject.getString("status"); | 100 | status = jsonObject.getString("status"); |
| 101 | if (!status.equals("true")) { | 101 | if (!status.equals("true")) { |
| 102 | getauthcode(); | 102 | getauthcode(); |
| 103 | 103 | ||
| 104 | }else { | 104 | }else { |
| 105 | AlertUtils.showToast(getActivity(), "该手机号已经注册过了"); | 105 | AlertUtils.showToast(getActivity(), "该手机号已经注册过了"); |
| 106 | } | 106 | } |
| 107 | break; | 107 | break; |
| 108 | case 1: | 108 | case 1: |
| 109 | get_authcode.setEnabled(false); | 109 | get_authcode.setEnabled(false); |
| 110 | get_authcode.setClickable(false); | 110 | get_authcode.setClickable(false); |
| 111 | get_authcode.setText(Integer.toString(i--)+" s"); | 111 | get_authcode.setText(Integer.toString(i--)+" s"); |
| 112 | if (i<=0){ | 112 | if (i<=0){ |
| 113 | get_authcode.setEnabled(true); | 113 | get_authcode.setEnabled(true); |
| 114 | get_authcode.setClickable(true); | 114 | get_authcode.setClickable(true); |
| 115 | get_authcode.setText("获取验证码"); | 115 | get_authcode.setText("获取验证码"); |
| 116 | } | 116 | } |
| 117 | break; | 117 | break; |
| 118 | } | 118 | } |
| 119 | } catch (JSONException e) { | 119 | } catch (JSONException e) { |
| 120 | e.printStackTrace(); | 120 | e.printStackTrace(); |
| 121 | } | 121 | } |
| 122 | } | 122 | } |
| 123 | }; | 123 | }; |
| 124 | @Override | 124 | @Override |
| 125 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | 125 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
| 126 | if (mView == null) { | 126 | if (mView == null) { |
| 127 | mView = inflater.inflate(R.layout.fragment_loginandregister_register, container, false); | 127 | mView = inflater.inflate(R.layout.fragment_loginandregister_register, container, false); |
| 128 | initView(mView); | 128 | initView(mView); |
| 129 | initData(); | 129 | initData(); |
| 130 | setLister(); | 130 | setLister(); |
| 131 | 131 | ||
| 132 | 132 | ||
| 133 | } | 133 | } |
| 134 | return mView; | 134 | return mView; |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | private void initView(View mView) { | 137 | private void initView(View mView) { |
| 138 | get_authcode = (Button) mView.findViewById(R.id.btn_authcode); | 138 | get_authcode = (Button) mView.findViewById(R.id.btn_authcode); |
| 139 | anth_6num = (EditText) mView.findViewById(R.id.et_authcode); | 139 | anth_6num = (EditText) mView.findViewById(R.id.et_authcode); |
| 140 | phonenumber = (EditText) mView.findViewById(R.id.et_phonenumber); | 140 | phonenumber = (EditText) mView.findViewById(R.id.et_phonenumber); |
| 141 | password = (EditText) mView.findViewById(R.id.et_password); | 141 | password = (EditText) mView.findViewById(R.id.et_password); |
| 142 | openeyes= (ImageView) mView.findViewById(R.id.iv_pwd_change); | 142 | openeyes= (ImageView) mView.findViewById(R.id.iv_pwd_change); |
| 143 | btn_register = (Button) mView.findViewById(R.id.btn_register); | 143 | btn_register = (Button) mView.findViewById(R.id.btn_register); |
| 144 | 144 | ||
| 145 | } | 145 | } |
| 146 | private void initData() { | 146 | private void initData() { |
| 147 | } | 147 | } |
| 148 | private void setLister() { | 148 | private void setLister() { |
| 149 | get_authcode.setOnClickListener(this); | 149 | get_authcode.setOnClickListener(this); |
| 150 | openeyes.setOnClickListener(this); | 150 | openeyes.setOnClickListener(this); |
| 151 | btn_register.setOnClickListener(this); | 151 | btn_register.setOnClickListener(this); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | 154 | ||
| 155 | @Override | 155 | @Override |
| 156 | public void onClick(View v) { | 156 | public void onClick(View v) { |
| 157 | switch (v.getId()){ | 157 | switch (v.getId()){ |
| 158 | case R.id.btn_register: | 158 | case R.id.btn_register: |
| 159 | //测试 | 159 | //测试 |
| 160 | Intent intent = new Intent(); | 160 | Intent intent = new Intent(); |
| 161 | intent.setClass(getActivity(),RegisterInfoActivity.class); | 161 | intent.setClass(getActivity(),RegisterInfoActivity.class); |
| 162 | startActivity(intent); | 162 | startActivity(intent); |
| 163 | getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); | 163 | getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 164 | getActivity().finish(); | 164 | getActivity().finish(); |
| 165 | 165 | ||
| 166 | String usernameStr = phonenumber.getText().toString().trim(); | 166 | String usernameStr = phonenumber.getText().toString().trim(); |
| 167 | String authcodeStr = anth_6num.getText().toString().trim(); | 167 | String authcodeStr = anth_6num.getText().toString().trim(); |
| 168 | String passwordStr = password.getText().toString().trim(); | 168 | String passwordStr = password.getText().toString().trim(); |
| 169 | if (TextUtils.isEmpty(usernameStr) || TextUtils.isEmpty(authcodeStr)||TextUtils.isEmpty(passwordStr)) { | 169 | if (TextUtils.isEmpty(usernameStr) || TextUtils.isEmpty(authcodeStr)||TextUtils.isEmpty(passwordStr)) { |
| 170 | AlertUtils.showToast(getActivity(), "手机号,密码和验证码不能为空"); | 170 | AlertUtils.showToast(getActivity(), "手机号,密码和验证码不能为空"); |
| 171 | return; | 171 | return; |
| 172 | } else if(passwordStr.length()<8){ | 172 | } else if(passwordStr.length()<8){ |
| 173 | AlertUtils.showToast(getActivity(), "密码不能少于8位"); | 173 | AlertUtils.showToast(getActivity(), "密码不能少于8位"); |
| 174 | }else if (!PhoneNumCheckUtils.isPhone(usernameStr)){ | 174 | }else if (!PhoneNumCheckUtils.isPhone(usernameStr)){ |
| 175 | AlertUtils.showToast(getActivity(), "手机号码输入错误"); | 175 | AlertUtils.showToast(getActivity(), "手机号码输入错误"); |
| 176 | 176 | ||
| 177 | }else if(!passwordStr.matches(PasswordCheckUtils.PASSWORD_CHAR_AND_NUMBER)){ | 177 | }else if(!passwordStr.matches(PasswordCheckUtils.PASSWORD_CHAR_AND_NUMBER)){ |
| 178 | AlertUtils.showToast(getActivity(), "密码由英文和数字组成"); | 178 | AlertUtils.showToast(getActivity(), "密码由英文和数字组成"); |
| 179 | }else { | 179 | }else { |
| 180 | register(); | 180 | register(); |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | break; | 183 | break; |
| 184 | case R.id.iv_pwd_change: | 184 | case R.id.iv_pwd_change: |
| 185 | if(showPassword){//显示密码 | 185 | if(showPassword){//显示密码 |
| 186 | showPassword = !showPassword; | 186 | showPassword = !showPassword; |
| 187 | openeyes.setImageResource(R.mipmap.pwd_open); | 187 | openeyes.setImageResource(R.mipmap.pwd_open); |
| 188 | password.setTransformationMethod(HideReturnsTransformationMethod.getInstance()); | 188 | password.setTransformationMethod(HideReturnsTransformationMethod.getInstance()); |
| 189 | password.setSelection(password.getText().toString().length()); | 189 | password.setSelection(password.getText().toString().length()); |
| 190 | }else{//隐藏密码 | 190 | }else{//隐藏密码 |
| 191 | showPassword = !showPassword; | 191 | showPassword = !showPassword; |
| 192 | openeyes.setImageResource(R.mipmap.pwd_hide); | 192 | openeyes.setImageResource(R.mipmap.pwd_hide); |
| 193 | password.setTransformationMethod(PasswordTransformationMethod.getInstance()); | 193 | password.setTransformationMethod(PasswordTransformationMethod.getInstance()); |
| 194 | password.setSelection(password.getText().toString().length()); | 194 | password.setSelection(password.getText().toString().length()); |
| 195 | } | 195 | } |
| 196 | break; | 196 | break; |
| 197 | case R.id.btn_authcode: | 197 | case R.id.btn_authcode: |
| 198 | usernameStr = phonenumber.getText().toString().trim(); | 198 | usernameStr = phonenumber.getText().toString().trim(); |
| 199 | if (!PhoneNumCheckUtils.isPhone(usernameStr)){ | 199 | if (!PhoneNumCheckUtils.isPhone(usernameStr)){ |
| 200 | AlertUtils.showToast(getActivity(), "请输入正确的手机号"); | 200 | AlertUtils.showToast(getActivity(), "请输入正确的手机号"); |
| 201 | }else { | 201 | }else { |
| 202 | anth_6num.requestFocus(); | 202 | anth_6num.requestFocus(); |
| 203 | ifregister(); | 203 | ifregister(); |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | break; | 206 | break; |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | } | 209 | } |
| 210 | //获取验证码 | 210 | //获取验证码 |
| 211 | private void getauthcode() { | 211 | private void getauthcode() { |
| 212 | String usernameStr = phonenumber.getText().toString().trim(); | 212 | String usernameStr = phonenumber.getText().toString().trim(); |
| 213 | HttpManager.getInstance().authCode(typeStr, usernameStr, handler, getActivity()); | 213 | HttpManager.getInstance().authCode(typeStr, usernameStr, handler, getActivity()); |
| 214 | i = 60; | 214 | i = 60; |
| 215 | if(thread == null){ | 215 | if(thread == null){ |
| 216 | thread = new Thread( new ThreadShow()); | 216 | thread = new Thread( new ThreadShow()); |
| 217 | thread.start(); | 217 | thread.start(); |
| 218 | } | 218 | } |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | private void ifregister() { | 221 | private void ifregister() { |
| 222 | String usernameStr = phonenumber.getText().toString().trim(); | 222 | String usernameStr = phonenumber.getText().toString().trim(); |
| 223 | HttpManager.getInstance().isregistered(usernameStr, handler, getActivity()); | 223 | HttpManager.getInstance().isregistered(usernameStr, handler, getActivity()); |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | private void register() { | 226 | private void register() { |
| 227 | String usernameStr = phonenumber.getText().toString().trim(); | 227 | String usernameStr = phonenumber.getText().toString().trim(); |
| 228 | String authcodeStr = anth_6num.getText().toString().trim(); | 228 | String authcodeStr = anth_6num.getText().toString().trim(); |
| 229 | String passwordStr = password.getText().toString().trim(); | 229 | String passwordStr = password.getText().toString().trim(); |
| 230 | HttpManager.getInstance().register(getActivity(), usernameStr, passwordStr, authcodeStr, sourceStr,handler); | 230 | HttpManager.getInstance().register(getActivity(), usernameStr, passwordStr, authcodeStr, sourceStr,handler); |
| 231 | } | 231 | } |
| 232 | // 线程类 定时器 | 232 | // 线程类 定时器 |
| 233 | class ThreadShow implements Runnable { | 233 | class ThreadShow implements Runnable { |
| 234 | 234 | ||
| 235 | @Override | 235 | @Override |
| 236 | public void run() { | 236 | public void run() { |
| 237 | // TODO Auto-generated method stub | 237 | // TODO Auto-generated method stub |
| 238 | while (true) { | 238 | while (true) { |
| 239 | try { | 239 | try { |
| 240 | Thread.sleep(1000); | 240 | Thread.sleep(1000); |
| 241 | Message msg = new Message(); | 241 | Message msg = new Message(); |
| 242 | msg.what = 1; | 242 | msg.what = 1; |
| 243 | handler.sendMessage(msg); | 243 | handler.sendMessage(msg); |
| 244 | System.out.println("send..."); | 244 | System.out.println("send..."); |
| 245 | } catch (Exception e) { | 245 | } catch (Exception e) { |
| 246 | // TODO Auto-generated catch block | 246 | // TODO Auto-generated catch block |
| 247 | e.printStackTrace(); | 247 | e.printStackTrace(); |
| 248 | System.out.println("thread error..."); | 248 | System.out.println("thread error..."); |
| 249 | } | 249 | } |
| 250 | } | 250 | } |
| 251 | } | 251 | } |
| 252 | } | 252 | } |
| 253 | } | 253 | } |
| 254 | 254 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/http/HttpManager.java
| 1 | package com.hjx.personalcenter.http; | 1 | package com.hjx.personalcenter.http; |
| 2 | 2 | ||
| 3 | import android.app.Activity; | 3 | import android.app.Activity; |
| 4 | import android.app.ProgressDialog; | 4 | import android.app.ProgressDialog; |
| 5 | import android.content.ComponentName; | ||
| 5 | import android.content.Context; | 6 | import android.content.Context; |
| 6 | import android.content.Intent; | 7 | import android.content.Intent; |
| 7 | import android.os.Handler; | 8 | import android.os.Handler; |
| 8 | import android.os.Message; | 9 | import android.os.Message; |
| 10 | import android.provider.Settings; | ||
| 11 | import android.support.v4.app.FragmentActivity; | ||
| 9 | import android.util.Log; | 12 | import android.util.Log; |
| 13 | import android.view.Gravity; | ||
| 14 | import android.view.View; | ||
| 10 | import android.widget.Toast; | 15 | import android.widget.Toast; |
| 11 | 16 | ||
| 12 | import com.google.gson.Gson; | 17 | import com.google.gson.Gson; |
| 13 | import com.hjx.personalcenter.R; | 18 | import com.hjx.personalcenter.R; |
| 14 | import com.hjx.personalcenter.activity.LoginAndRegisterActivity; | 19 | import com.hjx.personalcenter.activity.LoginAndRegisterActivity; |
| 15 | import com.hjx.personalcenter.activity.TheStartPageActivity; | 20 | import com.hjx.personalcenter.activity.TheStartPageActivity; |
| 16 | import com.hjx.personalcenter.db.SaveParam; | 21 | import com.hjx.personalcenter.db.SaveParam; |
| 17 | import com.hjx.personalcenter.gson.GsonTool; | 22 | import com.hjx.personalcenter.gson.GsonTool; |
| 18 | import com.hjx.personalcenter.model.CityInfo; | 23 | import com.hjx.personalcenter.model.CityInfo; |
| 19 | import com.hjx.personalcenter.model.CountyInfo; | 24 | import com.hjx.personalcenter.model.CountyInfo; |
| 20 | import com.hjx.personalcenter.model.ProvinceInfo; | 25 | import com.hjx.personalcenter.model.ProvinceInfo; |
| 21 | import com.hjx.personalcenter.util.DialogPermission; | 26 | import com.hjx.personalcenter.util.DialogPermission; |
| 22 | import com.loopj.android.http.AsyncHttpResponseHandler; | 27 | import com.loopj.android.http.AsyncHttpResponseHandler; |
| 23 | import com.loopj.android.http.JsonHttpResponseHandler; | 28 | import com.loopj.android.http.JsonHttpResponseHandler; |
| 24 | import com.loopj.android.http.RequestParams; | 29 | import com.loopj.android.http.RequestParams; |
| 30 | import com.mylhyl.circledialog.CircleDialog; | ||
| 31 | import com.mylhyl.circledialog.callback.ConfigText; | ||
| 32 | import com.mylhyl.circledialog.params.TextParams; | ||
| 25 | 33 | ||
| 26 | import org.apache.http.Header; | 34 | import org.apache.http.Header; |
| 27 | import org.apache.http.entity.ByteArrayEntity; | 35 | import org.apache.http.entity.ByteArrayEntity; |
| 28 | import org.apache.http.message.BasicHeader; | 36 | import org.apache.http.message.BasicHeader; |
| 29 | import org.apache.http.protocol.HTTP; | 37 | import org.apache.http.protocol.HTTP; |
| 30 | import org.json.JSONException; | 38 | import org.json.JSONException; |
| 31 | import org.json.JSONObject; | 39 | import org.json.JSONObject; |
| 32 | 40 | ||
| 33 | import java.io.UnsupportedEncodingException; | 41 | import java.io.UnsupportedEncodingException; |
| 34 | 42 | ||
| 35 | public class HttpManager { | 43 | public class HttpManager { |
| 36 | private static HttpManager instance; | 44 | private static HttpManager instance; |
| 37 | private ProgressDialog mProgress = null; | 45 | private ProgressDialog mProgress = null; |
| 38 | 46 | ||
| 39 | public static HttpManager getInstance() { | 47 | public static HttpManager getInstance() { |
| 40 | if (instance == null) { | 48 | if (instance == null) { |
| 41 | instance = new HttpManager(); | 49 | instance = new HttpManager(); |
| 42 | } | 50 | } |
| 43 | return instance; | 51 | return instance; |
| 44 | } | 52 | } |
| 45 | 53 | ||
| 46 | 54 | ||
| 47 | //登录接口 | 55 | //登录接口 |
| 48 | 56 | ||
| 49 | public void login(final String username, final String password, final Context mContext) { | 57 | public void login(final String username, final String password, final Context mContext) { |
| 50 | mProgress = DialogPermission.showProgress(mContext, null, "正在登录...", | 58 | mProgress = DialogPermission.showProgress(mContext, null, "正在登录...", |
| 51 | false, true, null); | 59 | false, true, null); |
| 52 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); | 60 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
| 53 | HttpClient.getInstance().get(HttpUrl.loginUrl + "?username=" + username + "&password=" + password, new AsyncHttpResponseHandler() { | 61 | HttpClient.getInstance().get(HttpUrl.loginUrl + "?username=" + username + "&password=" + password, new AsyncHttpResponseHandler() { |
| 54 | @Override | 62 | @Override |
| 55 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { | 63 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
| 56 | 64 | ||
| 57 | String str = new String(arg2); | 65 | String str = new String(arg2); |
| 58 | JSONObject jsonObject = null; | 66 | JSONObject jsonObject = null; |
| 59 | try { | 67 | try { |
| 60 | jsonObject = new JSONObject(new String(arg2)); | 68 | jsonObject = new JSONObject(new String(arg2)); |
| 61 | String status = jsonObject.getString("status"); | 69 | String status = jsonObject.getString("status"); |
| 62 | if (status.equals("100")) { | 70 | if (status.equals("100")) { |
| 63 | String access_token = jsonObject.getString("access_token"); | 71 | String access_token = jsonObject.getString("access_token"); |
| 64 | String userId = jsonObject.getString("userId"); | 72 | String userId = jsonObject.getString("userId"); |
| 65 | // //登录成功,保存登录数据并且获取个人信息 | 73 | // //登录成功,保存登录数据并且获取个人信息 |
| 66 | saveLoginInfo(mContext, username, password, access_token, "true", userId); | 74 | saveLoginInfo(mContext, username, password, access_token, "true", userId); |
| 67 | //HttpManager.getInstance().getuserinfo(username,mContext); | 75 | //HttpManager.getInstance().getuserinfo(username,mContext); |
| 68 | 76 | ||
| 69 | } else if (status.equals("200")) { | 77 | } else if (status.equals("200")) { |
| 70 | closeProgress(); | 78 | closeProgress(); |
| 71 | Toast.makeText(mContext, "用户名不存在!", Toast.LENGTH_LONG).show(); | 79 | Toast.makeText(mContext, "用户名不存在!", Toast.LENGTH_LONG).show(); |
| 72 | return; | 80 | return; |
| 73 | } else if (status.equals("204")) { | 81 | } else if (status.equals("204")) { |
| 74 | closeProgress(); | 82 | closeProgress(); |
| 75 | Toast.makeText(mContext, "密码错误!", Toast.LENGTH_LONG).show(); | 83 | Toast.makeText(mContext, "密码错误!", Toast.LENGTH_LONG).show(); |
| 76 | } else { | 84 | } else { |
| 77 | closeProgress(); | 85 | closeProgress(); |
| 78 | Toast.makeText(mContext, "登录失败!请检查网络", Toast.LENGTH_LONG).show(); | 86 | Toast.makeText(mContext, "登录失败!请检查网络", Toast.LENGTH_LONG).show(); |
| 79 | 87 | ||
| 80 | 88 | ||
| 81 | } | 89 | } |
| 82 | } catch (JSONException e) { | 90 | } catch (JSONException e) { |
| 83 | e.printStackTrace(); | 91 | e.printStackTrace(); |
| 84 | } | 92 | } |
| 85 | 93 | ||
| 86 | 94 | ||
| 87 | } | 95 | } |
| 88 | 96 | ||
| 89 | @Override | 97 | @Override |
| 90 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { | 98 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { |
| 91 | closeProgress(); | 99 | closeProgress(); |
| 92 | Toast.makeText(mContext, "请检查网络。。" + arg3, Toast.LENGTH_LONG).show(); | 100 | new CircleDialog.Builder((FragmentActivity) mContext) |
| 101 | .setCanceledOnTouchOutside(false) | ||
| 102 | .setCancelable(false) | ||
| 103 | .setWidth(0.5f) | ||
| 104 | .configText(new ConfigText() { | ||
| 105 | @Override | ||
| 106 | public void onConfig(TextParams params) { | ||
| 107 | params.gravity = Gravity.CENTER; | ||
| 108 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 109 | } | ||
| 110 | }) | ||
| 111 | .setText("当前无网络,请检查网络设置") | ||
| 112 | .setNegative("继续使用", null) | ||
| 113 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 114 | @Override | ||
| 115 | public void onClick(View v) { | ||
| 116 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 117 | mContext.startActivity(intent); | ||
| 118 | } | ||
| 119 | }) | ||
| 120 | .show(); | ||
| 93 | } | 121 | } |
| 94 | }); | 122 | }); |
| 95 | } | 123 | } |
| 96 | 124 | ||
| 97 | //注册接口 | 125 | //注册接口 |
| 98 | public void register(final Context context, String username, String password, String smscode, String source, final Handler handler) { | 126 | public void register(final Context context, String username, String password, String smscode, String source, final Handler handler) { |
| 99 | mProgress = DialogPermission.showProgress(context, null, "正在注册...", | 127 | mProgress = DialogPermission.showProgress(context, null, "正在注册...", |
| 100 | false, true, null); | 128 | false, true, null); |
| 101 | JSONObject jsonObject = new JSONObject(); | 129 | JSONObject jsonObject = new JSONObject(); |
| 102 | ByteArrayEntity entity = null; | 130 | ByteArrayEntity entity = null; |
| 103 | try { | 131 | try { |
| 104 | jsonObject.put(HttpKey.USERNAME, username); | 132 | jsonObject.put(HttpKey.USERNAME, username); |
| 105 | jsonObject.put(HttpKey.PASSWORD, password); | 133 | jsonObject.put(HttpKey.PASSWORD, password); |
| 106 | jsonObject.put(HttpKey.SMSCODE, smscode); | 134 | jsonObject.put(HttpKey.SMSCODE, smscode); |
| 107 | jsonObject.put(HttpKey.SOURCE, source); | 135 | jsonObject.put(HttpKey.SOURCE, source); |
| 108 | Log.e("test", "jsonObject" + jsonObject); | 136 | Log.e("test", "jsonObject" + jsonObject); |
| 109 | entity = new ByteArrayEntity(jsonObject.toString().getBytes("UTF-8")); | 137 | entity = new ByteArrayEntity(jsonObject.toString().getBytes("UTF-8")); |
| 110 | entity.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); | 138 | entity.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); |
| 111 | } catch (JSONException e) { | 139 | } catch (JSONException e) { |
| 112 | e.printStackTrace(); | 140 | e.printStackTrace(); |
| 113 | } catch (UnsupportedEncodingException e) { | 141 | } catch (UnsupportedEncodingException e) { |
| 114 | e.printStackTrace(); | 142 | e.printStackTrace(); |
| 115 | } | 143 | } |
| 116 | HttpClient.getInstance().addHeader("Accept", "*/*"); | 144 | HttpClient.getInstance().addHeader("Accept", "*/*"); |
| 117 | HttpClient.getInstance().post(context, HttpUrl.registeredUrl, entity, "application/json", new JsonHttpResponseHandler() { | 145 | HttpClient.getInstance().post(context, HttpUrl.registeredUrl, entity, "application/json", new JsonHttpResponseHandler() { |
| 118 | @Override | 146 | @Override |
| 119 | public void onSuccess(int statusCode, Header[] headers, JSONObject response) { | 147 | public void onSuccess(int statusCode, Header[] headers, JSONObject response) { |
| 120 | super.onSuccess(statusCode, headers, response); | 148 | super.onSuccess(statusCode, headers, response); |
| 121 | closeProgress(); | 149 | closeProgress(); |
| 122 | Log.e("test", "onSuccess" + response); | 150 | Log.e("test", "onSuccess" + response); |
| 123 | Message msg = Message.obtain(); | 151 | Message msg = Message.obtain(); |
| 124 | msg.what = HttpCode.REGISTERED_SUCESS; | 152 | msg.what = HttpCode.REGISTERED_SUCESS; |
| 125 | msg.obj = response; | 153 | msg.obj = response; |
| 126 | handler.sendMessage(msg); | 154 | handler.sendMessage(msg); |
| 127 | 155 | ||
| 128 | } | 156 | } |
| 129 | 157 | ||
| 130 | @Override | 158 | @Override |
| 131 | public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) { | 159 | public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) { |
| 132 | super.onFailure(statusCode, headers, throwable, errorResponse); | 160 | super.onFailure(statusCode, headers, throwable, errorResponse); |
| 133 | closeProgress(); | 161 | closeProgress(); |
| 134 | Log.e("test", "onFailure" + errorResponse); | 162 | Log.e("test", "onFailure" + errorResponse); |
| 135 | Toast.makeText(context, "请检查网络。。", Toast.LENGTH_LONG).show(); | 163 | new CircleDialog.Builder((FragmentActivity) context) |
| 164 | .setCanceledOnTouchOutside(false) | ||
| 165 | .setCancelable(false) | ||
| 166 | .setWidth(0.5f) | ||
| 167 | .configText(new ConfigText() { | ||
| 168 | @Override | ||
| 169 | public void onConfig(TextParams params) { | ||
| 170 | params.gravity = Gravity.CENTER; | ||
| 171 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 172 | } | ||
| 173 | }) | ||
| 174 | .setText("当前无网络,请检查网络设置") | ||
| 175 | .setNegative("继续使用", null) | ||
| 176 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 177 | @Override | ||
| 178 | public void onClick(View v) { | ||
| 179 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 180 | context.startActivity(intent); | ||
| 181 | } | ||
| 182 | }) | ||
| 183 | .show(); | ||
| 136 | } | 184 | } |
| 137 | 185 | ||
| 138 | }); | 186 | }); |
| 139 | } | 187 | } |
| 140 | 188 | ||
| 141 | //注册验证码 | 189 | //注册验证码 |
| 142 | public void authCode(final String type, final String mobile, final Handler handler, final Context mContext) { | 190 | public void authCode(final String type, final String mobile, final Handler handler, final Context mContext) { |
| 143 | RequestParams params = new RequestParams(); | 191 | RequestParams params = new RequestParams(); |
| 144 | params.put(HttpKey.TYPE, type); | 192 | params.put(HttpKey.TYPE, type); |
| 145 | params.put(HttpKey.MOBIL, mobile); | 193 | params.put(HttpKey.MOBIL, mobile); |
| 146 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); | 194 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
| 147 | HttpClient.getInstance().post(HttpUrl.authCodedUrl, params, new JsonHttpResponseHandler() { | 195 | HttpClient.getInstance().post(HttpUrl.authCodedUrl, params, new JsonHttpResponseHandler() { |
| 148 | 196 | ||
| 149 | @Override | 197 | @Override |
| 150 | public void onSuccess(int statusCode, Header[] headers, JSONObject response) { | 198 | public void onSuccess(int statusCode, Header[] headers, JSONObject response) { |
| 151 | Log.e("test", "onSuccess-----" + response); | 199 | Log.e("test", "onSuccess-----" + response); |
| 152 | Message msg = Message.obtain(); | 200 | Message msg = Message.obtain(); |
| 153 | msg.what = HttpCode.AUTHCODE_SUCESS; | 201 | msg.what = HttpCode.AUTHCODE_SUCESS; |
| 154 | msg.obj = response; | 202 | msg.obj = response; |
| 155 | handler.sendMessage(msg); | 203 | handler.sendMessage(msg); |
| 156 | } | 204 | } |
| 157 | 205 | ||
| 158 | @Override | 206 | @Override |
| 159 | public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) { | 207 | public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) { |
| 160 | Toast.makeText(mContext, "请检查网络。。" + errorResponse, Toast.LENGTH_LONG).show(); | 208 | new CircleDialog.Builder((FragmentActivity) mContext) |
| 209 | .setCanceledOnTouchOutside(false) | ||
| 210 | .setCancelable(false) | ||
| 211 | .setWidth(0.5f) | ||
| 212 | .configText(new ConfigText() { | ||
| 213 | @Override | ||
| 214 | public void onConfig(TextParams params) { | ||
| 215 | params.gravity = Gravity.CENTER; | ||
| 216 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 217 | } | ||
| 218 | }) | ||
| 219 | .setText("当前无网络,请检查网络设置") | ||
| 220 | .setNegative("继续使用", null) | ||
| 221 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 222 | @Override | ||
| 223 | public void onClick(View v) { | ||
| 224 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 225 | mContext.startActivity(intent); | ||
| 226 | } | ||
| 227 | }) | ||
| 228 | .show(); | ||
| 161 | } | 229 | } |
| 162 | }); | 230 | }); |
| 163 | } | 231 | } |
| 164 | 232 | ||
| 165 | 233 | ||
| 166 | //手机号是否注册 | 234 | //手机号是否注册 |
| 167 | public void isregistered(final String mobile, final Handler handler, final Context mContext) { | 235 | public void isregistered(final String mobile, final Handler handler, final Context mContext) { |
| 168 | RequestParams params = new RequestParams(); | 236 | RequestParams params = new RequestParams(); |
| 169 | params.put(HttpKey.USERNAME, mobile); | 237 | params.put(HttpKey.USERNAME, mobile); |
| 170 | HttpClient.getInstance().get(HttpUrl.isRegiterUrl + "?mobile=" + mobile, new JsonHttpResponseHandler() { | 238 | HttpClient.getInstance().get(HttpUrl.isRegiterUrl + "?mobile=" + mobile, new JsonHttpResponseHandler() { |
| 171 | @Override | 239 | @Override |
| 172 | public void onSuccess(int statusCode, Header[] headers, JSONObject response) { | 240 | public void onSuccess(int statusCode, Header[] headers, JSONObject response) { |
| 173 | Log.e("test", "isregistered" + response.toString()); | 241 | Log.e("test", "isregistered" + response.toString()); |
| 174 | Message msg = Message.obtain(); | 242 | Message msg = Message.obtain(); |
| 175 | msg.what = HttpCode.IS_REFISTER; | 243 | msg.what = HttpCode.IS_REFISTER; |
| 176 | msg.obj = response; | 244 | msg.obj = response; |
| 177 | handler.sendMessage(msg); | 245 | handler.sendMessage(msg); |
| 178 | 246 | ||
| 179 | } | 247 | } |
| 180 | 248 | ||
| 181 | @Override | 249 | @Override |
| 182 | public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) { | 250 | public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) { |
| 183 | Toast.makeText(mContext, "失敗" + errorResponse, Toast.LENGTH_LONG).show(); | 251 | new CircleDialog.Builder((FragmentActivity) mContext) |
| 252 | .setCanceledOnTouchOutside(false) | ||
| 253 | .setCancelable(false) | ||
| 254 | .setWidth(0.5f) | ||
| 255 | .configText(new ConfigText() { | ||
| 256 | @Override | ||
| 257 | public void onConfig(TextParams params) { | ||
| 258 | params.gravity = Gravity.CENTER; | ||
| 259 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 260 | } | ||
| 261 | }) | ||
| 262 | .setText("当前无网络,请检查网络设置") | ||
| 263 | .setNegative("继续使用", null) | ||
| 264 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 265 | @Override | ||
| 266 | public void onClick(View v) { | ||
| 267 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 268 | mContext.startActivity(intent); | ||
| 269 | } | ||
| 270 | }) | ||
| 271 | .show(); | ||
| 184 | 272 | ||
| 185 | } | 273 | } |
| 186 | }); | 274 | }); |
| 187 | } | 275 | } |
| 188 | 276 | ||
| 189 | //修改密码 | 277 | //修改密码 |
| 190 | public void changepwd(final Context context, String username, String old_pwd1, String newpassword3) { | 278 | public void changepwd(final Context context, String username, String old_pwd1, String newpassword3) { |
| 191 | RequestParams params = new RequestParams(); | 279 | RequestParams params = new RequestParams(); |
| 192 | params.put(HttpKey.USERNAME, username); | 280 | params.put(HttpKey.USERNAME, username); |
| 193 | params.put(HttpKey.OLDPASS, old_pwd1); | 281 | params.put(HttpKey.OLDPASS, old_pwd1); |
| 194 | params.put(HttpKey.NEWPASS, newpassword3); | 282 | params.put(HttpKey.NEWPASS, newpassword3); |
| 195 | HttpClient.getInstance().addHeader("Accept", "*/*"); | 283 | HttpClient.getInstance().addHeader("Accept", "*/*"); |
| 196 | HttpClient.getInstance().setTimeout(10 * 1000); | 284 | HttpClient.getInstance().setTimeout(10 * 1000); |
| 197 | HttpClient.getInstance().post(HttpUrl.changepassword, params, new AsyncHttpResponseHandler() { | 285 | HttpClient.getInstance().post(HttpUrl.changepassword, params, new AsyncHttpResponseHandler() { |
| 198 | @Override | 286 | @Override |
| 199 | public void onSuccess(int i, Header[] headers, byte[] bytes) { | 287 | public void onSuccess(int i, Header[] headers, byte[] bytes) { |
| 200 | try { | 288 | try { |
| 201 | JSONObject jsonObject = new JSONObject(new String(bytes)); | 289 | JSONObject jsonObject = new JSONObject(new String(bytes)); |
| 202 | String status = jsonObject.optString("status"); | 290 | String status = jsonObject.optString("status"); |
| 203 | if (status.equals("100")) { | 291 | if (status.equals("100")) { |
| 204 | Log.e("test", "onSuccess" + new String(bytes)); | 292 | Log.e("test", "onSuccess" + new String(bytes)); |
| 205 | Toast.makeText(context, "密码修改成功!", Toast.LENGTH_LONG).show(); | 293 | Toast.makeText(context, "密码修改成功!", Toast.LENGTH_LONG).show(); |
| 206 | SaveParam.getInstance().clearData((Activity) context); | 294 | SaveParam.getInstance().clearData((Activity) context); |
| 207 | Intent intent = new Intent(); | 295 | Intent intent = new Intent(); |
| 208 | intent.setClass(context, LoginAndRegisterActivity.class); | 296 | intent.setClass(context, LoginAndRegisterActivity.class); |
| 209 | ((Activity) context).startActivity(intent); | 297 | ((Activity) context).startActivity(intent); |
| 210 | ((Activity) context).finish(); | 298 | ((Activity) context).finish(); |
| 211 | } | 299 | } |
| 212 | } catch (JSONException e) { | 300 | } catch (JSONException e) { |
| 213 | e.printStackTrace(); | 301 | e.printStackTrace(); |
| 214 | } | 302 | } |
| 215 | } | 303 | } |
| 216 | 304 | ||
| 217 | @Override | 305 | @Override |
| 218 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) { | 306 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) { |
| 219 | Log.e("test", "onFailure" + new String(bytes)); | 307 | Log.e("test", "onFailure" + new String(bytes)); |
| 220 | Toast.makeText(context, "密码修改失败,请检查网络!", Toast.LENGTH_LONG).show(); | 308 | new CircleDialog.Builder((FragmentActivity) context) |
| 221 | onFinish(); | 309 | .setCanceledOnTouchOutside(false) |
| 310 | .setCancelable(false) | ||
| 311 | .setWidth(0.5f) | ||
| 312 | .configText(new ConfigText() { | ||
| 313 | @Override | ||
| 314 | public void onConfig(TextParams params) { | ||
| 315 | params.gravity = Gravity.CENTER; | ||
| 316 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 317 | } | ||
| 318 | }) | ||
| 319 | .setText("当前无网络,请检查网络设置") | ||
| 320 | .setNegative("继续使用", null) | ||
| 321 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 322 | @Override | ||
| 323 | public void onClick(View v) { | ||
| 324 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 325 | context.startActivity(intent); | ||
| 326 | } | ||
| 327 | }) | ||
| 328 | .show(); | ||
| 222 | } | 329 | } |
| 223 | }); | 330 | }); |
| 224 | 331 | ||
| 225 | } | 332 | } |
| 226 | 333 | ||
| 227 | //忘记密码 | 334 | //忘记密码 |
| 228 | public void forgetpassword(final Context context, String forot_pwd_phone1, String forot_pwd_pwd3, String forot_pwd_anthcode1, Handler handler) { | 335 | public void forgetpassword(final Context context, String forot_pwd_phone1, String forot_pwd_pwd3, String forot_pwd_anthcode1, Handler handler) { |
| 229 | RequestParams params = new RequestParams(); | 336 | RequestParams params = new RequestParams(); |
| 230 | params.put(HttpKey.USERNAME, forot_pwd_phone1); | 337 | params.put(HttpKey.USERNAME, forot_pwd_phone1); |
| 231 | params.put(HttpKey.PASSWORD, forot_pwd_pwd3); | 338 | params.put(HttpKey.PASSWORD, forot_pwd_pwd3); |
| 232 | params.put(HttpKey.AUTHCODE, forot_pwd_anthcode1); | 339 | params.put(HttpKey.AUTHCODE, forot_pwd_anthcode1); |
| 233 | HttpClient.getInstance().addHeader("Accept", "*/*"); | 340 | HttpClient.getInstance().addHeader("Accept", "*/*"); |
| 234 | HttpClient.getInstance().post(HttpUrl.forgetpassword, params, new AsyncHttpResponseHandler() { | 341 | HttpClient.getInstance().post(HttpUrl.forgetpassword, params, new AsyncHttpResponseHandler() { |
| 235 | @Override | 342 | @Override |
| 236 | public void onSuccess(int i, Header[] headers, byte[] bytes) { | 343 | public void onSuccess(int i, Header[] headers, byte[] bytes) { |
| 237 | try { | 344 | try { |
| 238 | JSONObject jsonObject = new JSONObject(new String(bytes)); | 345 | JSONObject jsonObject = new JSONObject(new String(bytes)); |
| 239 | String status = jsonObject.optString("status"); | 346 | String status = jsonObject.optString("status"); |
| 240 | if (status.equals("100")) { | 347 | if (status.equals("100")) { |
| 241 | Log.e("test", "onSuccess" + new String(bytes)); | 348 | Log.e("test", "onSuccess" + new String(bytes)); |
| 242 | Toast.makeText(context, "密码修改成功!", Toast.LENGTH_LONG).show(); | 349 | Toast.makeText(context, "密码修改成功!", Toast.LENGTH_LONG).show(); |
| 243 | ((Activity) context).finish(); | 350 | ((Activity) context).finish(); |
| 244 | } | 351 | } |
| 245 | } catch (JSONException e) { | 352 | } catch (JSONException e) { |
| 246 | e.printStackTrace(); | 353 | e.printStackTrace(); |
| 247 | } | 354 | } |
| 248 | } | 355 | } |
| 249 | 356 | ||
| 250 | @Override | 357 | @Override |
| 251 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) { | 358 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) { |
| 252 | Log.e("test", "onFailure" + new String(bytes)); | 359 | Log.e("test", "onFailure" + new String(bytes)); |
| 253 | Toast.makeText(context, "忘记密码修改失败,请检查网络!", Toast.LENGTH_LONG).show(); | 360 | new CircleDialog.Builder((FragmentActivity) context) |
| 361 | .setCanceledOnTouchOutside(false) | ||
| 362 | .setCancelable(false) | ||
| 363 | .setWidth(0.5f) | ||
| 364 | .configText(new ConfigText() { | ||
| 365 | @Override | ||
| 366 | public void onConfig(TextParams params) { | ||
| 367 | params.gravity = Gravity.CENTER; | ||
| 368 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 369 | } | ||
| 370 | }) | ||
| 371 | .setText("当前无网络,请检查网络设置") | ||
| 372 | .setNegative("继续使用", null) | ||
| 373 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 374 | @Override | ||
| 375 | public void onClick(View v) { | ||
| 376 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 377 | context.startActivity(intent); | ||
| 378 | } | ||
| 379 | }) | ||
| 380 | .show(); | ||
| 254 | } | 381 | } |
| 255 | }); | 382 | }); |
| 256 | 383 | ||
| 257 | } | 384 | } |
| 258 | 385 | ||
| 259 | //保存用户登录信息 | 386 | //保存用户登录信息 |
| 260 | public void saveLoginInfo(Context context, String username, String password, String access_token, String loginStatus, String userId) { | 387 | public void saveLoginInfo(Context context, String username, String password, String access_token, String loginStatus, String userId) { |
| 261 | SaveParam.getInstance().saveLoginParam(context, "username", username); | 388 | SaveParam.getInstance().saveLoginParam(context, "username", username); |
| 262 | SaveParam.getInstance().saveLoginParam(context, "password", password); | 389 | SaveParam.getInstance().saveLoginParam(context, "password", password); |
| 263 | SaveParam.getInstance().saveLoginParam(context, "access_token", access_token); | 390 | SaveParam.getInstance().saveLoginParam(context, "access_token", access_token); |
| 264 | SaveParam.getInstance().saveLoginParam(context, "login", loginStatus); | 391 | SaveParam.getInstance().saveLoginParam(context, "login", loginStatus); |
| 265 | SaveParam.getInstance().saveLoginParam(context, "userId", userId); | 392 | SaveParam.getInstance().saveLoginParam(context, "userId", userId); |
| 266 | 393 | ||
| 267 | 394 | ||
| 268 | } | 395 | } |
| 269 | 396 | ||
| 270 | //保存用户个人信息 | 397 | //保存用户个人信息 |
| 271 | public void savePresonInfo(Context context, String lastname, String gender, String mobilePortrait) { | 398 | public void savePresonInfo(Context context, String lastname, String gender, String mobilePortrait) { |
| 272 | SaveParam.getInstance().saveLoginParam(context, "lastname", lastname); | 399 | SaveParam.getInstance().saveLoginParam(context, "lastname", lastname); |
| 273 | SaveParam.getInstance().saveLoginParam(context, "gender", gender); | 400 | SaveParam.getInstance().saveLoginParam(context, "gender", gender); |
| 274 | SaveParam.getInstance().saveLoginParam(context, "mobilePortrait", mobilePortrait); | 401 | SaveParam.getInstance().saveLoginParam(context, "mobilePortrait", mobilePortrait); |
| 275 | } | 402 | } |
| 276 | 403 | ||
| 277 | //提交保卡信息 | 404 | //提交保卡信息 |
| 278 | public void subcardinfo(final Context context, int userId, String customerName, String customerAddress, | 405 | public void subcardinfo(final Context context, int userId, String customerName, String customerAddress, |
| 279 | String buyAddress, String buyTime, String alterSaleCall, | 406 | String buyAddress, String buyTime, String alterSaleCall, |
| 280 | String productModel, String deviceNumber, String macAddress, | 407 | String productModel, String deviceNumber, String macAddress, |
| 281 | String mobilePhone) { | 408 | String mobilePhone) { |
| 282 | mProgress = DialogPermission.showProgress(context, null, "正在绑定保卡...", | 409 | mProgress = DialogPermission.showProgress(context, null, "正在绑定保卡...", |
| 283 | false, true, null); | 410 | false, true, null); |
| 284 | RequestParams params = new RequestParams(); | 411 | RequestParams params = new RequestParams(); |
| 285 | 412 | ||
| 286 | params.put(HttpKey.USEID, userId); | 413 | params.put(HttpKey.USEID, userId); |
| 287 | params.put(HttpKey.CUSTOMENAME, customerName); | 414 | params.put(HttpKey.CUSTOMENAME, customerName); |
| 288 | params.put(HttpKey.CUSTOMADRESS, customerAddress); | 415 | params.put(HttpKey.CUSTOMADRESS, customerAddress); |
| 289 | params.put(HttpKey.BUYADREES, buyAddress); | 416 | params.put(HttpKey.BUYADREES, buyAddress); |
| 290 | params.put(HttpKey.BUYTIME, buyTime); | 417 | params.put(HttpKey.BUYTIME, buyTime); |
| 291 | params.put(HttpKey.ALTERSALECALL, alterSaleCall); | 418 | params.put(HttpKey.ALTERSALECALL, alterSaleCall); |
| 292 | params.put(HttpKey.PRODUCTMODEL, productModel); | 419 | params.put(HttpKey.PRODUCTMODEL, productModel); |
| 293 | params.put(HttpKey.DEVICENUMBER, deviceNumber); | 420 | params.put(HttpKey.DEVICENUMBER, deviceNumber); |
| 294 | params.put(HttpKey.MACADRESS, macAddress); | 421 | params.put(HttpKey.MACADRESS, macAddress); |
| 295 | params.put(HttpKey.MOBILPHONE, mobilePhone); | 422 | params.put(HttpKey.MOBILPHONE, mobilePhone); |
| 296 | 423 | ||
| 297 | HttpClient.getInstance().addHeader("Accept", "*/*"); | 424 | HttpClient.getInstance().addHeader("Accept", "*/*"); |
| 298 | 425 | ||
| 299 | Log.e("test", "params" + params); | 426 | Log.e("test", "params" + params); |
| 300 | HttpClient.getInstance().setTimeout(5 * 1000); | 427 | HttpClient.getInstance().setTimeout(5 * 1000); |
| 301 | HttpClient.getInstance().post(context, HttpUrl.subcardinfo, params, new AsyncHttpResponseHandler() { | 428 | HttpClient.getInstance().post(context, HttpUrl.subcardinfo, params, new AsyncHttpResponseHandler() { |
| 302 | @Override | 429 | @Override |
| 303 | public void onSuccess(int i, Header[] headers, byte[] bytes) { | 430 | public void onSuccess(int i, Header[] headers, byte[] bytes) { |
| 304 | JSONObject jsonObject = null; | 431 | JSONObject jsonObject = null; |
| 305 | closeProgress(); | 432 | closeProgress(); |
| 306 | try { | 433 | try { |
| 307 | jsonObject = new JSONObject(new String(bytes)); | 434 | jsonObject = new JSONObject(new String(bytes)); |
| 308 | String status = jsonObject.optString("status"); | 435 | String status = jsonObject.optString("status"); |
| 309 | if (status.equals("1")) { | 436 | if (status.equals("1")) { |
| 310 | Log.e("test", "onSuccess" + jsonObject); | 437 | Log.e("test", "onSuccess" + jsonObject); |
| 311 | Toast.makeText(context, "保卡绑定成功!", Toast.LENGTH_LONG).show(); | 438 | Toast.makeText(context, "保卡绑定成功!", Toast.LENGTH_LONG).show(); |
| 312 | Intent intent = new Intent(); | 439 | Intent intent = new Intent(); |
| 313 | intent.setClass((Activity) context, TheStartPageActivity.class); | 440 | intent.setClass((Activity) context, TheStartPageActivity.class); |
| 314 | ((Activity) context).startActivity(intent); | 441 | ((Activity) context).startActivity(intent); |
| 315 | ((Activity) context).overridePendingTransition(R.anim.rightin, R.anim.rightout); | 442 | ((Activity) context).overridePendingTransition(R.anim.rightin, R.anim.rightout); |
| 316 | ((Activity) context).finish(); | 443 | ((Activity) context).finish(); |
| 317 | } | 444 | } |
| 318 | } catch (JSONException e) { | 445 | } catch (JSONException e) { |
| 319 | e.printStackTrace(); | 446 | e.printStackTrace(); |
| 320 | } | 447 | } |
| 321 | 448 | ||
| 322 | 449 | ||
| 323 | } | 450 | } |
| 324 | 451 | ||
| 325 | @Override | 452 | @Override |
| 326 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) { | 453 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) { |
| 327 | Log.e("test", "onFailure" + (throwable)); | 454 | Log.e("test", "onFailure" + (throwable)); |
| 328 | closeProgress(); | 455 | closeProgress(); |
| 329 | Toast.makeText(context, "保卡绑定失败!,请检查网络", Toast.LENGTH_LONG).show(); | 456 | new CircleDialog.Builder((FragmentActivity) context) |
| 457 | .setCanceledOnTouchOutside(false) | ||
| 458 | .setCancelable(false) | ||
| 459 | .setWidth(0.5f) | ||
| 460 | .configText(new ConfigText() { | ||
| 461 | @Override | ||
| 462 | public void onConfig(TextParams params) { | ||
| 463 | params.gravity = Gravity.CENTER; | ||
| 464 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 465 | } | ||
| 466 | }) | ||
| 467 | .setText("当前无网络,请检查网络设置") | ||
| 468 | .setNegative("继续使用", null) | ||
| 469 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 470 | @Override | ||
| 471 | public void onClick(View v) { | ||
| 472 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 473 | context.startActivity(intent); | ||
| 474 | } | ||
| 475 | }) | ||
| 476 | .show(); | ||
| 330 | 477 | ||
| 331 | } | 478 | } |
| 332 | }); | 479 | }); |
| 333 | 480 | ||
| 334 | } | 481 | } |
| 335 | //获取保卡信息 | 482 | //获取保卡信息 |
| 336 | public void getcardinfo(final Context mContext, int userId , final Handler handler) { | 483 | public void getcardinfo(final Context mContext, int userId , final Handler handler) { |
| 337 | mProgress = DialogPermission.showProgress(mContext, null, "正在获取保卡信息...", | 484 | mProgress = DialogPermission.showProgress(mContext, null, "正在获取保卡信息...", |
| 338 | false, true, null); | 485 | false, true, null); |
| 339 | HttpClient.getInstance().setTimeout(5 * 1000); | 486 | HttpClient.getInstance().setTimeout(5 * 1000); |
| 340 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); | 487 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
| 341 | HttpClient.getInstance().get(HttpUrl.getcardinfo+ "?userId=" + userId , new AsyncHttpResponseHandler() { | 488 | HttpClient.getInstance().get(HttpUrl.getcardinfo+ "?userId=" + userId , new AsyncHttpResponseHandler() { |
| 342 | @Override | 489 | @Override |
| 343 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { | 490 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
| 344 | closeProgress(); | 491 | closeProgress(); |
| 345 | Log.e("test", "省" + new String(arg2)); | 492 | Log.e("test", "省" + new String(arg2)); |
| 346 | Message msg = Message.obtain(); | 493 | Message msg = Message.obtain(); |
| 347 | msg.what = HttpCode.SUCHCARDINFO; | 494 | msg.what = HttpCode.SUCHCARDINFO; |
| 348 | msg.obj = new String(arg2); | 495 | msg.obj = new String(arg2); |
| 349 | handler.sendMessage(msg); | 496 | handler.sendMessage(msg); |
| 350 | } | 497 | } |
| 351 | 498 | ||
| 352 | @Override | 499 | @Override |
| 353 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { | 500 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { |
| 354 | closeProgress(); | 501 | closeProgress(); |
| 355 | Toast.makeText(mContext, "请检查网络。。" , Toast.LENGTH_LONG).show(); | 502 | new CircleDialog.Builder((FragmentActivity) mContext) |
| 503 | .setCanceledOnTouchOutside(false) | ||
| 504 | .setCancelable(false) | ||
| 505 | .setWidth(0.5f) | ||
| 506 | .configText(new ConfigText() { | ||
| 507 | @Override | ||
| 508 | public void onConfig(TextParams params) { | ||
| 509 | params.gravity = Gravity.CENTER; | ||
| 510 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 511 | } | ||
| 512 | }) | ||
| 513 | .setText("当前无网络,请检查网络设置") | ||
| 514 | .setNegative("继续使用", null) | ||
| 515 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 516 | @Override | ||
| 517 | public void onClick(View v) { | ||
| 518 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 519 | mContext.startActivity(intent); | ||
| 520 | } | ||
| 521 | }) | ||
| 522 | .show(); | ||
| 356 | } | 523 | } |
| 357 | }); | 524 | }); |
| 358 | } | 525 | } |
| 359 | //修改保卡信息电话 | 526 | //修改保卡信息电话 |
| 360 | public void changecardinfophone(final Context mContext, int userId, final String customerPhone, String authCode) { | 527 | public void changecardinfophone(final Context mContext, int userId, final String customerPhone, String authCode) { |
| 361 | RequestParams params = new RequestParams(); | 528 | RequestParams params = new RequestParams(); |
| 362 | params.put("userId", userId); | 529 | params.put("userId", userId); |
| 363 | params.put("customerPhone", customerPhone); | 530 | params.put("customerPhone", customerPhone); |
| 364 | params.put("authCode", authCode); | 531 | params.put("authCode", authCode); |
| 365 | HttpClient.getInstance().addHeader("Accept", "*/*"); | 532 | HttpClient.getInstance().addHeader("Accept", "*/*"); |
| 366 | HttpClient.getInstance().post(HttpUrl.changecardinfo, params, new AsyncHttpResponseHandler() { | 533 | HttpClient.getInstance().post(HttpUrl.changecardinfo, params, new AsyncHttpResponseHandler() { |
| 367 | @Override | 534 | @Override |
| 368 | public void onSuccess(int i, Header[] headers, byte[] bytes) { | 535 | public void onSuccess(int i, Header[] headers, byte[] bytes) { |
| 369 | try { | 536 | try { |
| 370 | JSONObject jsonObject = new JSONObject(new String(bytes)); | 537 | JSONObject jsonObject = new JSONObject(new String(bytes)); |
| 371 | String status = jsonObject.optString("status"); | 538 | String status = jsonObject.optString("status"); |
| 372 | if (status.equals("1")) { | 539 | if (status.equals("1")) { |
| 373 | Toast.makeText(mContext, "手机号修改成功", Toast.LENGTH_LONG).show(); | 540 | Toast.makeText(mContext, "手机号修改成功", Toast.LENGTH_LONG).show(); |
| 374 | SaveParam.getInstance().saveCustomizeParam(mContext,SaveParam.CARDPHONE, customerPhone); | 541 | SaveParam.getInstance().saveCustomizeParam(mContext,SaveParam.CARDPHONE, customerPhone); |
| 375 | ((Activity) mContext).finish(); | 542 | ((Activity) mContext).finish(); |
| 376 | }else if (status.equals("1001")){ | 543 | }else if (status.equals("1001")){ |
| 377 | Toast.makeText(mContext, "验证码输入错误", Toast.LENGTH_LONG).show(); | 544 | Toast.makeText(mContext, "验证码输入错误", Toast.LENGTH_LONG).show(); |
| 378 | } | 545 | } |
| 379 | } catch (JSONException e) { | 546 | } catch (JSONException e) { |
| 380 | e.printStackTrace(); | 547 | e.printStackTrace(); |
| 381 | } | 548 | } |
| 382 | } | 549 | } |
| 383 | 550 | ||
| 384 | @Override | 551 | @Override |
| 385 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) { | 552 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) { |
| 386 | Log.e("test", "onFailure" + new String(bytes)); | 553 | Log.e("test", "onFailure" + new String(bytes)); |
| 387 | Toast.makeText(mContext, "请检查网络。。" + new String(bytes), Toast.LENGTH_LONG).show(); | 554 | new CircleDialog.Builder((FragmentActivity) mContext) |
| 555 | .setCanceledOnTouchOutside(false) | ||
| 556 | .setCancelable(false) | ||
| 557 | .setWidth(0.5f) | ||
| 558 | .configText(new ConfigText() { | ||
| 559 | @Override | ||
| 560 | public void onConfig(TextParams params) { | ||
| 561 | params.gravity = Gravity.CENTER; | ||
| 562 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 563 | } | ||
| 564 | }) | ||
| 565 | .setText("当前无网络,请检查网络设置") | ||
| 566 | .setNegative("继续使用", null) | ||
| 567 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 568 | @Override | ||
| 569 | public void onClick(View v) { | ||
| 570 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 571 | mContext.startActivity(intent); | ||
| 572 | } | ||
| 573 | }) | ||
| 574 | .show(); | ||
| 388 | } | 575 | } |
| 389 | }); | 576 | }); |
| 390 | } | 577 | } |
| 391 | //修改保卡信息地址 | 578 | //修改保卡信息地址 |
| 392 | public void changecardinfo(final Context mContext,int userId,String customerPhone,String authCode,String customerAddress) { | 579 | public void changecardadressinfo(final Context mContext, int userId, final String customerPhone, String authCode, final String customerAddress) { |
| 393 | RequestParams params = new RequestParams(); | 580 | RequestParams params = new RequestParams(); |
| 394 | params.put("userId", userId); | 581 | params.put("userId", userId); |
| 395 | params.put("customerPhone", customerPhone); | 582 | params.put("customerPhone", customerPhone); |
| 396 | params.put("authCode", authCode); | 583 | params.put("authCode", authCode); |
| 397 | params.put("customerAddress", customerAddress); | 584 | params.put("customerAddress", customerAddress); |
| 398 | HttpClient.getInstance().addHeader("Accept", "*/*"); | 585 | HttpClient.getInstance().addHeader("Accept", "*/*"); |
| 399 | HttpClient.getInstance().post(HttpUrl.changecardinfo, params, new AsyncHttpResponseHandler() { | 586 | HttpClient.getInstance().post(HttpUrl.changecardinfo, params, new AsyncHttpResponseHandler() { |
| 400 | @Override | 587 | @Override |
| 401 | public void onSuccess(int i, Header[] headers, byte[] bytes) { | 588 | public void onSuccess(int i, Header[] headers, byte[] bytes) { |
| 402 | try { | 589 | try { |
| 403 | JSONObject jsonObject = new JSONObject(new String(bytes)); | 590 | JSONObject jsonObject = new JSONObject(new String(bytes)); |
| 404 | String status = jsonObject.optString("status"); | 591 | String status = jsonObject.optString("status"); |
| 405 | if (status.equals("1")) { | 592 | if (status.equals("1")) { |
| 406 | Log.e("test", "省" + jsonObject); | 593 | Toast.makeText(mContext, "手机号修改成功", Toast.LENGTH_LONG).show(); |
| 407 | Toast.makeText(mContext, "成功。。" + jsonObject, Toast.LENGTH_LONG).show(); | 594 | SaveParam.getInstance().saveCustomizeParam(mContext,SaveParam.ADRESSCUNSTEM, customerAddress); |
| 595 | ((Activity) mContext).finish(); | ||
| 408 | } | 596 | } |
| 409 | } catch (JSONException e) { | 597 | } catch (JSONException e) { |
| 410 | e.printStackTrace(); | 598 | e.printStackTrace(); |
| 411 | } | 599 | } |
| 412 | } | 600 | } |
| 413 | 601 | ||
| 414 | @Override | 602 | @Override |
| 415 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) { | 603 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) { |
| 416 | Log.e("test", "onFailure" + new String(bytes)); | 604 | Log.e("test", "onFailure" + new String(bytes)); |
| 417 | Toast.makeText(mContext, "请检查网络。。" + new String(bytes), Toast.LENGTH_LONG).show(); | 605 | new CircleDialog.Builder((FragmentActivity) mContext) |
| 606 | .setCanceledOnTouchOutside(false) | ||
| 607 | .setCancelable(false) | ||
| 608 | .setWidth(0.5f) | ||
| 609 | .configText(new ConfigText() { | ||
| 610 | @Override | ||
| 611 | public void onConfig(TextParams params) { | ||
| 612 | params.gravity = Gravity.CENTER; | ||
| 613 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 614 | } | ||
| 615 | }) | ||
| 616 | .setText("当前无网络,请检查网络设置") | ||
| 617 | .setNegative("继续使用", null) | ||
| 618 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 619 | @Override | ||
| 620 | public void onClick(View v) { | ||
| 621 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 622 | mContext.startActivity(intent); | ||
| 623 | } | ||
| 624 | }) | ||
| 625 | .show(); | ||
| 418 | } | 626 | } |
| 419 | }); | 627 | }); |
| 420 | } | 628 | } |
| 421 | //验证是否保卡信息 | 629 | //验证是否保卡信息 |
| 422 | public void cardinfocheck(final Context mContext, int userId, final Handler handler) { | 630 | public void cardinfocheck(final Context mContext, int userId, final Handler handler) { |
| 423 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); | 631 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
| 424 | HttpClient.getInstance().get(HttpUrl.cardcheck+ "?userId=" + userId, new AsyncHttpResponseHandler() { | 632 | HttpClient.getInstance().get(HttpUrl.cardcheck+ "?userId=" + userId, new AsyncHttpResponseHandler() { |
| 425 | @Override | 633 | @Override |
| 426 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { | 634 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
| 427 | Log.e("test", "省" + new String(arg2)); | 635 | Log.e("test", "省" + new String(arg2)); |
| 428 | Message msg = Message.obtain(); | 636 | Message msg = Message.obtain(); |
| 429 | msg.what = HttpCode.CHECKCARD; | 637 | msg.what = HttpCode.CHECKCARD; |
| 430 | msg.obj = new String(arg2); | 638 | msg.obj = new String(arg2); |
| 431 | handler.sendMessage(msg); | 639 | handler.sendMessage(msg); |
| 432 | } | 640 | } |
| 433 | 641 | ||
| 434 | @Override | 642 | @Override |
| 435 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { | 643 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { |
| 436 | Toast.makeText(mContext, "请检查网络。。" + arg3, Toast.LENGTH_LONG).show(); | 644 | new CircleDialog.Builder((FragmentActivity) mContext) |
| 645 | .setCanceledOnTouchOutside(false) | ||
| 646 | .setCancelable(false) | ||
| 647 | .configText(new ConfigText() { | ||
| 648 | @Override | ||
| 649 | public void onConfig(TextParams params) { | ||
| 650 | params.gravity = Gravity.CENTER; | ||
| 651 | params.padding = new int[]{250, 50, 250, 50}; | ||
| 652 | } | ||
| 653 | }) | ||
| 654 | .setText("当前无网络,请检查网络设置") | ||
| 655 | .setNegative("取消", null) | ||
| 656 | .setPositive("确定", new View.OnClickListener() { | ||
| 657 | @Override | ||
| 658 | public void onClick(View v) { | ||
| 659 | Intent intent = new Intent("/"); | ||
| 660 | ComponentName cm = new ComponentName("com.android.settings","com.android.settings.WirelessSettings"); | ||
| 661 | intent.setComponent(cm); | ||
| 662 | intent.setAction("android.intent.action.VIEW"); | ||
| 663 | ((Activity) mContext).startActivityForResult( intent , 0); | ||
| 664 | } | ||
| 665 | }) | ||
| 666 | .show(); | ||
| 667 | //Toast.makeText(mContext, "请检查网络。。" + arg3, Toast.LENGTH_LONG).show(); | ||
| 437 | } | 668 | } |
| 438 | }); | 669 | }); |
| 439 | } | 670 | } |
| 440 | 671 | ||
| 441 | 672 | ||
| 442 | 673 | ||
| 443 | 674 | ||
| 444 | ///省级接口 | 675 | ///省级接口 |
| 445 | public void provices(final Context mContext) { | 676 | public void provices(final Context mContext) { |
| 446 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); | 677 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
| 447 | HttpClient.getInstance().get(HttpUrl.provinceUrl, new AsyncHttpResponseHandler() { | 678 | HttpClient.getInstance().get(HttpUrl.provinceUrl, new AsyncHttpResponseHandler() { |
| 448 | @Override | 679 | @Override |
| 449 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { | 680 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
| 450 | Log.e("test", "省" + new String(arg2)); | 681 | Log.e("test", "省" + new String(arg2)); |
| 451 | ProvinceInfo provinceInfo = GsonTool.getPerson(new String(arg2), ProvinceInfo.class);//解析json数据 | 682 | ProvinceInfo provinceInfo = GsonTool.getPerson(new String(arg2), ProvinceInfo.class);//解析json数据 |
| 452 | Log.e("test", "状态码" + provinceInfo.getStatus()); | 683 | Log.e("test", "状态码" + provinceInfo.getStatus()); |
| 453 | StringBuffer sb = new StringBuffer(); | 684 | StringBuffer sb = new StringBuffer(); |
| 454 | for (int i = 0; i < provinceInfo.getProvinces().size(); i++) { | 685 | for (int i = 0; i < provinceInfo.getProvinces().size(); i++) { |
| 455 | sb.append(provinceInfo.getProvinces().get(i).getRegionName() + ","); | 686 | sb.append(provinceInfo.getProvinces().get(i).getRegionName() + ","); |
| 456 | 687 | ||
| 457 | } | 688 | } |
| 458 | Log.e("test", "省" + sb.toString()); | 689 | Log.e("test", "省" + sb.toString()); |
| 459 | SaveParam.getInstance().saveLoginParam(mContext, SaveParam.PROVINCES, "" + sb.toString()); | 690 | SaveParam.getInstance().saveLoginParam(mContext, SaveParam.PROVINCES, "" + sb.toString()); |
| 460 | 691 | ||
| 461 | 692 | ||
| 462 | } | 693 | } |
| 463 | 694 | ||
| 464 | @Override | 695 | @Override |
| 465 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { | 696 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { |
| 466 | Toast.makeText(mContext, "请检查网络。。" + arg3, Toast.LENGTH_LONG).show(); | 697 | new CircleDialog.Builder((FragmentActivity) mContext) |
| 698 | .setCanceledOnTouchOutside(false) | ||
| 699 | .setCancelable(false) | ||
| 700 | .setWidth(0.5f) | ||
| 701 | .configText(new ConfigText() { | ||
| 702 | @Override | ||
| 703 | public void onConfig(TextParams params) { | ||
| 704 | params.gravity = Gravity.CENTER; | ||
| 705 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 706 | } | ||
| 707 | }) | ||
| 708 | .setText("当前无网络,请检查网络设置") | ||
| 709 | .setNegative("继续使用", null) | ||
| 710 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 711 | @Override | ||
| 712 | public void onClick(View v) { | ||
| 713 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 714 | mContext.startActivity(intent); | ||
| 715 | } | ||
| 716 | }) | ||
| 717 | .show(); | ||
| 467 | } | 718 | } |
| 468 | }); | 719 | }); |
| 469 | } | 720 | } |
| 470 | 721 | ||
| 471 | //市级接口 | 722 | //市级接口 |
| 472 | public void cityinfo(final Context mContext, int regionId) { | 723 | public void cityinfo(final Context mContext, int regionId) { |
| 473 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); | 724 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
| 474 | HttpClient.getInstance().get(HttpUrl.cityUrl + "?regionId=" + regionId, new AsyncHttpResponseHandler() { | 725 | HttpClient.getInstance().get(HttpUrl.cityUrl + "?regionId=" + regionId, new AsyncHttpResponseHandler() { |
| 475 | @Override | 726 | @Override |
| 476 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { | 727 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
| 477 | Log.e("test", "市" + new String(arg2)); | 728 | Log.e("test", "市" + new String(arg2)); |
| 478 | Gson gson = new Gson(); | 729 | Gson gson = new Gson(); |
| 479 | CityInfo cityInfo = gson.fromJson(new String(arg2), CityInfo.class); | 730 | CityInfo cityInfo = gson.fromJson(new String(arg2), CityInfo.class); |
| 480 | for (int i = 0; i < cityInfo.getCities().size(); i++) { | 731 | for (int i = 0; i < cityInfo.getCities().size(); i++) { |
| 481 | Log.e("test", "市" + cityInfo.getCities().get(i) | 732 | Log.e("test", "市" + cityInfo.getCities().get(i) |
| 482 | .getParentId()); | 733 | .getParentId()); |
| 483 | Log.e("test", "市" + cityInfo.getCities().get(i) | 734 | Log.e("test", "市" + cityInfo.getCities().get(i) |
| 484 | .getRegionId()); | 735 | .getRegionId()); |
| 485 | Log.e("test", "市" + cityInfo.getCities().get(i).getRegionName() + ""); | 736 | Log.e("test", "市" + cityInfo.getCities().get(i).getRegionName() + ""); |
| 486 | 737 | ||
| 487 | } | 738 | } |
| 488 | 739 | ||
| 489 | 740 | ||
| 490 | } | 741 | } |
| 491 | 742 | ||
| 492 | @Override | 743 | @Override |
| 493 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { | 744 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { |
| 494 | Toast.makeText(mContext, "请检查网络。。" + arg3, Toast.LENGTH_LONG).show(); | 745 | new CircleDialog.Builder((FragmentActivity) mContext) |
| 746 | .setCanceledOnTouchOutside(false) | ||
| 747 | .setCancelable(false) | ||
| 748 | .setWidth(0.5f) | ||
| 749 | .configText(new ConfigText() { | ||
| 750 | @Override | ||
| 751 | public void onConfig(TextParams params) { | ||
| 752 | params.gravity = Gravity.CENTER; | ||
| 753 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 754 | } | ||
| 755 | }) | ||
| 756 | .setText("当前无网络,请检查网络设置") | ||
| 757 | .setNegative("继续使用", null) | ||
| 758 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 759 | @Override | ||
| 760 | public void onClick(View v) { | ||
| 761 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 762 | mContext.startActivity(intent); | ||
| 763 | } | ||
| 764 | }) | ||
| 765 | .show(); | ||
| 495 | } | 766 | } |
| 496 | }); | 767 | }); |
| 497 | } | 768 | } |
| 498 | 769 | ||
| 499 | //区县级接口 | 770 | //区县级接口 |
| 500 | public void countyinfo(final Context mContext, int parentId) { | 771 | public void countyinfo(final Context mContext, int parentId) { |
| 501 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); | 772 | HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); |
| 502 | HttpClient.getInstance().get(HttpUrl.countyUrl + "?regionId=" + parentId, new AsyncHttpResponseHandler() { | 773 | HttpClient.getInstance().get(HttpUrl.countyUrl + "?regionId=" + parentId, new AsyncHttpResponseHandler() { |
| 503 | @Override | 774 | @Override |
| 504 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { | 775 | public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { |
| 505 | Log.e("test", "区" + new String(arg2)); | 776 | Log.e("test", "区" + new String(arg2)); |
| 506 | Gson gson = new Gson(); | 777 | Gson gson = new Gson(); |
| 507 | CountyInfo countyInfo = gson.fromJson(new String(arg2), CountyInfo.class); | 778 | CountyInfo countyInfo = gson.fromJson(new String(arg2), CountyInfo.class); |
| 508 | for (int i = 0; i < countyInfo.getCounties().size(); i++) { | 779 | for (int i = 0; i < countyInfo.getCounties().size(); i++) { |
| 509 | Log.e("test", "区" + countyInfo.getCounties().get(i) | 780 | Log.e("test", "区" + countyInfo.getCounties().get(i) |
| 510 | .getParentId()); | 781 | .getParentId()); |
| 511 | Log.e("test", "区" + countyInfo.getCounties().get(i) | 782 | Log.e("test", "区" + countyInfo.getCounties().get(i) |
| 512 | .getRegionId()); | 783 | .getRegionId()); |
| 513 | Log.e("test", "区" + countyInfo.getCounties().get(i).getRegionName() + ""); | 784 | Log.e("test", "区" + countyInfo.getCounties().get(i).getRegionName() + ""); |
| 514 | 785 | ||
| 515 | } | 786 | } |
| 516 | 787 | ||
| 517 | 788 | ||
| 518 | } | 789 | } |
| 519 | 790 | ||
| 520 | @Override | 791 | @Override |
| 521 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { | 792 | public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { |
| 522 | Toast.makeText(mContext, "请检查网络。。" + arg3, Toast.LENGTH_LONG).show(); | 793 | new CircleDialog.Builder((FragmentActivity) mContext) |
| 794 | .setCanceledOnTouchOutside(false) | ||
| 795 | .setCancelable(false) | ||
| 796 | .setWidth(0.5f) | ||
| 797 | .configText(new ConfigText() { | ||
| 798 | @Override | ||
| 799 | public void onConfig(TextParams params) { | ||
| 800 | params.gravity = Gravity.CENTER; | ||
| 801 | params.padding = new int[]{50, 50, 50, 50}; | ||
| 802 | } | ||
| 803 | }) | ||
| 804 | .setText("当前无网络,请检查网络设置") | ||
| 805 | .setNegative("继续使用", null) | ||
| 806 | .setPositive("设置网络", new View.OnClickListener() { | ||
| 807 | @Override | ||
| 808 | public void onClick(View v) { | ||
| 809 | Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | ||
| 810 | mContext.startActivity(intent); | ||
| 811 | } | ||
| 812 | }) | ||
| 813 | .show(); | ||
| 523 | } | 814 | } |
| 524 | }); | 815 | }); |
| 525 | } | 816 | } |
| 526 | 817 | ||
| 527 | 818 | ||
| 528 | private void closeProgress() { | 819 | private void closeProgress() { |
| 529 | try { | 820 | try { |
| 530 | if (mProgress != null) { | 821 | if (mProgress != null) { |
| 531 | mProgress.dismiss(); | 822 | mProgress.dismiss(); |
| 532 | mProgress = null; | 823 | mProgress = null; |
| 533 | } | 824 | } |
| 534 | } catch (Exception e) { | 825 | } catch (Exception e) { |
| 535 | e.printStackTrace(); | 826 | e.printStackTrace(); |
| 536 | } | 827 | } |
| 537 | } | 828 | } |
| 538 | 829 | ||
| 539 | } | 830 | } |
| 540 | 831 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/interfaces/DialogCallBack.java
| 1 | package com.hjx.personalcenter.interfaces; | 1 | package com.hjx.personalcenter.interfaces; |
| 2 | 2 | ||
| 3 | import android.content.Context; | ||
| 4 | import android.view.LayoutInflater; | ||
| 3 | import android.view.View; | 5 | import android.view.View; |
| 6 | import android.view.ViewGroup; | ||
| 4 | import android.widget.AdapterView; | 7 | import android.widget.AdapterView; |
| 5 | 8 | ||
| 6 | /** | 9 | /** |
| 7 | * Created by wei on 2017/8/17. | 10 | * Created by wei on 2017/8/17. |
| 8 | */ | 11 | */ |
| 9 | 12 | ||
| 10 | public class DialogCallBack { | 13 | public class DialogCallBack { |
| 11 | public interface CallBack{ | 14 | public interface CallBack{ |
| 12 | void provinceOnItemClick(AdapterView<?> parent, View view, int position, long id); | 15 | void provinceOnItemClick(AdapterView<?> parent, View view, int position, long id); |
| 13 | } | 16 | } |
| 17 | public interface CallBackView{ | ||
| 18 | void provinceOnItemClick(Context context, LayoutInflater inflater, ViewGroup container); | ||
| 19 | } | ||
| 14 | } | 20 | } |
| 15 | 21 |
PersonalCenter/app/src/main/res/anim/dialog_enter_anim.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <set xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 3 | <scale | ||
| 4 | android:interpolator="@android:anim/accelerate_interpolator" | ||
| 5 | android:fromXScale="1.0" | ||
| 6 | android:toXScale="1.0" | ||
| 7 | android:fromYScale="0.0" | ||
| 8 | android:toYScale="1.0" | ||
| 9 | android:pivotX="0%" | ||
| 10 | android:pivotY="100%" | ||
| 11 | android:fillAfter="false" | ||
| 12 | android:duration="400"/> | ||
| 13 | </set> |
PersonalCenter/app/src/main/res/anim/dialog_exit_anim.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <set xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 3 | <scale | ||
| 4 | android:interpolator="@android:anim/accelerate_interpolator" | ||
| 5 | android:fromXScale="1.0" | ||
| 6 | android:toXScale="1.0" | ||
| 7 | android:fromYScale="1.0" | ||
| 8 | android:toYScale="0.0" | ||
| 9 | android:pivotX="0%" | ||
| 10 | android:pivotY="100%" | ||
| 11 | android:fillAfter="false" | ||
| 12 | android:duration="400"/> | ||
| 13 | </set> |
PersonalCenter/app/src/main/res/layout/activity_account_management.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | android:orientation="vertical" | 3 | android:orientation="vertical" |
| 4 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
| 5 | android:layout_height="match_parent"> | 5 | android:layout_height="match_parent"> |
| 6 | <RelativeLayout | 6 | <RelativeLayout |
| 7 | android:id="@+id/title" | 7 | android:id="@+id/title" |
| 8 | android:layout_width="match_parent" | 8 | android:layout_width="match_parent" |
| 9 | android:layout_height="wrap_content" | 9 | android:layout_height="wrap_content" |
| 10 | android:background="@color/login_text_blue" | 10 | android:background="@color/login_text_blue" |
| 11 | android:minHeight="50dp" > | 11 | android:minHeight="50dp" > |
| 12 | 12 | ||
| 13 | <ImageView | 13 | <ImageView |
| 14 | android:id="@+id/cancel" | 14 | android:id="@+id/cancel" |
| 15 | android:layout_width="wrap_content" | 15 | android:layout_width="wrap_content" |
| 16 | android:layout_height="wrap_content" | 16 | android:layout_height="wrap_content" |
| 17 | android:layout_centerVertical="true" | 17 | android:layout_centerVertical="true" |
| 18 | android:paddingLeft="20dp" | 18 | android:paddingLeft="20dp" |
| 19 | android:paddingRight="20dp" | 19 | android:paddingRight="20dp" |
| 20 | android:src="@mipmap/title_back" /> | 20 | android:src="@mipmap/title_back" /> |
| 21 | 21 | ||
| 22 | <TextView | 22 | <TextView |
| 23 | android:id="@+id/menu_title" | 23 | android:id="@+id/menu_title" |
| 24 | android:layout_width="wrap_content" | 24 | android:layout_width="wrap_content" |
| 25 | android:layout_height="wrap_content" | 25 | android:layout_height="wrap_content" |
| 26 | android:layout_centerInParent="true" | 26 | android:layout_centerInParent="true" |
| 27 | android:text="@string/account_management" | 27 | android:text="@string/account_management" |
| 28 | android:textColor="@android:color/white" | 28 | android:textColor="@android:color/white" |
| 29 | android:textSize="22sp" /> | 29 | android:textSize="22sp" /> |
| 30 | </RelativeLayout> | 30 | </RelativeLayout> |
| 31 | <LinearLayout | 31 | <LinearLayout |
| 32 | android:layout_width="wrap_content" | 32 | android:layout_width="wrap_content" |
| 33 | android:layout_height="wrap_content" | 33 | android:layout_height="wrap_content" |
| 34 | android:orientation="horizontal" | 34 | android:orientation="horizontal" |
| 35 | android:layout_margin="20dp" | 35 | android:layout_margin="20dp" |
| 36 | android:gravity="center_vertical"> | 36 | android:gravity="center_vertical"> |
| 37 | <View | 37 | <View |
| 38 | android:layout_width="5dp" | 38 | android:layout_width="5dp" |
| 39 | android:layout_height="20dp" | 39 | android:layout_height="20dp" |
| 40 | android:background="@color/login_text_blue"> | 40 | android:background="@color/login_text_blue"> |
| 41 | 41 | ||
| 42 | </View> | 42 | </View> |
| 43 | <TextView | 43 | <TextView |
| 44 | android:layout_width="wrap_content" | 44 | android:layout_width="wrap_content" |
| 45 | android:layout_height="wrap_content" | 45 | android:layout_height="wrap_content" |
| 46 | android:text="账户安全" | 46 | android:text="账户安全" |
| 47 | android:layout_marginLeft="5dp" | 47 | android:layout_marginLeft="5dp" |
| 48 | android:textSize="22sp" | 48 | android:textSize="22sp" |
| 49 | /> | 49 | /> |
| 50 | 50 | ||
| 51 | </LinearLayout> | 51 | </LinearLayout> |
| 52 | <LinearLayout | 52 | <LinearLayout |
| 53 | android:layout_width="match_parent" | 53 | android:layout_width="match_parent" |
| 54 | android:layout_height="wrap_content" | 54 | android:layout_height="wrap_content" |
| 55 | android:layout_marginLeft="60dp" | 55 | android:layout_marginLeft="60dp" |
| 56 | android:orientation="vertical"> | 56 | android:orientation="vertical"> |
| 57 | <LinearLayout | 57 | <LinearLayout |
| 58 | android:layout_width="match_parent" | 58 | android:layout_width="match_parent" |
| 59 | android:layout_height="wrap_content"> | 59 | android:layout_height="wrap_content"> |
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | <TextView | 62 | <TextView |
| 63 | android:layout_width="0dp" | 63 | android:layout_width="0dp" |
| 64 | android:layout_height="wrap_content" | 64 | android:layout_height="wrap_content" |
| 65 | android:layout_weight="1.5" | 65 | android:layout_weight="1.5" |
| 66 | android:textSize="22sp" | 66 | android:textSize="22sp" |
| 67 | android:text="当前绑定手机号"/> | 67 | android:text="当前绑定手机号"/> |
| 68 | <TextView | 68 | <TextView |
| 69 | android:layout_width="0dp" | 69 | android:layout_width="0dp" |
| 70 | android:layout_height="wrap_content" | 70 | android:layout_height="wrap_content" |
| 71 | android:layout_marginLeft="50dp" | 71 | android:layout_marginLeft="50dp" |
| 72 | android:layout_weight="6" | 72 | android:layout_weight="6" |
| 73 | android:textSize="22sp" | 73 | android:textSize="22sp" |
| 74 | android:text="123556677"/> | 74 | android:text="123556677"/> |
| 75 | <TextView | 75 | <TextView |
| 76 | android:id="@+id/changBangding" | ||
| 76 | android:layout_width="0dp" | 77 | android:layout_width="0dp" |
| 77 | android:layout_height="wrap_content" | 78 | android:layout_height="wrap_content" |
| 78 | android:layout_weight="1" | 79 | android:layout_weight="1" |
| 79 | android:textSize="22sp" | 80 | android:textSize="22sp" |
| 80 | android:text="更换绑定"/> | 81 | android:text="更换绑定"/> |
| 81 | <ImageView | 82 | <ImageView |
| 82 | android:layout_width="wrap_content" | 83 | android:layout_width="wrap_content" |
| 83 | android:layout_height="wrap_content" | 84 | android:layout_height="wrap_content" |
| 84 | android:layout_weight="0.1" | 85 | android:layout_weight="0.1" |
| 85 | android:padding="10dp" | 86 | android:padding="10dp" |
| 86 | android:src="@mipmap/youjiantou"/> | 87 | android:src="@mipmap/youjiantou"/> |
| 87 | </LinearLayout> | 88 | </LinearLayout> |
| 88 | <LinearLayout | 89 | <LinearLayout |
| 89 | android:layout_width="match_parent" | 90 | android:layout_width="match_parent" |
| 90 | android:layout_marginTop="30dp" | 91 | android:layout_marginTop="30dp" |
| 91 | android:layout_height="wrap_content"> | 92 | android:layout_height="wrap_content"> |
| 92 | 93 | ||
| 93 | 94 | ||
| 94 | <TextView | 95 | <TextView |
| 95 | android:layout_width="0dp" | 96 | android:layout_width="0dp" |
| 96 | android:layout_height="wrap_content" | 97 | android:layout_height="wrap_content" |
| 97 | android:layout_weight="1.5" | 98 | android:layout_weight="1.5" |
| 98 | android:textSize="22sp" | 99 | android:textSize="22sp" |
| 99 | android:text="登录密码"/> | 100 | android:text="登录密码"/> |
| 100 | <TextView | 101 | <TextView |
| 101 | android:layout_width="0dp" | 102 | android:layout_width="0dp" |
| 102 | android:layout_height="wrap_content" | 103 | android:layout_height="wrap_content" |
| 103 | android:layout_marginLeft="50dp" | 104 | android:layout_marginLeft="50dp" |
| 104 | android:layout_weight="6" | 105 | android:layout_weight="6" |
| 105 | android:textSize="22sp" | 106 | android:textSize="22sp" |
| 106 | android:text="已设置"/> | 107 | android:text="已设置"/> |
| 107 | <TextView | 108 | <TextView |
| 109 | android:id="@+id/changpassword" | ||
| 108 | android:layout_width="0dp" | 110 | android:layout_width="0dp" |
| 109 | android:layout_height="wrap_content" | 111 | android:layout_height="wrap_content" |
| 110 | android:layout_weight="1" | 112 | android:layout_weight="1" |
| 111 | android:textSize="22sp" | 113 | android:textSize="22sp" |
| 112 | android:text="修改密码"/> | 114 | android:text="修改密码"/> |
| 113 | <ImageView | 115 | <ImageView |
| 114 | android:layout_width="wrap_content" | 116 | android:layout_width="wrap_content" |
| 115 | android:layout_height="wrap_content" | 117 | android:layout_height="wrap_content" |
| 116 | android:layout_weight="0.1" | 118 | android:layout_weight="0.1" |
| 117 | android:padding="10dp" | 119 | android:padding="10dp" |
| 118 | android:src="@mipmap/youjiantou"/> | 120 | android:src="@mipmap/youjiantou"/> |
| 119 | </LinearLayout> | 121 | </LinearLayout> |
| 120 | 122 | ||
| 121 | </LinearLayout> | 123 | </LinearLayout> |
| 122 | 124 | ||
| 123 | <View | 125 | <View |
| 124 | android:layout_width="match_parent" | 126 | android:layout_width="match_parent" |
| 125 | android:layout_margin="20dp" | 127 | android:layout_margin="20dp" |
| 126 | android:layout_height="0.7dp" | 128 | android:layout_height="0.7dp" |
| 127 | android:background="#FF909090" /> | 129 | android:background="#FF909090" /> |
| 128 | <LinearLayout | 130 | <LinearLayout |
| 129 | android:layout_width="wrap_content" | 131 | android:layout_width="wrap_content" |
| 130 | android:layout_height="wrap_content" | 132 | android:layout_height="wrap_content" |
| 131 | android:orientation="horizontal" | 133 | android:orientation="horizontal" |
| 132 | android:layout_margin="20dp" | 134 | android:layout_margin="20dp" |
| 133 | android:gravity="center_vertical"> | 135 | android:gravity="center_vertical"> |
| 134 | <View | 136 | <View |
| 135 | android:layout_width="5dp" | 137 | android:layout_width="5dp" |
| 136 | android:layout_height="20dp" | 138 | android:layout_height="20dp" |
| 137 | android:background="@color/login_text_blue"> | 139 | android:background="@color/login_text_blue"> |
| 138 | 140 | ||
| 139 | </View> | 141 | </View> |
| 140 | <TextView | 142 | <TextView |
| 141 | android:layout_width="wrap_content" | 143 | android:layout_width="wrap_content" |
| 142 | android:layout_height="wrap_content" | 144 | android:layout_height="wrap_content" |
| 143 | android:text="子账户管理" | 145 | android:text="子账户管理" |
| 144 | android:layout_marginLeft="5dp" | 146 | android:layout_marginLeft="5dp" |
| 145 | android:textSize="22sp" | 147 | android:textSize="22sp" |
| 146 | /> | 148 | /> |
| 147 | 149 | ||
| 148 | </LinearLayout> | 150 | </LinearLayout> |
| 149 | <GridView | 151 | <GridView |
| 150 | android:id="@+id/gv_accunt" | 152 | android:id="@+id/gv_accunt" |
| 151 | android:layout_width="match_parent" | 153 | android:layout_width="match_parent" |
| 152 | android:layout_height="wrap_content" | 154 | android:layout_height="wrap_content" |
| 153 | android:numColumns="3"> | 155 | android:numColumns="3"> |
| 154 | 156 | ||
| 155 | </GridView> | 157 | </GridView> |
| 156 | 158 | ||
| 157 | 159 | ||
| 158 | 160 | ||
| 159 | 161 | ||
| 160 | </LinearLayout> | 162 | </LinearLayout> |
PersonalCenter/app/src/main/res/layout/activity_change_card_validation.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" |
| 4 | android:layout_height="match_parent" | 4 | android:layout_height="match_parent" |
| 5 | android:background="#ffffffff" | 5 | android:background="#ffffffff" |
| 6 | android:orientation="vertical"> | 6 | android:orientation="vertical"> |
| 7 | 7 | ||
| 8 | <RelativeLayout | 8 | <RelativeLayout |
| 9 | android:id="@+id/title" | 9 | android:id="@+id/title" |
| 10 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" |
| 11 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
| 12 | android:background="@color/login_text_blue" | 12 | android:background="@color/login_text_blue" |
| 13 | android:minHeight="50dp"> | 13 | android:minHeight="50dp"> |
| 14 | 14 | ||
| 15 | <ImageView | 15 | <ImageView |
| 16 | android:id="@+id/cancel" | 16 | android:id="@+id/cancel" |
| 17 | android:layout_width="wrap_content" | 17 | android:layout_width="wrap_content" |
| 18 | android:layout_height="wrap_content" | 18 | android:layout_height="wrap_content" |
| 19 | android:layout_centerVertical="true" | 19 | android:layout_centerVertical="true" |
| 20 | android:paddingLeft="20dp" | 20 | android:paddingLeft="20dp" |
| 21 | android:paddingRight="20dp" | 21 | android:paddingRight="20dp" |
| 22 | android:src="@mipmap/title_back" /> | 22 | android:src="@mipmap/title_back" /> |
| 23 | 23 | ||
| 24 | <TextView | 24 | <TextView |
| 25 | android:id="@+id/menu_title" | 25 | android:id="@+id/menu_title" |
| 26 | android:layout_width="wrap_content" | 26 | android:layout_width="wrap_content" |
| 27 | android:layout_height="wrap_content" | 27 | android:layout_height="wrap_content" |
| 28 | android:layout_centerInParent="true" | 28 | android:layout_centerInParent="true" |
| 29 | android:text="@string/string_electroniccard_info_change" | 29 | android:text="@string/string_electroniccard_info_change" |
| 30 | android:textColor="@android:color/white" | 30 | android:textColor="@android:color/white" |
| 31 | android:textSize="22sp" /> | 31 | android:textSize="22sp" /> |
| 32 | </RelativeLayout> | 32 | </RelativeLayout> |
| 33 | 33 | ||
| 34 | <RelativeLayout | 34 | <RelativeLayout |
| 35 | android:layout_width="match_parent" | 35 | android:layout_width="match_parent" |
| 36 | android:layout_height="match_parent" | 36 | android:layout_height="match_parent" |
| 37 | android:layout_below="@id/title" | 37 | android:layout_below="@id/title" |
| 38 | android:background="#ffffffff" | 38 | android:background="#ffffffff" |
| 39 | android:orientation="vertical" | 39 | android:orientation="vertical" |
| 40 | android:paddingLeft="250dp" | 40 | android:paddingLeft="250dp" |
| 41 | android:paddingRight="250dp"> | 41 | android:paddingRight="250dp"> |
| 42 | 42 | ||
| 43 | <EditText | 43 | <EditText |
| 44 | android:id="@+id/et_phonenumber" | 44 | android:id="@+id/et_phonenumber" |
| 45 | style="@style/login_register_edit_style" | 45 | style="@style/login_register_edit_style" |
| 46 | android:layout_marginTop="150dp" | 46 | android:layout_marginTop="150dp" |
| 47 | android:hint="手机号" | 47 | android:hint="手机号" |
| 48 | android:inputType="phone" /> | 48 | android:inputType="phone" /> |
| 49 | 49 | ||
| 50 | <TextView | 50 | <TextView |
| 51 | android:id="@+id/phonenumber_error_hint" | 51 | android:id="@+id/phonenumber_error_hint" |
| 52 | style="@style/registererrhint_style" | 52 | style="@style/registererrhint_style" |
| 53 | android:layout_below="@id/et_phonenumber" /> | 53 | android:layout_below="@id/et_phonenumber" /> |
| 54 | 54 | ||
| 55 | <LinearLayout | 55 | <LinearLayout |
| 56 | android:id="@+id/rl_authcode" | 56 | android:id="@+id/rl_authcode" |
| 57 | android:layout_width="match_parent" | 57 | android:layout_width="match_parent" |
| 58 | android:layout_height="wrap_content" | 58 | android:layout_height="wrap_content" |
| 59 | android:layout_below="@id/et_phonenumber" | 59 | android:layout_below="@id/et_phonenumber" |
| 60 | android:layout_marginTop="30dp" | 60 | android:layout_marginTop="30dp" |
| 61 | android:orientation="horizontal"> | 61 | android:orientation="horizontal"> |
| 62 | 62 | ||
| 63 | <EditText | 63 | <EditText |
| 64 | android:id="@+id/et_authcode" | 64 | android:id="@+id/et_authcode" |
| 65 | style="@style/login_register_edit_rect_style" | 65 | style="@style/login_register_edit_rect_style" |
| 66 | android:layout_marginRight="-4px" | 66 | android:layout_marginRight="-4px" |
| 67 | android:layout_weight="1" | 67 | android:layout_weight="1" |
| 68 | android:hint="验证码" | 68 | android:hint="验证码" |
| 69 | android:numeric="integer" /> | 69 | android:numeric="integer" /> |
| 70 | 70 | ||
| 71 | <Button | 71 | <Button |
| 72 | android:id="@+id/btn_authcode" | 72 | android:id="@+id/btn_authcode" |
| 73 | style="@style/login_register_btn_authcode_rect_style" | 73 | style="@style/login_register_btn_authcode_rect_style" |
| 74 | android:layout_marginLeft="0px" | 74 | android:layout_marginLeft="0px" |
| 75 | android:layout_marginTop="0px" | 75 | android:layout_marginTop="0px" |
| 76 | android:layout_weight="2" | 76 | android:layout_weight="2" |
| 77 | android:text="获取验证码" | 77 | android:text="获取验证码" |
| 78 | android:textColor="@color/btn_text_color" /> | 78 | android:textColor="@color/btn_text_color" /> |
| 79 | </LinearLayout> | 79 | </LinearLayout> |
| 80 | 80 | ||
| 81 | <TextView | 81 | <TextView |
| 82 | android:id="@+id/authcode_error_hint" | 82 | android:id="@+id/authcode_error_hint" |
| 83 | style="@style/registererrhint_style" | 83 | style="@style/registererrhint_style" |
| 84 | android:layout_below="@id/rl_authcode" /> | 84 | android:layout_below="@id/rl_authcode" /> |
| 85 | 85 | ||
| 86 | <RelativeLayout | 86 | <RelativeLayout |
| 87 | android:id="@+id/pwd_rl" | 87 | android:id="@+id/pwd_rl" |
| 88 | android:layout_width="match_parent" | 88 | android:layout_width="match_parent" |
| 89 | android:layout_height="wrap_content" | 89 | android:layout_height="wrap_content" |
| 90 | android:layout_below="@id/rl_authcode" | 90 | android:layout_below="@id/rl_authcode" |
| 91 | android:layout_marginTop="30dp"> | 91 | android:layout_marginTop="30dp"> |
| 92 | 92 | ||
| 93 | <EditText | 93 | <TextView |
| 94 | android:id="@+id/et_newpassword" | 94 | android:id="@+id/et_newpassword" |
| 95 | style="@style/login_register_edit_style" | 95 | style="@style/login_register_edit_style" |
| 96 | android:hint="请选择地区" | 96 | android:hint="请选择地区" /> |
| 97 | android:inputType="textPassword" /> | ||
| 98 | 97 | ||
| 99 | <ImageView | ||
| 100 | android:id="@+id/iv_pwd_change" | ||
| 101 | style="@style/iv_pwd_change_style" /> | ||
| 102 | </RelativeLayout> | 98 | </RelativeLayout> |
| 103 | 99 | ||
| 104 | <TextView | 100 | <TextView |
| 105 | android:id="@+id/newpassword_error_hint" | 101 | android:id="@+id/newpassword_error_hint" |
| 106 | style="@style/registererrhint_style" | 102 | style="@style/registererrhint_style" |
| 107 | android:layout_below="@id/pwd_rl" /> | 103 | android:layout_below="@id/pwd_rl" /> |
| 108 | 104 | ||
| 109 | <EditText | 105 | <EditText |
| 110 | android:id="@+id/et_again_newpassword" | 106 | android:id="@+id/et_again_newpassword" |
| 111 | style="@style/login_register_edit_style" | 107 | style="@style/login_register_edit_style" |
| 112 | android:layout_below="@id/pwd_rl" | 108 | android:layout_below="@id/pwd_rl" |
| 113 | android:layout_marginTop="30dp" | 109 | android:layout_marginTop="30dp" |
| 114 | android:hint="请选择详细地址" | 110 | android:hint="请填写详细地址" /> |
| 115 | android:inputType="textPassword" /> | ||
| 116 | 111 | ||
| 117 | <TextView | 112 | <TextView |
| 118 | android:id="@+id/again_newpassword_error_hint" | 113 | android:id="@+id/again_newpassword_error_hint" |
| 119 | style="@style/registererrhint_style" | 114 | style="@style/registererrhint_style" |
| 120 | android:layout_below="@id/et_again_newpassword" /> | 115 | android:layout_below="@id/et_again_newpassword" /> |
| 121 | 116 | ||
| 122 | <Button | 117 | <Button |
| 123 | android:id="@+id/btn_ok" | 118 | android:id="@+id/btn_ok" |
| 124 | style="@style/button_login_register_style" | 119 | style="@style/button_login_register_style" |
| 125 | android:layout_below="@id/et_again_newpassword" | 120 | android:layout_below="@id/et_again_newpassword" |
| 126 | android:layout_marginTop="30dp" | 121 | android:layout_marginTop="30dp" |
| 127 | android:text="@string/ok" /> | 122 | android:text="@string/ok" /> |
| 128 | </RelativeLayout> | 123 | </RelativeLayout> |
| 129 | 124 | ||
| 130 | </RelativeLayout> | 125 | </RelativeLayout> |
PersonalCenter/app/src/main/res/layout/activity_changepsword.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" |
| 4 | android:layout_height="match_parent" | 4 | android:layout_height="match_parent" |
| 5 | android:background="#ffffffff" | 5 | android:background="#ffffffff" |
| 6 | android:orientation="vertical" > | 6 | android:orientation="vertical"> |
| 7 | 7 | ||
| 8 | <RelativeLayout | 8 | <RelativeLayout |
| 9 | android:id="@+id/title" | 9 | android:id="@+id/title" |
| 10 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" |
| 11 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
| 12 | android:background="@color/login_text_blue" | 12 | android:background="@color/login_text_blue" |
| 13 | android:minHeight="50dp" > | 13 | android:minHeight="50dp"> |
| 14 | 14 | ||
| 15 | <ImageView | 15 | <ImageView |
| 16 | android:id="@+id/cancel" | 16 | android:id="@+id/cancel" |
| 17 | android:layout_width="wrap_content" | 17 | android:layout_width="wrap_content" |
| 18 | android:layout_height="wrap_content" | 18 | android:layout_height="wrap_content" |
| 19 | android:layout_centerVertical="true" | 19 | android:layout_centerVertical="true" |
| 20 | android:paddingLeft="20dp" | 20 | android:paddingLeft="20dp" |
| 21 | android:paddingRight="20dp" | 21 | android:paddingRight="20dp" |
| 22 | android:src="@mipmap/title_back" /> | 22 | android:src="@mipmap/title_back" /> |
| 23 | 23 | ||
| 24 | <TextView | 24 | <TextView |
| 25 | android:id="@+id/menu_title" | 25 | android:id="@+id/menu_title" |
| 26 | android:layout_width="wrap_content" | 26 | android:layout_width="wrap_content" |
| 27 | android:layout_height="wrap_content" | 27 | android:layout_height="wrap_content" |
| 28 | android:layout_centerInParent="true" | 28 | android:layout_centerInParent="true" |
| 29 | android:text="@string/string_menu_title" | 29 | android:text="@string/string_menu_title" |
| 30 | android:textColor="@android:color/white" | 30 | android:textColor="@android:color/white" |
| 31 | android:textSize="22sp" /> | 31 | android:textSize="22sp" /> |
| 32 | </RelativeLayout> | 32 | </RelativeLayout> |
| 33 | 33 | ||
| 34 | <RelativeLayout | 34 | <RelativeLayout |
| 35 | android:layout_width="match_parent" | 35 | android:layout_width="match_parent" |
| 36 | android:layout_height="match_parent" | 36 | android:layout_height="match_parent" |
| 37 | android:layout_below="@id/title" | 37 | android:layout_below="@id/title" |
| 38 | android:background="#ffffffff" | 38 | android:background="#ffffffff" |
| 39 | android:orientation="vertical" | 39 | android:orientation="vertical" |
| 40 | android:paddingLeft="250dp" | 40 | android:paddingLeft="250dp" |
| 41 | android:paddingRight="250dp" > | 41 | android:paddingRight="250dp"> |
| 42 | 42 | ||
| 43 | <RelativeLayout | 43 | <RelativeLayout |
| 44 | android:id="@+id/pwd_rl" | 44 | android:id="@+id/pwd_rl" |
| 45 | android:layout_width="match_parent" | 45 | android:layout_width="match_parent" |
| 46 | android:layout_height="wrap_content" | 46 | android:layout_height="wrap_content" |
| 47 | android:layout_marginTop="100dp" | 47 | android:layout_marginTop="100dp"> |
| 48 | > | 48 | |
| 49 | <EditText | 49 | <EditText |
| 50 | android:id="@+id/et_oldpassword" | 50 | android:id="@+id/et_oldpassword" |
| 51 | style="@style/login_register_edit_style" | 51 | style="@style/login_register_edit_style" |
| 52 | android:hint="输入原密码" | 52 | android:hint="输入原密码" |
| 53 | android:inputType="textPassword" /> | 53 | android:inputType="textPassword" /> |
| 54 | <ImageView | 54 | <ImageView |
| 55 | android:id="@+id/iv_pwd_change" | 55 | android:id="@+id/iv_pwd_change" |
| 56 | style="@style/iv_pwd_change_style" | 56 | android:padding="10dp" |
| 57 | /> | 57 | android:layout_marginRight="10dp" |
| 58 | android:layout_marginLeft="10dp" | ||
| 59 | android:layout_width="40dp" | ||
| 60 | android:layout_height="wrap_content" | ||
| 61 | android:layout_alignParentRight="true" | ||
| 62 | android:layout_centerVertical="true" | ||
| 63 | android:src="@mipmap/pwd_hide" /> | ||
| 58 | </RelativeLayout> | 64 | </RelativeLayout> |
| 59 | 65 | ||
| 60 | <TextView | 66 | <TextView |
| 61 | android:id="@+id/oldpassword_error_hint" | 67 | android:id="@+id/oldpassword_error_hint" |
| 62 | style="@style/registererrhint_style" | 68 | style="@style/registererrhint_style" |
| 63 | android:layout_below="@id/pwd_rl" /> | 69 | android:layout_below="@id/pwd_rl" /> |
| 64 | 70 | ||
| 65 | <EditText | 71 | <EditText |
| 66 | android:id="@+id/et_newpassword" | 72 | android:id="@+id/et_newpassword" |
| 67 | style="@style/login_register_edit_style" | 73 | style="@style/login_register_edit_style" |
| 68 | android:layout_below="@id/pwd_rl" | 74 | android:layout_below="@id/pwd_rl" |
| 69 | android:layout_marginTop="30dp" | 75 | android:layout_marginTop="30dp" |
| 70 | android:hint="密码为英文和数字组成,最少8位" | 76 | android:hint="密码为英文和数字组成,最少8位" |
| 71 | android:inputType="textPassword" /> | 77 | android:inputType="textPassword" /> |
| 72 | 78 | ||
| 73 | <TextView | 79 | <TextView |
| 74 | android:id="@+id/newpassword_error_hint" | 80 | android:id="@+id/newpassword_error_hint" |
| 75 | style="@style/registererrhint_style" | 81 | style="@style/registererrhint_style" |
| 76 | android:layout_below="@id/et_newpassword" /> | 82 | android:layout_below="@id/et_newpassword" /> |
| 77 | 83 | ||
| 78 | <EditText | 84 | <EditText |
| 79 | android:id="@+id/et_again_newpassword" | 85 | android:id="@+id/et_again_newpassword" |
| 80 | style="@style/login_register_edit_style" | 86 | style="@style/login_register_edit_style" |
| 81 | android:layout_below="@id/et_newpassword" | 87 | android:layout_below="@id/et_newpassword" |
| 82 | android:layout_marginTop="30dp" | 88 | android:layout_marginTop="30dp" |
| 83 | android:hint="再次输入新密码" | 89 | android:hint="再次输入新密码" |
| 84 | android:inputType="textPassword" /> | 90 | android:inputType="textPassword" /> |
| 85 | 91 | ||
| 86 | <TextView | 92 | <TextView |
| 87 | android:id="@+id/again_newpassword_error_hint" | 93 | android:id="@+id/again_newpassword_error_hint" |
| 88 | style="@style/registererrhint_style" | 94 | style="@style/registererrhint_style" |
| 89 | android:layout_below="@id/et_again_newpassword" /> | 95 | android:layout_below="@id/et_again_newpassword" /> |
| 90 | 96 | ||
| 91 | <Button | 97 | <Button |
| 92 | android:id="@+id/btn_ok" | 98 | android:id="@+id/btn_ok" |
| 93 | style="@style/button_login_register_style" | 99 | style="@style/button_login_register_style" |
| 94 | android:layout_below="@id/et_again_newpassword" | 100 | android:layout_below="@id/et_again_newpassword" |
| 95 | android:layout_marginTop="30dp" | 101 | android:layout_marginTop="30dp" |
| 96 | android:text="确 定" /> | 102 | android:text="确 定" /> |
| 97 | </RelativeLayout> | 103 | </RelativeLayout> |
| 98 | 104 | ||
| 99 | </RelativeLayout> | 105 | </RelativeLayout> |
PersonalCenter/app/src/main/res/layout/activity_main.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" |
| 4 | android:layout_height="match_parent" | 4 | android:layout_height="match_parent" |
| 5 | android:orientation="vertical"> | 5 | android:orientation="vertical"> |
| 6 | 6 | ||
| 7 | <RelativeLayout | 7 | <RelativeLayout |
| 8 | android:id="@+id/title" | 8 | android:id="@+id/title" |
| 9 | android:layout_width="match_parent" | 9 | android:layout_width="match_parent" |
| 10 | android:layout_height="50dp" | 10 | android:layout_height="50dp" |
| 11 | android:background="@color/login_text_blue"> | 11 | android:background="@color/login_text_blue"> |
| 12 | 12 | ||
| 13 | <ImageView | 13 | <ImageView |
| 14 | android:id="@+id/cancel" | 14 | android:id="@+id/cancel" |
| 15 | android:layout_width="wrap_content" | 15 | android:layout_width="wrap_content" |
| 16 | android:layout_height="match_parent" | 16 | android:layout_height="match_parent" |
| 17 | android:paddingLeft="20dp" | 17 | android:paddingLeft="20dp" |
| 18 | android:paddingRight="20dp" | 18 | android:paddingRight="20dp" |
| 19 | android:visibility="gone" | ||
| 19 | android:src="@mipmap/title_back" /> | 20 | android:src="@mipmap/title_back" /> |
| 20 | 21 | ||
| 21 | <TextView | 22 | <TextView |
| 22 | android:id="@+id/menu_title" | 23 | android:id="@+id/menu_title" |
| 23 | android:layout_width="wrap_content" | 24 | android:layout_width="wrap_content" |
| 24 | android:layout_height="match_parent" | 25 | android:layout_height="match_parent" |
| 25 | android:layout_centerInParent="true" | 26 | android:layout_centerInParent="true" |
| 26 | android:gravity="center_vertical" | 27 | android:gravity="center_vertical" |
| 27 | android:text="@string/titel_preson" | 28 | android:text="@string/titel_preson" |
| 28 | android:textColor="@android:color/white" | 29 | android:textColor="@android:color/white" |
| 29 | android:textSize="22sp" /> | 30 | android:textSize="22sp" /> |
| 30 | 31 | ||
| 31 | <ImageView | 32 | <ImageView |
| 32 | android:id="@+id/iv_setting" | 33 | android:id="@+id/iv_setting" |
| 33 | android:layout_width="wrap_content" | 34 | android:layout_width="wrap_content" |
| 34 | android:layout_height="match_parent" | 35 | android:layout_height="match_parent" |
| 35 | android:layout_marginRight="10dp" | 36 | android:layout_marginRight="10dp" |
| 36 | android:layout_toLeftOf="@+id/iv_skin" | 37 | android:layout_toLeftOf="@+id/iv_skin" |
| 37 | android:gravity="center_vertical" | 38 | android:gravity="center_vertical" |
| 38 | android:padding="10dp" | 39 | android:padding="10dp" |
| 39 | android:src="@mipmap/shezhi" | 40 | android:src="@mipmap/shezhi" |
| 40 | android:textColor="@android:color/white" | 41 | android:textColor="@android:color/white" |
| 41 | android:textSize="22sp" /> | 42 | android:textSize="22sp" /> |
| 42 | 43 | ||
| 43 | <ImageView | 44 | <ImageView |
| 44 | android:id="@+id/iv_skin" | 45 | android:id="@+id/iv_skin" |
| 45 | android:layout_width="wrap_content" | 46 | android:layout_width="wrap_content" |
| 46 | android:layout_height="match_parent" | 47 | android:layout_height="match_parent" |
| 47 | android:layout_marginRight="10dp" | 48 | android:layout_marginRight="10dp" |
| 48 | android:layout_toLeftOf="@+id/iv_imformatioan" | 49 | android:layout_toLeftOf="@+id/iv_imformatioan" |
| 49 | android:gravity="center_vertical" | 50 | android:gravity="center_vertical" |
| 50 | android:padding="10dp" | 51 | android:padding="10dp" |
| 51 | android:src="@mipmap/pifu" | 52 | android:src="@mipmap/pifu" |
| 52 | android:textColor="@android:color/white" | 53 | android:textColor="@android:color/white" |
| 53 | android:textSize="22sp" /> | 54 | android:textSize="22sp" /> |
| 54 | 55 | ||
| 55 | <ImageView | 56 | <ImageView |
| 56 | android:id="@+id/iv_imformatioan" | 57 | android:id="@+id/iv_imformatioan" |
| 57 | android:layout_width="wrap_content" | 58 | android:layout_width="wrap_content" |
| 58 | android:layout_height="match_parent" | 59 | android:layout_height="match_parent" |
| 59 | android:layout_alignParentRight="true" | 60 | android:layout_alignParentRight="true" |
| 60 | android:layout_marginRight="10dp" | 61 | android:layout_marginRight="10dp" |
| 61 | android:gravity="center_vertical" | 62 | android:gravity="center_vertical" |
| 62 | android:padding="10dp" | 63 | android:padding="10dp" |
| 63 | android:src="@mipmap/fankui" | 64 | android:src="@mipmap/fankui" |
| 64 | android:textColor="@android:color/white" | 65 | android:textColor="@android:color/white" |
| 65 | android:textSize="22sp" /> | 66 | android:textSize="22sp" /> |
| 66 | 67 | ||
| 67 | 68 | ||
| 68 | </RelativeLayout> | 69 | </RelativeLayout> |
| 69 | 70 | ||
| 70 | <LinearLayout | 71 | <LinearLayout |
| 71 | android:layout_width="match_parent" | 72 | android:layout_width="match_parent" |
| 72 | android:layout_height="match_parent"> | 73 | android:layout_height="match_parent"> |
| 73 | 74 | ||
| 74 | <LinearLayout | 75 | <LinearLayout |
| 75 | android:layout_width="0dp" | 76 | android:layout_width="0dp" |
| 76 | android:layout_height="match_parent" | 77 | android:layout_height="match_parent" |
| 77 | android:layout_weight="1" | 78 | android:layout_weight="1" |
| 78 | android:orientation="vertical"> | 79 | android:orientation="vertical"> |
| 79 | 80 | ||
| 80 | <LinearLayout | 81 | <LinearLayout |
| 81 | android:layout_width="match_parent" | 82 | android:layout_width="match_parent" |
| 82 | android:layout_height="wrap_content" | 83 | android:layout_height="wrap_content" |
| 83 | android:layout_marginTop="20dp" | 84 | android:layout_marginTop="20dp" |
| 84 | android:orientation="horizontal"> | 85 | android:orientation="horizontal"> |
| 85 | <ImageView | 86 | <ImageView |
| 86 | android:id="@+id/iv_look_card" | 87 | android:id="@+id/iv_look_card" |
| 87 | android:layout_width="wrap_content" | 88 | android:layout_width="wrap_content" |
| 88 | android:layout_height="wrap_content" | 89 | android:layout_height="wrap_content" |
| 89 | android:padding="10dp" | 90 | android:padding="10dp" |
| 90 | android:layout_marginLeft="20dp" | 91 | android:layout_marginLeft="20dp" |
| 91 | android:src="@mipmap/card_icoc" /> | 92 | android:src="@mipmap/card_icoc" /> |
| 92 | 93 | ||
| 93 | <ImageView | 94 | <ImageView |
| 95 | android:id="@+id/iv_head" | ||
| 94 | android:layout_width="wrap_content" | 96 | android:layout_width="wrap_content" |
| 95 | android:layout_height="wrap_content" | 97 | android:layout_height="wrap_content" |
| 96 | android:layout_marginLeft="60dp" | 98 | android:layout_marginLeft="60dp" |
| 97 | android:src="@mipmap/header_default" /> | 99 | android:src="@mipmap/header_default" /> |
| 98 | 100 | ||
| 99 | <TextView | 101 | <TextView |
| 100 | android:layout_width="wrap_content" | 102 | android:layout_width="wrap_content" |
| 101 | android:layout_height="wrap_content" | 103 | android:layout_height="wrap_content" |
| 102 | android:layout_marginLeft="18dp" | 104 | android:layout_marginLeft="18dp" |
| 103 | android:layout_marginTop="20dp" | 105 | android:layout_marginTop="20dp" |
| 104 | android:background="@drawable/corcle_blue_bg" | 106 | android:background="@drawable/corcle_blue_bg" |
| 105 | android:paddingLeft="5dp" | 107 | android:paddingLeft="5dp" |
| 106 | android:paddingRight="5dp" | 108 | android:paddingRight="5dp" |
| 107 | android:gravity="center_vertical" | 109 | android:gravity="center_vertical" |
| 108 | android:text="签到" | 110 | android:text="签到" |
| 109 | android:textColor="@color/login_text_blue" | 111 | android:textColor="@color/login_text_blue" |
| 110 | android:textSize="18sp" /> | 112 | android:textSize="18sp" /> |
| 111 | 113 | ||
| 112 | </LinearLayout> | 114 | </LinearLayout> |
| 113 | 115 | ||
| 114 | <LinearLayout | 116 | <LinearLayout |
| 115 | android:layout_width="match_parent" | 117 | android:layout_width="match_parent" |
| 116 | android:layout_height="wrap_content" | 118 | android:layout_height="wrap_content" |
| 117 | android:layout_marginLeft="20dp" | 119 | android:layout_marginLeft="20dp" |
| 118 | android:layout_marginTop="20dp" | 120 | android:layout_marginTop="20dp" |
| 119 | android:orientation="horizontal"> | 121 | android:orientation="horizontal"> |
| 120 | 122 | ||
| 121 | <TextView | 123 | <TextView |
| 124 | android:id="@+id/tv_username" | ||
| 122 | android:layout_width="wrap_content" | 125 | android:layout_width="wrap_content" |
| 123 | android:layout_height="wrap_content" | 126 | android:layout_height="wrap_content" |
| 124 | android:text="熊巍" | 127 | android:text="熊巍" |
| 125 | android:textSize="20dp" /> | 128 | android:textSize="20dp" /> |
| 126 | 129 | ||
| 127 | <ImageView | 130 | <ImageView |
| 131 | android:id="@+id/iv_sex" | ||
| 128 | android:layout_width="wrap_content" | 132 | android:layout_width="wrap_content" |
| 129 | android:layout_height="wrap_content" | 133 | android:layout_height="wrap_content" |
| 130 | android:layout_marginLeft="50dp" | 134 | android:layout_marginLeft="50dp" |
| 131 | android:src="@mipmap/men" /> | 135 | android:src="@mipmap/men" /> |
| 132 | 136 | ||
| 133 | </LinearLayout> | 137 | </LinearLayout> |
| 134 | 138 | ||
| 135 | <LinearLayout | 139 | <LinearLayout |
| 136 | android:layout_width="match_parent" | 140 | android:layout_width="match_parent" |
| 137 | android:layout_height="wrap_content" | 141 | android:layout_height="wrap_content" |
| 138 | android:layout_marginLeft="20dp" | 142 | android:layout_marginLeft="20dp" |
| 139 | android:layout_marginTop="20dp" | 143 | android:layout_marginTop="20dp" |
| 140 | android:gravity="center" | 144 | android:gravity="center" |
| 141 | android:orientation="horizontal"> | 145 | android:orientation="horizontal"> |
| 142 | 146 | ||
| 143 | <TextView | 147 | <TextView |
| 144 | android:id="@+id/tv_sign" | 148 | android:id="@+id/tv_sign" |
| 145 | android:layout_width="0dp" | 149 | android:layout_width="0dp" |
| 146 | android:layout_height="wrap_content" | 150 | android:layout_height="wrap_content" |
| 147 | android:layout_weight="5" | 151 | android:layout_weight="5" |
| 148 | android:text="阿士大夫撒打发士大夫士大夫撒的范德萨" | 152 | android:text="阿士大夫撒打发士大夫士大夫撒的范德萨" |
| 149 | android:textSize="18sp" /> | 153 | android:textSize="18sp" /> |
| 150 | 154 | ||
| 151 | <ImageView | 155 | <ImageView |
| 152 | android:id="@+id/iv_sign" | 156 | android:id="@+id/iv_sign" |
| 153 | android:layout_width="0dp" | 157 | android:layout_width="0dp" |
| 154 | android:layout_height="wrap_content" | 158 | android:layout_height="wrap_content" |
| 155 | android:layout_weight="1" | 159 | android:layout_weight="1" |
| 156 | android:padding="10dp" | 160 | android:padding="10dp" |
| 157 | android:src="@mipmap/pencil" /> | 161 | android:src="@mipmap/pencil" /> |
| 158 | 162 | ||
| 159 | 163 | ||
| 160 | </LinearLayout> | 164 | </LinearLayout> |
| 161 | 165 | ||
| 162 | <View | 166 | <View |
| 163 | android:layout_width="match_parent" | 167 | android:layout_width="match_parent" |
| 164 | android:layout_height="0.7dp" | 168 | android:layout_height="0.7dp" |
| 165 | android:layout_marginTop="20dp" | 169 | android:layout_marginTop="20dp" |
| 166 | android:background="@color/cutoff_line"> | 170 | android:background="@color/cutoff_line"> |
| 167 | 171 | ||
| 168 | </View> | 172 | </View> |
| 169 | 173 | ||
| 170 | <LinearLayout | 174 | <LinearLayout |
| 175 | android:id="@+id/linel_mycuoti" | ||
| 171 | android:layout_width="match_parent" | 176 | android:layout_width="match_parent" |
| 172 | android:layout_height="wrap_content" | 177 | android:layout_height="wrap_content" |
| 173 | android:layout_marginTop="30dp" | 178 | android:layout_marginTop="30dp" |
| 174 | android:orientation="vertical"> | 179 | android:orientation="vertical"> |
| 175 | 180 | ||
| 176 | <LinearLayout | 181 | <LinearLayout |
| 177 | android:layout_width="match_parent" | 182 | android:layout_width="match_parent" |
| 178 | android:layout_height="wrap_content" | 183 | android:layout_height="wrap_content" |
| 179 | android:gravity="center_vertical" | 184 | android:gravity="center_vertical" |
| 180 | android:orientation="horizontal"> | 185 | android:orientation="horizontal"> |
| 181 | 186 | ||
| 182 | <ImageView | 187 | <ImageView |
| 183 | android:layout_width="0dp" | 188 | android:layout_width="0dp" |
| 184 | android:layout_height="wrap_content" | 189 | android:layout_height="wrap_content" |
| 185 | android:layout_weight="1" | 190 | android:layout_weight="1" |
| 186 | android:src="@mipmap/wodecuoti" /> | 191 | android:src="@mipmap/wodecuoti" /> |
| 187 | 192 | ||
| 188 | <TextView | 193 | <TextView |
| 189 | android:layout_width="0dp" | 194 | android:layout_width="0dp" |
| 190 | android:layout_height="wrap_content" | 195 | android:layout_height="wrap_content" |
| 191 | android:layout_weight="5" | 196 | android:layout_weight="5" |
| 192 | android:text="我的错题" | 197 | android:text="我的错题" |
| 193 | android:textSize="20sp" /> | 198 | android:textSize="20sp" /> |
| 194 | 199 | ||
| 195 | <ImageView | 200 | <ImageView |
| 196 | android:layout_width="0dp" | 201 | android:layout_width="0dp" |
| 197 | android:layout_height="wrap_content" | 202 | android:layout_height="wrap_content" |
| 198 | android:layout_weight="1" | 203 | android:layout_weight="1" |
| 199 | android:src="@mipmap/youjiantou" /> | 204 | android:src="@mipmap/youjiantou" /> |
| 200 | 205 | ||
| 201 | </LinearLayout> | 206 | </LinearLayout> |
| 202 | 207 | ||
| 203 | <LinearLayout | 208 | <LinearLayout |
| 209 | android:id="@+id/linel_mynote" | ||
| 204 | android:layout_width="match_parent" | 210 | android:layout_width="match_parent" |
| 205 | android:layout_height="wrap_content" | 211 | android:layout_height="wrap_content" |
| 206 | android:layout_marginTop="35dp" | 212 | android:layout_marginTop="35dp" |
| 207 | android:gravity="center_vertical" | 213 | android:gravity="center_vertical" |
| 208 | android:orientation="horizontal"> | 214 | android:orientation="horizontal"> |
| 209 | 215 | ||
| 210 | <ImageView | 216 | <ImageView |
| 211 | android:layout_width="0dp" | 217 | android:layout_width="0dp" |
| 212 | android:layout_height="wrap_content" | 218 | android:layout_height="wrap_content" |
| 213 | android:layout_weight="1" | 219 | android:layout_weight="1" |
| 214 | android:src="@mipmap/wodebiji" /> | 220 | android:src="@mipmap/wodebiji" /> |
| 215 | 221 | ||
| 216 | <TextView | 222 | <TextView |
| 217 | android:layout_width="0dp" | 223 | android:layout_width="0dp" |
| 218 | android:layout_height="wrap_content" | 224 | android:layout_height="wrap_content" |
| 219 | android:layout_weight="5" | 225 | android:layout_weight="5" |
| 220 | android:text="我的笔记" | 226 | android:text="我的笔记" |
| 221 | android:textSize="20sp" /> | 227 | android:textSize="20sp" /> |
| 222 | 228 | ||
| 223 | <ImageView | 229 | <ImageView |
| 224 | android:layout_width="0dp" | 230 | android:layout_width="0dp" |
| 225 | android:layout_height="wrap_content" | 231 | android:layout_height="wrap_content" |
| 226 | android:layout_weight="1" | 232 | android:layout_weight="1" |
| 227 | android:src="@mipmap/youjiantou" /> | 233 | android:src="@mipmap/youjiantou" /> |
| 228 | 234 | ||
| 229 | </LinearLayout> | 235 | </LinearLayout> |
| 230 | 236 | ||
| 231 | <LinearLayout | 237 | <LinearLayout |
| 238 | android:id="@+id/linel_mycollege" | ||
| 232 | android:layout_width="match_parent" | 239 | android:layout_width="match_parent" |
| 233 | android:layout_height="wrap_content" | 240 | android:layout_height="wrap_content" |
| 234 | android:layout_marginTop="35dp" | 241 | android:layout_marginTop="35dp" |
| 235 | android:gravity="center_vertical" | 242 | android:gravity="center_vertical" |
| 236 | android:orientation="horizontal"> | 243 | android:orientation="horizontal"> |
| 237 | 244 | ||
| 238 | <ImageView | 245 | <ImageView |
| 239 | android:layout_width="0dp" | 246 | android:layout_width="0dp" |
| 240 | android:layout_height="wrap_content" | 247 | android:layout_height="wrap_content" |
| 241 | android:layout_weight="1" | 248 | android:layout_weight="1" |
| 242 | android:src="@mipmap/wodeshoucang" /> | 249 | android:src="@mipmap/wodeshoucang" /> |
| 243 | 250 | ||
| 244 | <TextView | 251 | <TextView |
| 245 | android:layout_width="0dp" | 252 | android:layout_width="0dp" |
| 246 | android:layout_height="wrap_content" | 253 | android:layout_height="wrap_content" |
| 247 | android:layout_weight="5" | 254 | android:layout_weight="5" |
| 248 | android:text="我的收藏" | 255 | android:text="我的收藏" |
| 249 | android:textSize="20sp" /> | 256 | android:textSize="20sp" /> |
| 250 | 257 | ||
| 251 | <ImageView | 258 | <ImageView |
| 252 | android:layout_width="0dp" | 259 | android:layout_width="0dp" |
| 253 | android:layout_height="wrap_content" | 260 | android:layout_height="wrap_content" |
| 254 | android:layout_weight="1" | 261 | android:layout_weight="1" |
| 255 | android:src="@mipmap/youjiantou" /> | 262 | android:src="@mipmap/youjiantou" /> |
| 256 | 263 | ||
| 257 | </LinearLayout> | 264 | </LinearLayout> |
| 258 | 265 | ||
| 259 | <LinearLayout | 266 | <LinearLayout |
| 267 | android:id="@+id/linel_myclass" | ||
| 260 | android:layout_width="match_parent" | 268 | android:layout_width="match_parent" |
| 261 | android:layout_height="wrap_content" | 269 | android:layout_height="wrap_content" |
| 262 | android:layout_marginTop="35dp" | 270 | android:layout_marginTop="35dp" |
| 263 | android:gravity="center_vertical" | 271 | android:gravity="center_vertical" |
| 264 | android:orientation="horizontal"> | 272 | android:orientation="horizontal"> |
| 265 | 273 | ||
| 266 | <ImageView | 274 | <ImageView |
| 267 | android:layout_width="0dp" | 275 | android:layout_width="0dp" |
| 268 | android:layout_height="wrap_content" | 276 | android:layout_height="wrap_content" |
| 269 | android:layout_weight="1" | 277 | android:layout_weight="1" |
| 270 | android:src="@mipmap/wodebanji" /> | 278 | android:src="@mipmap/wodebanji" /> |
| 271 | 279 | ||
| 272 | <TextView | 280 | <TextView |
| 273 | android:layout_width="0dp" | 281 | android:layout_width="0dp" |
| 274 | android:layout_height="wrap_content" | 282 | android:layout_height="wrap_content" |
| 275 | android:layout_weight="5" | 283 | android:layout_weight="5" |
| 276 | android:text="我的班级" | 284 | android:text="我的班级" |
| 277 | android:textSize="20sp" /> | 285 | android:textSize="20sp" /> |
| 278 | 286 | ||
| 279 | <ImageView | 287 | <ImageView |
| 280 | android:layout_width="0dp" | 288 | android:layout_width="0dp" |
| 281 | android:layout_height="wrap_content" | 289 | android:layout_height="wrap_content" |
| 282 | android:layout_weight="1" | 290 | android:layout_weight="1" |
| 283 | android:src="@mipmap/youjiantou" /> | 291 | android:src="@mipmap/youjiantou" /> |
| 284 | 292 | ||
| 285 | </LinearLayout> | 293 | </LinearLayout> |
| 286 | 294 | ||
| 287 | 295 | ||
| 288 | </LinearLayout> | 296 | </LinearLayout> |
| 289 | 297 | ||
| 290 | <LinearLayout | 298 | <LinearLayout |
| 291 | android:layout_width="match_parent" | 299 | android:layout_width="match_parent" |
| 292 | android:layout_height="match_parent" | 300 | android:layout_height="match_parent" |
| 293 | android:layout_marginTop="120dp" | 301 | android:layout_marginTop="120dp" |
| 294 | android:background="@mipmap/xiaoguanggao"> | 302 | android:background="@mipmap/xiaoguanggao"> |
| 295 | 303 | ||
| 296 | </LinearLayout> | 304 | </LinearLayout> |
| 297 | 305 | ||
| 298 | 306 | ||
| 299 | </LinearLayout> | 307 | </LinearLayout> |
| 300 | 308 | ||
| 301 | 309 | ||
| 302 | <View | 310 | <View |
| 303 | android:layout_width="0.7dp" | 311 | android:layout_width="0.7dp" |
| 304 | android:layout_height="match_parent" | 312 | android:layout_height="match_parent" |
| 305 | android:background="@color/cutoff_line"> | 313 | android:background="@color/cutoff_line"> |
| 306 | 314 | ||
| 307 | </View> | 315 | </View> |
| 308 | 316 | ||
| 309 | <LinearLayout | 317 | <LinearLayout |
| 310 | android:layout_width="0dp" | 318 | android:layout_width="0dp" |
| 311 | android:layout_height="match_parent" | 319 | android:layout_height="match_parent" |
| 312 | android:layout_weight="2.5" | 320 | android:layout_weight="2.5" |
| 313 | android:orientation="vertical"> | 321 | android:orientation="vertical"> |
| 314 | 322 | ||
| 315 | <LinearLayout | 323 | <LinearLayout |
| 316 | android:layout_width="match_parent" | 324 | android:layout_width="match_parent" |
| 317 | android:layout_height="wrap_content" | 325 | android:layout_height="wrap_content" |
| 318 | android:layout_margin="20dp" | 326 | android:layout_margin="20dp" |
| 319 | android:gravity="center_vertical" | 327 | android:gravity="center_vertical" |
| 320 | android:orientation="horizontal"> | 328 | android:orientation="horizontal"> |
| 321 | 329 | ||
| 322 | <View | 330 | <View |
| 323 | android:layout_width="5dp" | 331 | android:layout_width="5dp" |
| 324 | android:layout_height="20dp" | 332 | android:layout_height="20dp" |
| 325 | android:background="@color/login_text_blue"> | 333 | android:background="@color/login_text_blue"> |
| 326 | 334 | ||
| 327 | </View> | 335 | </View> |
| 328 | 336 | ||
| 329 | <TextView | 337 | <TextView |
| 330 | android:layout_width="wrap_content" | 338 | android:layout_width="wrap_content" |
| 331 | android:layout_height="wrap_content" | 339 | android:layout_height="wrap_content" |
| 332 | android:layout_marginLeft="5dp" | 340 | android:layout_marginLeft="5dp" |
| 333 | android:text="最近学习" | 341 | android:text="最近学习" |
| 334 | android:textSize="22sp" /> | 342 | android:textSize="22sp" /> |
| 335 | 343 | ||
| 336 | </LinearLayout> | 344 | </LinearLayout> |
| 337 | 345 | ||
| 338 | <LinearLayout | 346 | <LinearLayout |
| 339 | android:layout_width="match_parent" | 347 | android:layout_width="match_parent" |
| 340 | android:layout_height="wrap_content"> | 348 | android:layout_height="wrap_content"> |
| 341 | 349 | ||
| 342 | <TextView | 350 | <TextView |
| 343 | android:id="@+id/list_item_study" | 351 | android:id="@+id/list_item_study" |
| 344 | android:layout_width="match_parent" | 352 | android:layout_width="match_parent" |
| 345 | android:layout_height="100dp" | 353 | android:layout_height="100dp" |
| 346 | android:layout_marginLeft="20dp" | 354 | android:layout_marginLeft="20dp" |
| 347 | android:layout_marginTop="10dp" | 355 | android:layout_marginTop="10dp" |
| 348 | android:gravity="center" | 356 | android:gravity="center" |
| 349 | android:text="这里需要显示水平滑动的" /> | 357 | android:text="这里需要显示水平滑动的" /> |
| 350 | </LinearLayout> | 358 | </LinearLayout> |
| 351 | 359 | ||
| 352 | <View | 360 | <View |
| 353 | android:layout_width="match_parent" | 361 | android:layout_width="match_parent" |
| 354 | android:layout_height="0.7dp" | 362 | android:layout_height="0.7dp" |
| 355 | android:background="@color/cutoff_line"> | 363 | android:background="@color/cutoff_line"> |
| 356 | 364 | ||
| 357 | </View> | 365 | </View> |
| 358 | 366 | ||
| 359 | <LinearLayout | 367 | <LinearLayout |
| 360 | android:layout_width="match_parent" | 368 | android:layout_width="match_parent" |
| 361 | android:layout_height="wrap_content" | 369 | android:layout_height="wrap_content" |
| 362 | android:layout_margin="20dp" | 370 | android:layout_margin="20dp" |
| 363 | android:gravity="center_vertical" | 371 | android:gravity="center_vertical" |
| 364 | android:orientation="horizontal"> | 372 | android:orientation="horizontal"> |
| 365 | 373 | ||
| 366 | <View | 374 | <View |
| 367 | android:layout_width="5dp" | 375 | android:layout_width="5dp" |
| 368 | android:layout_height="20dp" | 376 | android:layout_height="20dp" |
| 369 | android:background="@color/login_text_blue"> | 377 | android:background="@color/login_text_blue"> |
| 370 | 378 | ||
| 371 | </View> | 379 | </View> |
| 372 | 380 | ||
| 373 | <TextView | 381 | <TextView |
| 374 | android:layout_width="0dp" | 382 | android:layout_width="0dp" |
| 375 | android:layout_height="wrap_content" | 383 | android:layout_height="wrap_content" |
| 376 | android:layout_marginLeft="5dp" | 384 | android:layout_marginLeft="5dp" |
| 377 | android:layout_weight="2" | 385 | android:layout_weight="2" |
| 378 | android:text="个人信息" | 386 | android:text="个人信息" |
| 379 | android:textSize="22sp" /> | 387 | android:textSize="22sp" /> |
| 380 | 388 | ||
| 381 | <TextView | 389 | <TextView |
| 382 | android:id="@+id/tv_edit_presoninfo" | 390 | android:id="@+id/tv_edit_presoninfo" |
| 383 | android:padding="5dp" | 391 | android:padding="5dp" |
| 384 | android:layout_width="0dp" | 392 | android:layout_width="0dp" |
| 385 | android:layout_height="wrap_content" | 393 | android:layout_height="wrap_content" |
| 386 | android:layout_marginLeft="10dp" | 394 | android:layout_marginLeft="10dp" |
| 387 | android:layout_weight="0.2" | 395 | android:layout_weight="0.2" |
| 388 | android:text="编辑" | 396 | android:text="编辑" |
| 389 | android:textSize="18sp" /> | 397 | android:textSize="18sp" /> |
| 390 | 398 | ||
| 391 | <ImageView | 399 | <ImageView |
| 392 | android:layout_width="0dp" | 400 | android:layout_width="0dp" |
| 393 | android:layout_height="wrap_content" | 401 | android:layout_height="wrap_content" |
| 394 | android:layout_weight="0.1" | 402 | android:layout_weight="0.1" |
| 395 | 403 | ||
| 396 | android:src="@mipmap/youjiantou" /> | 404 | android:src="@mipmap/youjiantou" /> |
| 397 | 405 | ||
| 398 | 406 | ||
| 399 | </LinearLayout> | 407 | </LinearLayout> |
| 400 | 408 | ||
| 401 | <LinearLayout | 409 | <LinearLayout |
| 402 | android:layout_width="match_parent" | 410 | android:layout_width="match_parent" |
| 403 | android:layout_height="wrap_content" | 411 | android:layout_height="wrap_content" |
| 404 | android:layout_marginLeft="50dp" | 412 | android:layout_marginLeft="50dp" |
| 405 | android:layout_marginTop="10dp" | 413 | android:layout_marginTop="10dp" |
| 406 | android:orientation="vertical"> | 414 | android:orientation="vertical"> |
| 407 | 415 | ||
| 408 | <LinearLayout | 416 | <LinearLayout |
| 409 | android:layout_width="match_parent" | 417 | android:layout_width="match_parent" |
| 410 | android:layout_height="wrap_content" | 418 | android:layout_height="wrap_content" |
| 411 | android:gravity="center_vertical" | 419 | android:gravity="center_vertical" |
| 412 | android:orientation="horizontal"> | 420 | android:orientation="horizontal"> |
| 413 | 421 | ||
| 414 | <TextView | 422 | <TextView |
| 415 | android:layout_width="0dp" | 423 | android:layout_width="0dp" |
| 416 | android:layout_height="wrap_content" | 424 | android:layout_height="wrap_content" |
| 417 | android:layout_weight="1" | 425 | android:layout_weight="1" |
| 418 | android:text="我的错题" | 426 | android:text="昵称" |
| 419 | android:textSize="20sp" /> | 427 | android:textSize="20sp" /> |
| 420 | 428 | ||
| 421 | <TextView | 429 | <TextView |
| 430 | android:id="@+id/tv_username1" | ||
| 422 | android:layout_width="0dp" | 431 | android:layout_width="0dp" |
| 423 | android:layout_height="wrap_content" | 432 | android:layout_height="wrap_content" |
| 424 | android:layout_weight="2" | 433 | android:layout_weight="2" |
| 425 | android:text="我的错题" | 434 | android:text="我的错题" |
| 426 | android:textSize="20sp" /> | 435 | android:textSize="20sp" /> |
| 427 | 436 | ||
| 428 | <TextView | 437 | <TextView |
| 429 | android:layout_width="1dp" | 438 | android:layout_width="1dp" |
| 430 | android:layout_height="wrap_content" | 439 | android:layout_height="wrap_content" |
| 431 | android:layout_weight="1" | 440 | android:layout_weight="1" |
| 432 | android:text="我的错题" | 441 | android:text="星座" |
| 433 | android:textSize="20sp" /> | 442 | android:textSize="20sp" /> |
| 434 | 443 | ||
| 435 | <TextView | 444 | <TextView |
| 445 | android:id="@+id/tv_mygad" | ||
| 436 | android:layout_width="0dp" | 446 | android:layout_width="0dp" |
| 437 | android:layout_height="wrap_content" | 447 | android:layout_height="wrap_content" |
| 438 | android:layout_weight="2" | 448 | android:layout_weight="2" |
| 439 | android:text="我的错题" | 449 | android:text="我的错题" |
| 440 | android:textSize="20sp" /> | 450 | android:textSize="20sp" /> |
| 441 | </LinearLayout> | 451 | </LinearLayout> |
| 442 | 452 | ||
| 443 | <LinearLayout | 453 | <LinearLayout |
| 444 | android:layout_width="match_parent" | 454 | android:layout_width="match_parent" |
| 445 | android:layout_height="wrap_content" | 455 | android:layout_height="wrap_content" |
| 446 | android:layout_marginTop="20dp" | 456 | android:layout_marginTop="20dp" |
| 447 | android:gravity="center_vertical" | 457 | android:gravity="center_vertical" |
| 448 | android:orientation="horizontal"> | 458 | android:orientation="horizontal"> |
| 449 | 459 | ||
| 450 | <TextView | 460 | <TextView |
| 451 | android:layout_width="0dp" | 461 | android:layout_width="0dp" |
| 452 | android:layout_height="wrap_content" | 462 | android:layout_height="wrap_content" |
| 453 | android:layout_weight="1" | 463 | android:layout_weight="1" |
| 454 | android:text="我的错题" | 464 | android:text="性别" |
| 455 | android:textSize="20sp" /> | 465 | android:textSize="20sp" /> |
| 456 | 466 | ||
| 457 | <TextView | 467 | <TextView |
| 468 | android:id="@+id/tv_sex" | ||
| 458 | android:layout_width="0dp" | 469 | android:layout_width="0dp" |
| 459 | android:layout_height="wrap_content" | 470 | android:layout_height="wrap_content" |
| 460 | android:layout_weight="2" | 471 | android:layout_weight="2" |
| 461 | android:text="我的错题" | 472 | android:text="男" |
| 462 | android:textSize="20sp" /> | 473 | android:textSize="20sp" /> |
| 463 | 474 | ||
| 464 | <TextView | 475 | <TextView |
| 465 | android:layout_width="1dp" | 476 | android:layout_width="1dp" |
| 466 | android:layout_height="wrap_content" | 477 | android:layout_height="wrap_content" |
| 467 | android:layout_weight="1" | 478 | android:layout_weight="1" |
| 468 | android:text="我的错题" | 479 | android:text="地区" |
| 469 | android:textSize="20sp" /> | 480 | android:textSize="20sp" /> |
| 470 | 481 | ||
| 471 | <TextView | 482 | <TextView |
| 483 | android:id="@+id/tv_useinfo_adress" | ||
| 472 | android:layout_width="0dp" | 484 | android:layout_width="0dp" |
| 473 | android:layout_height="wrap_content" | 485 | android:layout_height="wrap_content" |
| 474 | android:layout_weight="2" | 486 | android:layout_weight="2" |
| 475 | android:text="我的错题" | 487 | android:text="我的错题" |
| 476 | android:textSize="20sp" /> | 488 | android:textSize="20sp" /> |
| 477 | </LinearLayout> | 489 | </LinearLayout> |
| 478 | 490 | ||
| 479 | <LinearLayout | 491 | <LinearLayout |
| 480 | android:layout_width="match_parent" | 492 | android:layout_width="match_parent" |
| 481 | android:layout_height="wrap_content" | 493 | android:layout_height="wrap_content" |
| 482 | android:layout_marginTop="20dp" | 494 | android:layout_marginTop="20dp" |
| 483 | android:gravity="center_vertical" | 495 | android:gravity="center_vertical" |
| 484 | android:orientation="horizontal"> | 496 | android:orientation="horizontal"> |
| 485 | 497 | ||
| 486 | <TextView | 498 | <TextView |
| 487 | android:layout_width="0dp" | 499 | android:layout_width="0dp" |
| 488 | android:layout_height="wrap_content" | 500 | android:layout_height="wrap_content" |
| 489 | android:layout_weight="1" | 501 | android:layout_weight="1" |
| 490 | android:text="我的错题" | 502 | android:text="生日" |
| 491 | android:textSize="20sp" /> | 503 | android:textSize="20sp" /> |
| 492 | 504 | ||
| 493 | <TextView | 505 | <TextView |
| 506 | android:id="@+id/tv_useinfo_birthday" | ||
| 494 | android:layout_width="0dp" | 507 | android:layout_width="0dp" |
| 495 | android:layout_height="wrap_content" | 508 | android:layout_height="wrap_content" |
| 496 | android:layout_weight="2" | 509 | android:layout_weight="2" |
| 497 | android:text="我的错题" | 510 | android:text="我的错题" |
| 498 | android:textSize="20sp" /> | 511 | android:textSize="20sp" /> |
| 499 | 512 | ||
| 500 | <TextView | 513 | <TextView |
| 501 | android:layout_width="1dp" | 514 | android:layout_width="1dp" |
| 502 | android:layout_height="wrap_content" | 515 | android:layout_height="wrap_content" |
| 503 | android:layout_weight="1" | 516 | android:layout_weight="1" |
| 504 | android:text="我的错题" | 517 | android:text="学校" |
| 505 | android:textSize="20sp" /> | 518 | android:textSize="20sp" /> |
| 506 | 519 | ||
| 507 | <TextView | 520 | <TextView |
| 521 | android:id="@+id/tv_useinfo_school" | ||
| 508 | android:layout_width="0dp" | 522 | android:layout_width="0dp" |
| 509 | android:layout_height="wrap_content" | 523 | android:layout_height="wrap_content" |
| 510 | android:layout_weight="2" | 524 | android:layout_weight="2" |
| 511 | android:text="我的错题" | 525 | android:text="我的错题" |
| 512 | android:textSize="20sp" /> | 526 | android:textSize="20sp" /> |
| 513 | </LinearLayout> | 527 | </LinearLayout> |
| 514 | 528 | ||
| 515 | <LinearLayout | 529 | <LinearLayout |
| 516 | android:layout_width="match_parent" | 530 | android:layout_width="match_parent" |
| 517 | android:layout_height="wrap_content" | 531 | android:layout_height="wrap_content" |
| 518 | android:layout_marginTop="20dp" | 532 | android:layout_marginTop="20dp" |
| 519 | android:gravity="center_vertical" | 533 | android:gravity="center_vertical" |
| 520 | android:orientation="horizontal"> | 534 | android:orientation="horizontal"> |
| 521 | 535 | ||
| 522 | <TextView | 536 | <TextView |
| 523 | android:layout_width="0dp" | 537 | android:layout_width="0dp" |
| 524 | android:layout_height="wrap_content" | 538 | android:layout_height="wrap_content" |
| 525 | android:layout_weight="1" | 539 | android:layout_weight="1" |
| 526 | android:text="我的错题" | 540 | android:text="Q Q" |
| 527 | android:textSize="20sp" /> | 541 | android:textSize="20sp" /> |
| 528 | 542 | ||
| 529 | <TextView | 543 | <TextView |
| 544 | android:id="@+id/tv_useinfo_qq" | ||
| 530 | android:layout_width="0dp" | 545 | android:layout_width="0dp" |
| 531 | android:layout_height="wrap_content" | 546 | android:layout_height="wrap_content" |
| 532 | android:layout_weight="2" | 547 | android:layout_weight="2" |
| 533 | android:text="我的错题" | 548 | android:text="我的错题" |
| 534 | android:textSize="20sp" /> | 549 | android:textSize="20sp" /> |
| 535 | 550 | ||
| 536 | <TextView | 551 | <TextView |
| 537 | android:layout_width="1dp" | 552 | android:layout_width="1dp" |
| 538 | android:layout_height="wrap_content" | 553 | android:layout_height="wrap_content" |
| 539 | android:layout_weight="1" | 554 | android:layout_weight="1" |
| 540 | android:text="我的错题" | 555 | android:text="年级" |
| 541 | android:textSize="20sp" /> | 556 | android:textSize="20sp" /> |
| 542 | 557 | ||
| 543 | <TextView | 558 | <TextView |
| 559 | android:id="@+id/tv_useinfo_gender" | ||
| 544 | android:layout_width="0dp" | 560 | android:layout_width="0dp" |
| 545 | android:layout_height="wrap_content" | 561 | android:layout_height="wrap_content" |
| 546 | android:layout_weight="2" | 562 | android:layout_weight="2" |
| 547 | android:text="我的错题" | 563 | android:text="我的错题" |
| 548 | android:textSize="20sp" /> | 564 | android:textSize="20sp" /> |
| 549 | </LinearLayout> | 565 | </LinearLayout> |
| 550 | 566 | ||
| 551 | 567 | ||
| 552 | </LinearLayout> | 568 | </LinearLayout> |
| 553 | <View | 569 | <View |
| 554 | android:layout_width="match_parent" | 570 | android:layout_width="match_parent" |
| 555 | android:layout_height="0.7dp" | 571 | android:layout_height="0.7dp" |
| 556 | android:layout_marginTop="20dp" | 572 | android:layout_marginTop="20dp" |
| 557 | android:background="@color/cutoff_line"> | 573 | android:background="@color/cutoff_line"> |
| 558 | 574 | ||
| 559 | </View> | 575 | </View> |
| 560 | <LinearLayout | 576 | <LinearLayout |
| 561 | android:layout_width="match_parent" | 577 | android:layout_width="match_parent" |
| 562 | android:layout_height="wrap_content" | 578 | android:layout_height="wrap_content" |
| 563 | android:layout_margin="20dp" | 579 | android:layout_margin="20dp" |
| 564 | android:gravity="center_vertical" | 580 | android:gravity="center_vertical" |
| 565 | android:orientation="horizontal"> | 581 | android:orientation="horizontal"> |
| 566 | 582 | ||
| 567 | <View | 583 | <View |
| 568 | android:layout_width="5dp" | 584 | android:layout_width="5dp" |
| 569 | android:layout_height="20dp" | 585 | android:layout_height="20dp" |
| 570 | android:background="@color/login_text_blue"> | 586 | android:background="@color/login_text_blue"> |
| 571 | 587 | ||
| 572 | </View> | 588 | </View> |
| 573 | 589 | ||
| 574 | <TextView | 590 | <TextView |
| 575 | android:layout_width="wrap_content" | 591 | android:layout_width="wrap_content" |
| 576 | android:layout_height="wrap_content" | 592 | android:layout_height="wrap_content" |
| 577 | android:layout_marginLeft="5dp" | 593 | android:layout_marginLeft="5dp" |
| 578 | android:text="版本信息" | 594 | android:text="版本信息" |
| 579 | android:textSize="22sp" /> | 595 | android:textSize="22sp" /> |
| 580 | 596 | ||
| 581 | </LinearLayout> | 597 | </LinearLayout> |
| 582 | 598 | ||
| 583 | <LinearLayout | 599 | <LinearLayout |
| 584 | android:layout_width="match_parent" | 600 | android:layout_width="match_parent" |
| 585 | android:layout_height="wrap_content" | 601 | android:layout_height="wrap_content" |
| 586 | android:layout_marginTop="20dp"> | 602 | android:layout_marginTop="20dp"> |
| 587 | 603 | ||
| 588 | <TextView | 604 | <TextView |
| 589 | android:layout_width="match_parent" | 605 | android:layout_width="match_parent" |
| 590 | android:layout_height="100dp" | 606 | android:layout_height="100dp" |
| 591 | android:layout_marginLeft="20dp" | 607 | android:layout_marginLeft="20dp" |
| 592 | android:layout_marginTop="10dp" | 608 | android:layout_marginTop="10dp" |
| 593 | android:gravity="center" | 609 | android:gravity="center" |
| 594 | android:text="这里需要显示水平滑动的" /> | 610 | android:text="这里需要显示水平滑动的" /> |
| 595 | </LinearLayout> | 611 | </LinearLayout> |
| 596 | 612 | ||
| 597 | 613 | ||
| 598 | </LinearLayout> | 614 | </LinearLayout> |
| 599 | 615 | ||
| 600 | 616 | ||
| 601 | </LinearLayout> | 617 | </LinearLayout> |
| 602 | 618 | ||
| 603 | 619 | ||
| 604 | </LinearLayout> | 620 | </LinearLayout> |
| 605 | 621 |
PersonalCenter/app/src/main/res/layout/custom_adilog_lhead.xml
| File was created | 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 | <RelativeLayout | ||
| 8 | android:id="@+id/title" | ||
| 9 | android:layout_width="match_parent" | ||
| 10 | android:layout_height="wrap_content" | ||
| 11 | android:minHeight="70dp" > | ||
| 12 | |||
| 13 | <TextView | ||
| 14 | android:id="@+id/menu_title" | ||
| 15 | android:layout_width="wrap_content" | ||
| 16 | android:layout_height="wrap_content" | ||
| 17 | android:layout_centerInParent="true" | ||
| 18 | android:padding="20dp" | ||
| 19 | android:text="个人头像" | ||
| 20 | android:textColor="@android:color/black" | ||
| 21 | android:textSize="22sp" /> | ||
| 22 | </RelativeLayout> | ||
| 23 | <LinearLayout | ||
| 24 | android:layout_width="match_parent" | ||
| 25 | android:layout_height="225dp" | ||
| 26 | android:layout_margin="20dp" | ||
| 27 | android:orientation="vertical"> | ||
| 28 | <TextView | ||
| 29 | android:layout_width="wrap_content" | ||
| 30 | android:layout_height="wrap_content" | ||
| 31 | android:layout_marginLeft="50dp" | ||
| 32 | android:textSize="18sp" | ||
| 33 | android:text="默认头像"/> | ||
| 34 | <LinearLayout | ||
| 35 | android:layout_width="match_parent" | ||
| 36 | android:layout_height="wrap_content" | ||
| 37 | android:gravity="center" | ||
| 38 | android:layout_marginTop="10dp" | ||
| 39 | android:orientation="horizontal"> | ||
| 40 | <ImageView | ||
| 41 | android:layout_width="wrap_content" | ||
| 42 | android:layout_height="wrap_content" | ||
| 43 | android:layout_margin="10dp" | ||
| 44 | android:src="@mipmap/ic_launcher"/> | ||
| 45 | <ImageView | ||
| 46 | android:layout_width="wrap_content" | ||
| 47 | android:layout_height="wrap_content" | ||
| 48 | android:layout_margin="10dp" | ||
| 49 | android:src="@mipmap/ic_launcher"/> | ||
| 50 | <ImageView | ||
| 51 | android:layout_width="wrap_content" | ||
| 52 | android:layout_height="wrap_content" | ||
| 53 | android:layout_margin="10dp" | ||
| 54 | android:src="@mipmap/ic_launcher"/> | ||
| 55 | <ImageView | ||
| 56 | android:layout_width="wrap_content" | ||
| 57 | android:layout_height="wrap_content" | ||
| 58 | android:layout_margin="10dp" | ||
| 59 | android:src="@mipmap/ic_launcher"/> | ||
| 60 | |||
| 61 | </LinearLayout> | ||
| 62 | <LinearLayout | ||
| 63 | android:layout_width="match_parent" | ||
| 64 | android:layout_height="wrap_content" | ||
| 65 | android:gravity="center" | ||
| 66 | android:layout_marginTop="10dp" | ||
| 67 | android:orientation="horizontal"> | ||
| 68 | <LinearLayout | ||
| 69 | android:layout_width="0dp" | ||
| 70 | android:layout_weight="1" | ||
| 71 | android:gravity="center" | ||
| 72 | android:layout_height="wrap_content"> | ||
| 73 | <ImageView | ||
| 74 | android:layout_width="wrap_content" | ||
| 75 | android:layout_height="wrap_content" | ||
| 76 | android:layout_margin="10dp" | ||
| 77 | android:src="@mipmap/paizhao"/> | ||
| 78 | <TextView | ||
| 79 | android:layout_width="wrap_content" | ||
| 80 | android:layout_height="wrap_content" | ||
| 81 | android:layout_gravity="center_vertical" | ||
| 82 | android:textSize="18sp" | ||
| 83 | android:text="拍一张"/> | ||
| 84 | |||
| 85 | </LinearLayout> | ||
| 86 | <LinearLayout | ||
| 87 | android:layout_width="0dp" | ||
| 88 | android:layout_weight="1" | ||
| 89 | android:gravity="center" | ||
| 90 | android:layout_height="wrap_content"> | ||
| 91 | <ImageView | ||
| 92 | android:layout_width="wrap_content" | ||
| 93 | android:layout_height="wrap_content" | ||
| 94 | android:layout_margin="10dp" | ||
| 95 | android:src="@mipmap/xiangce"/> | ||
| 96 | <TextView | ||
| 97 | android:layout_width="wrap_content" | ||
| 98 | android:layout_height="wrap_content" | ||
| 99 | android:layout_gravity="center_vertical" | ||
| 100 | android:textSize="18sp" | ||
| 101 | android:text="相册"/> | ||
| 102 | |||
| 103 | |||
| 104 | </LinearLayout> | ||
| 105 | |||
| 106 | |||
| 107 | </LinearLayout> | ||
| 108 | <View | ||
| 109 | android:layout_marginTop="10dp" | ||
| 110 | android:layout_width="match_parent" | ||
| 111 | android:background="@color/cutoff_line" | ||
| 112 | android:layout_height="0.7dp"> | ||
| 113 | |||
| 114 | </View> | ||
| 115 | <LinearLayout | ||
| 116 | android:layout_width="match_parent" | ||
| 117 | android:layout_height="wrap_content" | ||
| 118 | android:gravity="center" | ||
| 119 | android:orientation="horizontal"> | ||
| 120 | |||
| 121 | <TextView | ||
| 122 | android:id="@+id/canceltakephone" | ||
| 123 | android:layout_width="0dp" | ||
| 124 | android:layout_weight="1" | ||
| 125 | android:layout_marginTop="10dp" | ||
| 126 | android:layout_height="wrap_content" | ||
| 127 | android:gravity="center" | ||
| 128 | android:textSize="18sp" | ||
| 129 | android:text="取消"/> | ||
| 130 | <View | ||
| 131 | android:layout_width="0.7dp" | ||
| 132 | android:layout_height="match_parent" | ||
| 133 | android:background="@color/cutoff_line"> | ||
| 134 | |||
| 135 | </View> | ||
| 136 | |||
| 137 | <TextView | ||
| 138 | android:id="@+id/oktakephone" | ||
| 139 | android:layout_width="0dp" | ||
| 140 | android:layout_weight="1" | ||
| 141 | android:layout_height="wrap_content" | ||
| 142 | android:layout_marginTop="10dp" | ||
| 143 | android:gravity="center" | ||
| 144 | android:textSize="18sp" | ||
| 145 | android:text="确定"/> | ||
| 146 | |||
| 147 | </LinearLayout> | ||
| 148 | |||
| 149 | </LinearLayout> | ||
| 150 | </LinearLayout> | ||
| 151 |
PersonalCenter/app/src/main/res/layout/fragment_changge_presonal_info.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | android:id="@+id/card_view" | 3 | android:id="@+id/card_view" |
| 4 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
| 5 | android:layout_height="match_parent" | 5 | android:layout_height="match_parent" |
| 6 | android:orientation="vertical"> | 6 | android:orientation="vertical"> |
| 7 | 7 | ||
| 8 | 8 | ||
| 9 | <LinearLayout | 9 | <LinearLayout |
| 10 | android:layout_width="wrap_content" | 10 | android:layout_width="wrap_content" |
| 11 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
| 12 | android:layout_marginTop="60dp" | 12 | android:layout_marginTop="60dp" |
| 13 | android:orientation="horizontal"> | 13 | android:orientation="horizontal"> |
| 14 | 14 | ||
| 15 | <View | 15 | <View |
| 16 | android:layout_width="450dp" | 16 | android:layout_width="450dp" |
| 17 | android:layout_height="0.7dp" | 17 | android:layout_height="0.7dp" |
| 18 | android:layout_marginLeft="150dp" | 18 | android:layout_marginLeft="150dp" |
| 19 | android:background="@color/electronic_text"> | 19 | android:background="@color/electronic_text"> |
| 20 | 20 | ||
| 21 | </View> | 21 | </View> |
| 22 | 22 | ||
| 23 | <View | 23 | <View |
| 24 | android:layout_width="450dp" | 24 | android:layout_width="450dp" |
| 25 | android:layout_height="0.7dp" | 25 | android:layout_height="0.7dp" |
| 26 | android:layout_marginLeft="80dp" | 26 | android:layout_marginLeft="80dp" |
| 27 | android:background="@color/electronic_text"> | 27 | android:background="@color/electronic_text"> |
| 28 | 28 | ||
| 29 | </View> | 29 | </View> |
| 30 | 30 | ||
| 31 | 31 | ||
| 32 | </LinearLayout> | 32 | </LinearLayout> |
| 33 | 33 | ||
| 34 | <LinearLayout | 34 | <LinearLayout |
| 35 | android:layout_width="match_parent" | 35 | android:layout_width="match_parent" |
| 36 | android:layout_height="wrap_content" | 36 | android:layout_height="wrap_content" |
| 37 | android:layout_marginLeft="200dp" | 37 | android:layout_marginLeft="200dp" |
| 38 | android:gravity="center_vertical" | 38 | android:gravity="center_vertical" |
| 39 | android:orientation="horizontal"> | 39 | android:orientation="horizontal"> |
| 40 | 40 | ||
| 41 | <LinearLayout | 41 | <LinearLayout |
| 42 | android:layout_width="0dp" | 42 | android:layout_width="0dp" |
| 43 | android:layout_height="80dp" | 43 | android:layout_height="80dp" |
| 44 | android:layout_weight="1" | 44 | android:layout_weight="1" |
| 45 | android:gravity="center_vertical"> | 45 | android:gravity="center_vertical"> |
| 46 | 46 | ||
| 47 | <TextView | 47 | <TextView |
| 48 | android:layout_width="wrap_content" | 48 | android:layout_width="wrap_content" |
| 49 | android:layout_height="wrap_content" | 49 | android:layout_height="wrap_content" |
| 50 | android:text="昵称" | 50 | android:text="昵称" |
| 51 | android:textColor="@color/pickerview_wheelview_textcolor_center" | 51 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 52 | android:textSize="22sp" /> | 52 | android:textSize="22sp" /> |
| 53 | 53 | ||
| 54 | <EditText | 54 | <EditText |
| 55 | android:id="@+id/tv_username1" | ||
| 55 | android:layout_width="wrap_content" | 56 | android:layout_width="wrap_content" |
| 56 | android:layout_height="wrap_content" | 57 | android:layout_height="wrap_content" |
| 57 | android:layout_marginLeft="50dp" | 58 | android:layout_marginLeft="50dp" |
| 58 | android:background="@null" | 59 | android:background="@null" |
| 59 | android:hint="请输入12个以内的中文或英文字符" | 60 | android:hint="请输入12个以内的中文或英文字符" |
| 60 | android:textColor="@color/electronic_text" | 61 | android:textColor="@color/electronic_text" |
| 61 | android:textSize="22sp" /> | 62 | android:textSize="22sp" /> |
| 62 | 63 | ||
| 63 | </LinearLayout> | 64 | </LinearLayout> |
| 64 | 65 | ||
| 65 | <LinearLayout | 66 | <LinearLayout |
| 66 | android:layout_width="0dp" | 67 | android:layout_width="0dp" |
| 67 | android:layout_height="80dp" | 68 | android:layout_height="80dp" |
| 68 | android:layout_weight="1" | 69 | android:layout_weight="1" |
| 69 | android:gravity="center_vertical"> | 70 | android:gravity="center_vertical"> |
| 70 | 71 | ||
| 71 | <TextView | 72 | <TextView |
| 72 | android:layout_width="wrap_content" | 73 | android:layout_width="wrap_content" |
| 73 | android:layout_height="wrap_content" | 74 | android:layout_height="wrap_content" |
| 74 | android:text="地区" | 75 | android:text="地区" |
| 75 | android:textColor="@color/pickerview_wheelview_textcolor_center" | 76 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 76 | android:textSize="22sp" /> | 77 | android:textSize="22sp" /> |
| 77 | 78 | ||
| 78 | <TextView | 79 | <TextView |
| 80 | android:id="@+id/tv_useinfo_adress" | ||
| 79 | android:layout_width="wrap_content" | 81 | android:layout_width="wrap_content" |
| 80 | android:layout_height="wrap_content" | 82 | android:layout_height="wrap_content" |
| 81 | android:layout_marginLeft="50dp" | 83 | android:layout_marginLeft="50dp" |
| 82 | android:text="请选择" | 84 | android:text="请选择" |
| 83 | android:textColor="@color/btn_text_color" | 85 | android:textColor="@color/btn_text_color" |
| 84 | android:textSize="22sp" /> | 86 | android:textSize="22sp" /> |
| 85 | 87 | ||
| 86 | <ImageView | 88 | <ImageView |
| 87 | android:layout_width="wrap_content" | 89 | android:layout_width="wrap_content" |
| 88 | android:layout_height="wrap_content" | 90 | android:layout_height="wrap_content" |
| 89 | android:layout_marginLeft="150dp" | 91 | android:layout_marginLeft="150dp" |
| 90 | android:src="@mipmap/xiajiantou"> | 92 | android:src="@mipmap/xiajiantou"> |
| 91 | 93 | ||
| 92 | </ImageView> | 94 | </ImageView> |
| 93 | </LinearLayout> | 95 | </LinearLayout> |
| 94 | 96 | ||
| 95 | </LinearLayout> | 97 | </LinearLayout> |
| 96 | 98 | ||
| 97 | <LinearLayout | 99 | <LinearLayout |
| 98 | android:layout_width="wrap_content" | 100 | android:layout_width="wrap_content" |
| 99 | android:layout_height="wrap_content" | 101 | android:layout_height="wrap_content" |
| 100 | android:orientation="horizontal"> | 102 | android:orientation="horizontal"> |
| 101 | 103 | ||
| 102 | <View | 104 | <View |
| 103 | android:layout_width="450dp" | 105 | android:layout_width="450dp" |
| 104 | android:layout_height="0.7dp" | 106 | android:layout_height="0.7dp" |
| 105 | android:layout_marginLeft="150dp" | 107 | android:layout_marginLeft="150dp" |
| 106 | android:background="@color/electronic_text"> | 108 | android:background="@color/electronic_text"> |
| 107 | 109 | ||
| 108 | </View> | 110 | </View> |
| 109 | 111 | ||
| 110 | <View | 112 | <View |
| 111 | android:layout_width="450dp" | 113 | android:layout_width="450dp" |
| 112 | android:layout_height="0.7dp" | 114 | android:layout_height="0.7dp" |
| 113 | android:layout_marginLeft="80dp" | 115 | android:layout_marginLeft="80dp" |
| 114 | android:background="@color/electronic_text"> | 116 | android:background="@color/electronic_text"> |
| 115 | 117 | ||
| 116 | </View> | 118 | </View> |
| 117 | 119 | ||
| 118 | 120 | ||
| 119 | </LinearLayout> | 121 | </LinearLayout> |
| 120 | 122 | ||
| 121 | <LinearLayout | 123 | <LinearLayout |
| 122 | android:layout_width="match_parent" | 124 | android:layout_width="match_parent" |
| 123 | android:layout_height="wrap_content" | 125 | android:layout_height="wrap_content" |
| 124 | android:layout_marginLeft="200dp" | 126 | android:layout_marginLeft="200dp" |
| 125 | android:gravity="center_vertical" | 127 | android:gravity="center_vertical" |
| 126 | android:orientation="horizontal"> | 128 | android:orientation="horizontal"> |
| 127 | 129 | ||
| 128 | <LinearLayout | 130 | <LinearLayout |
| 129 | android:layout_width="0dp" | 131 | android:layout_width="0dp" |
| 130 | android:layout_height="80dp" | 132 | android:layout_height="80dp" |
| 131 | android:layout_weight="1" | 133 | android:layout_weight="1" |
| 132 | android:gravity="center_vertical"> | 134 | android:gravity="center_vertical"> |
| 133 | 135 | ||
| 134 | <TextView | 136 | <TextView |
| 135 | android:layout_width="wrap_content" | 137 | android:layout_width="wrap_content" |
| 136 | android:layout_height="wrap_content" | 138 | android:layout_height="wrap_content" |
| 137 | android:text="性别" | 139 | android:text="性别" |
| 138 | android:textColor="@color/pickerview_wheelview_textcolor_center" | 140 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 139 | android:textSize="22sp" /> | 141 | android:textSize="22sp" /> |
| 140 | 142 | ||
| 141 | <TextView | 143 | <TextView |
| 144 | android:id="@+id/tv_sex" | ||
| 142 | android:layout_width="wrap_content" | 145 | android:layout_width="wrap_content" |
| 143 | android:layout_height="wrap_content" | 146 | android:layout_height="wrap_content" |
| 144 | android:layout_marginLeft="50dp" | 147 | android:layout_marginLeft="50dp" |
| 145 | android:text="请选择" | 148 | android:text="请选择" |
| 146 | android:textSize="22sp" /> | 149 | android:textSize="22sp" /> |
| 147 | 150 | ||
| 148 | <ImageView | 151 | <ImageView |
| 149 | android:layout_width="wrap_content" | 152 | android:layout_width="wrap_content" |
| 150 | android:layout_height="wrap_content" | 153 | android:layout_height="wrap_content" |
| 151 | android:layout_marginLeft="150dp" | 154 | android:layout_marginLeft="150dp" |
| 152 | android:src="@mipmap/xiajiantou"> | 155 | android:src="@mipmap/xiajiantou"> |
| 153 | 156 | ||
| 154 | </ImageView> | 157 | </ImageView> |
| 155 | 158 | ||
| 156 | 159 | ||
| 157 | </LinearLayout> | 160 | </LinearLayout> |
| 158 | 161 | ||
| 159 | <LinearLayout | 162 | <LinearLayout |
| 160 | android:layout_width="0dp" | 163 | android:layout_width="0dp" |
| 161 | android:layout_height="80dp" | 164 | android:layout_height="80dp" |
| 162 | android:layout_weight="1" | 165 | android:layout_weight="1" |
| 163 | android:gravity="center_vertical"> | 166 | android:gravity="center_vertical"> |
| 164 | 167 | ||
| 165 | <TextView | 168 | <TextView |
| 166 | android:layout_width="wrap_content" | 169 | android:layout_width="wrap_content" |
| 167 | android:layout_height="wrap_content" | 170 | android:layout_height="wrap_content" |
| 168 | android:text=" " | 171 | android:text=" " |
| 169 | android:textColor="@color/white" | 172 | android:textColor="@color/white" |
| 170 | android:textSize="22sp" /> | 173 | android:textSize="22sp" /> |
| 171 | 174 | ||
| 172 | <EditText | 175 | <EditText |
| 176 | android:id="@+id/tv_useinfo_adress1" | ||
| 173 | android:layout_width="wrap_content" | 177 | android:layout_width="wrap_content" |
| 174 | android:layout_height="wrap_content" | 178 | android:layout_height="wrap_content" |
| 175 | android:layout_marginLeft="50dp" | 179 | android:layout_marginLeft="50dp" |
| 176 | android:background="@null" | 180 | android:background="@null" |
| 177 | android:hint="请输入详细地址" | 181 | android:hint="请输入详细地址" |
| 178 | android:textSize="22sp" /> | 182 | android:textSize="22sp" /> |
| 179 | 183 | ||
| 180 | </LinearLayout> | 184 | </LinearLayout> |
| 181 | 185 | ||
| 182 | </LinearLayout> | 186 | </LinearLayout> |
| 183 | 187 | ||
| 184 | <LinearLayout | 188 | <LinearLayout |
| 185 | android:layout_width="wrap_content" | 189 | android:layout_width="wrap_content" |
| 186 | android:layout_height="wrap_content" | 190 | android:layout_height="wrap_content" |
| 187 | 191 | ||
| 188 | android:orientation="horizontal"> | 192 | android:orientation="horizontal"> |
| 189 | 193 | ||
| 190 | <View | 194 | <View |
| 191 | android:layout_width="450dp" | 195 | android:layout_width="450dp" |
| 192 | android:layout_height="0.7dp" | 196 | android:layout_height="0.7dp" |
| 193 | android:layout_marginLeft="150dp" | 197 | android:layout_marginLeft="150dp" |
| 194 | android:background="@color/electronic_text"> | 198 | android:background="@color/electronic_text"> |
| 195 | 199 | ||
| 196 | </View> | 200 | </View> |
| 197 | 201 | ||
| 198 | <View | 202 | <View |
| 199 | android:layout_width="450dp" | 203 | android:layout_width="450dp" |
| 200 | android:layout_height="0.7dp" | 204 | android:layout_height="0.7dp" |
| 201 | android:layout_marginLeft="80dp" | 205 | android:layout_marginLeft="80dp" |
| 202 | android:background="@color/electronic_text"> | 206 | android:background="@color/electronic_text"> |
| 203 | 207 | ||
| 204 | </View> | 208 | </View> |
| 205 | 209 | ||
| 206 | 210 | ||
| 207 | </LinearLayout> | 211 | </LinearLayout> |
| 208 | 212 | ||
| 209 | <LinearLayout | 213 | <LinearLayout |
| 210 | android:layout_width="match_parent" | 214 | android:layout_width="match_parent" |
| 211 | android:layout_height="wrap_content" | 215 | android:layout_height="wrap_content" |
| 212 | android:layout_marginLeft="200dp" | 216 | android:layout_marginLeft="200dp" |
| 213 | android:gravity="center_vertical" | 217 | android:gravity="center_vertical" |
| 214 | android:orientation="horizontal"> | 218 | android:orientation="horizontal"> |
| 215 | 219 | ||
| 216 | 220 | ||
| 217 | <LinearLayout | 221 | <LinearLayout |
| 218 | android:layout_width="0dp" | 222 | android:layout_width="0dp" |
| 219 | android:layout_height="80dp" | 223 | android:layout_height="80dp" |
| 220 | android:layout_weight="1" | 224 | android:layout_weight="1" |
| 221 | android:gravity="center_vertical"> | 225 | android:gravity="center_vertical"> |
| 222 | 226 | ||
| 223 | <TextView | 227 | <TextView |
| 224 | android:layout_width="wrap_content" | 228 | android:layout_width="wrap_content" |
| 225 | android:layout_height="wrap_content" | 229 | android:layout_height="wrap_content" |
| 226 | android:text="生日" | 230 | android:text="生日" |
| 227 | android:textColor="@color/pickerview_wheelview_textcolor_center" | 231 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 228 | android:textSize="22sp" /> | 232 | android:textSize="22sp" /> |
| 229 | 233 | ||
| 230 | <TextView | 234 | <TextView |
| 235 | android:id="@+id/tv_useinfo_birthday" | ||
| 231 | android:layout_width="wrap_content" | 236 | android:layout_width="wrap_content" |
| 232 | android:layout_height="wrap_content" | 237 | android:layout_height="wrap_content" |
| 233 | android:layout_marginLeft="50dp" | 238 | android:layout_marginLeft="50dp" |
| 234 | android:hint="请选择" | 239 | android:hint="请选择" |
| 235 | android:textSize="22sp" /> | 240 | android:textSize="22sp" /> |
| 236 | 241 | ||
| 237 | <ImageView | 242 | <ImageView |
| 238 | android:layout_width="wrap_content" | 243 | android:layout_width="wrap_content" |
| 239 | android:layout_height="wrap_content" | 244 | android:layout_height="wrap_content" |
| 240 | android:layout_marginLeft="150dp" | 245 | android:layout_marginLeft="150dp" |
| 241 | android:src="@mipmap/xiajiantou"/> | 246 | android:src="@mipmap/xiajiantou"/> |
| 242 | </LinearLayout> | 247 | </LinearLayout> |
| 243 | <LinearLayout | 248 | <LinearLayout |
| 244 | android:layout_width="0dp" | 249 | android:layout_width="0dp" |
| 245 | android:layout_height="80dp" | 250 | android:layout_height="80dp" |
| 246 | android:layout_weight="1" | 251 | android:layout_weight="1" |
| 247 | android:gravity="center_vertical"> | 252 | android:gravity="center_vertical"> |
| 248 | 253 | ||
| 249 | <TextView | 254 | <TextView |
| 250 | android:layout_width="wrap_content" | 255 | android:layout_width="wrap_content" |
| 251 | android:layout_height="wrap_content" | 256 | android:layout_height="wrap_content" |
| 252 | android:text="年级" | 257 | android:text="年级" |
| 253 | android:textColor="@color/pickerview_wheelview_textcolor_center" | 258 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 254 | android:textSize="22sp" /> | 259 | android:textSize="22sp" /> |
| 255 | 260 | ||
| 256 | <TextView | 261 | <TextView |
| 262 | android:id="@+id/tv_useinfo_gender" | ||
| 257 | android:layout_width="wrap_content" | 263 | android:layout_width="wrap_content" |
| 258 | android:layout_height="wrap_content" | 264 | android:layout_height="wrap_content" |
| 259 | android:layout_marginLeft="50dp" | 265 | android:layout_marginLeft="50dp" |
| 260 | android:hint="请选择" | 266 | android:hint="请选择" |
| 261 | android:textSize="22sp" /> | 267 | android:textSize="22sp" /> |
| 262 | 268 | ||
| 263 | <ImageView | 269 | <ImageView |
| 264 | android:layout_width="wrap_content" | 270 | android:layout_width="wrap_content" |
| 265 | android:layout_height="wrap_content" | 271 | android:layout_height="wrap_content" |
| 266 | android:layout_marginLeft="150dp" | 272 | android:layout_marginLeft="150dp" |
| 267 | android:src="@mipmap/xiajiantou"/> | 273 | android:src="@mipmap/xiajiantou"/> |
| 268 | </LinearLayout> | 274 | </LinearLayout> |
| 269 | 275 | ||
| 270 | </LinearLayout> | 276 | </LinearLayout> |
| 271 | 277 | ||
| 272 | <LinearLayout | 278 | <LinearLayout |
| 273 | android:layout_width="wrap_content" | 279 | android:layout_width="wrap_content" |
| 274 | android:layout_height="wrap_content" | 280 | android:layout_height="wrap_content" |
| 275 | 281 | ||
| 276 | android:orientation="horizontal"> | 282 | android:orientation="horizontal"> |
| 277 | 283 | ||
| 278 | <View | 284 | <View |
| 279 | android:layout_width="450dp" | 285 | android:layout_width="450dp" |
| 280 | android:layout_height="0.7dp" | 286 | android:layout_height="0.7dp" |
| 281 | android:layout_marginLeft="150dp" | 287 | android:layout_marginLeft="150dp" |
| 282 | android:background="@color/electronic_text"> | 288 | android:background="@color/electronic_text"> |
| 283 | 289 | ||
| 284 | </View> | 290 | </View> |
| 285 | 291 | ||
| 286 | <View | 292 | <View |
| 287 | android:layout_width="450dp" | 293 | android:layout_width="450dp" |
| 288 | android:layout_height="0.7dp" | 294 | android:layout_height="0.7dp" |
| 289 | android:layout_marginLeft="80dp" | 295 | android:layout_marginLeft="80dp" |
| 290 | android:background="@color/electronic_text"> | 296 | android:background="@color/electronic_text"> |
| 291 | 297 | ||
| 292 | </View> | 298 | </View> |
| 293 | 299 | ||
| 294 | 300 | ||
| 295 | </LinearLayout> | 301 | </LinearLayout> |
| 296 | 302 | ||
| 297 | <LinearLayout | 303 | <LinearLayout |
| 298 | android:layout_width="match_parent" | 304 | android:layout_width="match_parent" |
| 299 | android:layout_height="wrap_content" | 305 | android:layout_height="wrap_content" |
| 300 | android:layout_marginLeft="200dp" | 306 | android:layout_marginLeft="200dp" |
| 301 | android:gravity="center_vertical" | 307 | android:gravity="center_vertical" |
| 302 | android:orientation="horizontal"> | 308 | android:orientation="horizontal"> |
| 303 | 309 | ||
| 304 | <LinearLayout | 310 | <LinearLayout |
| 305 | android:id="@+id/lineL_buy_time" | 311 | android:id="@+id/lineL_buy_time" |
| 306 | android:layout_width="0dp" | 312 | android:layout_width="0dp" |
| 307 | android:layout_height="80dp" | 313 | android:layout_height="80dp" |
| 308 | android:layout_weight="1" | 314 | android:layout_weight="1" |
| 309 | android:gravity="center_vertical"> | 315 | android:gravity="center_vertical"> |
| 310 | 316 | ||
| 311 | <TextView | 317 | <TextView |
| 312 | android:layout_width="wrap_content" | 318 | android:layout_width="wrap_content" |
| 313 | android:layout_height="wrap_content" | 319 | android:layout_height="wrap_content" |
| 314 | android:text="Q Q" | 320 | android:text="Q Q" |
| 315 | android:textColor="@color/pickerview_wheelview_textcolor_center" | 321 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 316 | android:textSize="22sp" /> | 322 | android:textSize="22sp" /> |
| 317 | 323 | ||
| 318 | <EditText | 324 | <EditText |
| 319 | android:id="@+id/tv_buy_time" | 325 | android:id="@+id/tv_useinfo_qq" |
| 320 | android:layout_width="wrap_content" | 326 | android:layout_width="wrap_content" |
| 321 | android:layout_height="wrap_content" | 327 | android:layout_height="wrap_content" |
| 322 | android:layout_marginLeft="50dp" | 328 | android:layout_marginLeft="50dp" |
| 323 | android:background="@null" | 329 | android:background="@null" |
| 324 | android:hint="请输入" | 330 | android:hint="请输入" |
| 325 | android:textSize="22sp" /> | 331 | android:textSize="22sp" /> |
| 326 | 332 | ||
| 327 | </LinearLayout> | 333 | </LinearLayout> |
| 328 | 334 | ||
| 329 | <LinearLayout | 335 | <LinearLayout |
| 330 | android:layout_width="0dp" | 336 | android:layout_width="0dp" |
| 331 | android:layout_height="80dp" | 337 | android:layout_height="80dp" |
| 332 | android:layout_weight="1" | 338 | android:layout_weight="1" |
| 333 | 339 | ||
| 334 | android:gravity="center_vertical"> | 340 | android:gravity="center_vertical"> |
| 335 | 341 | ||
| 336 | <TextView | 342 | <TextView |
| 337 | android:layout_width="wrap_content" | 343 | android:layout_width="wrap_content" |
| 338 | android:layout_height="wrap_content" | 344 | android:layout_height="wrap_content" |
| 339 | android:text="学校" | 345 | android:text="学校" |
| 340 | android:textColor="@color/pickerview_wheelview_textcolor_center" | 346 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 341 | android:textSize="22sp" /> | 347 | android:textSize="22sp" /> |
| 342 | 348 | ||
| 343 | <TextView | 349 | <TextView |
| 350 | android:id="@+id/tv_useinfo_school" | ||
| 344 | android:layout_width="wrap_content" | 351 | android:layout_width="wrap_content" |
| 345 | android:layout_height="wrap_content" | 352 | android:layout_height="wrap_content" |
| 346 | android:layout_marginLeft="50dp" | 353 | android:layout_marginLeft="50dp" |
| 347 | android:text="请选择" | 354 | android:text="请选择" |
| 348 | android:textColor="@color/btn_text_color" | 355 | android:textColor="@color/btn_text_color" |
| 349 | android:textSize="22sp" /> | 356 | android:textSize="22sp" /> |
| 350 | 357 | ||
| 351 | <ImageView | 358 | <ImageView |
| 352 | android:layout_width="wrap_content" | 359 | android:layout_width="wrap_content" |
| 353 | android:layout_height="wrap_content" | 360 | android:layout_height="wrap_content" |
| 354 | android:layout_marginLeft="150dp" | 361 | android:layout_marginLeft="150dp" |
| 355 | android:src="@mipmap/xiajiantou"> | 362 | android:src="@mipmap/xiajiantou"> |
| 356 | 363 | ||
| 357 | </ImageView> | 364 | </ImageView> |
| 358 | </LinearLayout> | 365 | </LinearLayout> |
| 359 | 366 | ||
| 360 | </LinearLayout> | 367 | </LinearLayout> |
| 361 | 368 | ||
| 362 | <LinearLayout | 369 | <LinearLayout |
| 363 | android:layout_width="wrap_content" | 370 | android:layout_width="wrap_content" |
| 364 | android:layout_height="wrap_content" | 371 | android:layout_height="wrap_content" |
| 365 | android:orientation="horizontal"> | 372 | android:orientation="horizontal"> |
| 366 | 373 | ||
| 367 | <View | 374 | <View |
| 368 | android:layout_width="450dp" | 375 | android:layout_width="450dp" |
| 369 | android:layout_height="0.7dp" | 376 | android:layout_height="0.7dp" |
| 370 | android:layout_marginLeft="150dp" | 377 | android:layout_marginLeft="150dp" |
| 371 | android:background="@color/electronic_text"> | 378 | android:background="@color/electronic_text"> |
| 372 | 379 | ||
| 373 | </View> | 380 | </View> |
| 374 | 381 | ||
| 375 | <View | 382 | <View |
| 376 | android:layout_width="450dp" | 383 | android:layout_width="450dp" |
| 377 | android:layout_height="0.7dp" | 384 | android:layout_height="0.7dp" |
| 378 | android:layout_marginLeft="80dp" | 385 | android:layout_marginLeft="80dp" |
| 379 | android:background="@color/electronic_text"> | 386 | android:background="@color/electronic_text"> |
| 380 | 387 | ||
| 381 | </View> | 388 | </View> |
| 382 | 389 | ||
| 383 | 390 | ||
| 384 | </LinearLayout> | 391 | </LinearLayout> |
| 385 | 392 | ||
| 386 | </LinearLayout> | 393 | </LinearLayout> |
PersonalCenter/app/src/main/res/mipmap-xhdpi/paizhao.png
1.66 KB
PersonalCenter/app/src/main/res/mipmap-xhdpi/xiangce.png
1.71 KB
PersonalCenter/app/src/main/res/values/styles.xml
| 1 | <resources> | 1 | <resources> |
| 2 | 2 | ||
| 3 | <!-- Base application theme. --> | 3 | <!-- Base application theme. --> |
| 4 | <style name="AppTheme" parent="Theme.AppCompat"> | 4 | <style name="AppTheme" parent="Theme.AppCompat"> |
| 5 | <!-- Customize your theme here. --> | 5 | <!-- Customize your theme here. --> |
| 6 | <item name="colorPrimary">@color/colorPrimary</item> | 6 | <item name="colorPrimary">@color/colorPrimary</item> |
| 7 | <item name="colorPrimaryDark">@color/colorPrimaryDark</item> | 7 | <item name="colorPrimaryDark">@color/colorPrimaryDark</item> |
| 8 | <item name="colorAccent">@color/colorAccent</item> | 8 | <item name="colorAccent">@color/colorAccent</item> |
| 9 | </style> | 9 | </style> |
| 10 | 10 | ||
| 11 | <style name="login_register_edit_style"> | 11 | <style name="login_register_edit_style"> |
| 12 | <item name="android:textSize">19sp</item> | 12 | <item name="android:textSize">19sp</item> |
| 13 | <item name="android:singleLine">true</item> | 13 | <item name="android:singleLine">true</item> |
| 14 | <item name="android:background">@drawable/selector_edittext_bg</item> | 14 | <item name="android:background">@drawable/selector_edittext_bg</item> |
| 15 | <item name="android:layout_width">match_parent</item> | 15 | <item name="android:layout_width">match_parent</item> |
| 16 | <item name="android:layout_height">wrap_content</item> | 16 | <item name="android:layout_height">wrap_content</item> |
| 17 | <item name="android:textColorHint">@color/login_edittext_hint</item> | 17 | <item name="android:textColorHint">@color/login_edittext_hint</item> |
| 18 | <item name="android:padding">10dp</item> | 18 | <item name="android:padding">10dp</item> |
| 19 | </style> | 19 | </style> |
| 20 | 20 | ||
| 21 | <style name="login_register_edit_rect_style"> | 21 | <style name="login_register_edit_rect_style"> |
| 22 | <item name="android:textSize">19sp</item> | 22 | <item name="android:textSize">19sp</item> |
| 23 | <item name="android:singleLine">true</item> | 23 | <item name="android:singleLine">true</item> |
| 24 | <item name="android:background">@drawable/selector_edittext_rect_bg</item> | 24 | <item name="android:background">@drawable/selector_edittext_rect_bg</item> |
| 25 | <item name="android:layout_width">match_parent</item> | 25 | <item name="android:layout_width">match_parent</item> |
| 26 | <item name="android:layout_height">wrap_content</item> | 26 | <item name="android:layout_height">wrap_content</item> |
| 27 | <item name="android:textColorHint">@color/login_edittext_hint</item> | 27 | <item name="android:textColorHint">@color/login_edittext_hint</item> |
| 28 | <item name="android:padding">10dp</item> | 28 | <item name="android:padding">10dp</item> |
| 29 | </style> | 29 | </style> |
| 30 | 30 | ||
| 31 | <style name="login_register_btn_authcode_rect_style"> | 31 | <style name="login_register_btn_authcode_rect_style"> |
| 32 | <item name="android:textSize">19sp</item> | 32 | <item name="android:textSize">19sp</item> |
| 33 | <item name="android:singleLine">true</item> | 33 | <item name="android:singleLine">true</item> |
| 34 | <item name="android:background">@drawable/btn_rect_normal</item> | 34 | <item name="android:background">@drawable/btn_rect_normal</item> |
| 35 | <item name="android:layout_width">match_parent</item> | 35 | <item name="android:layout_width">match_parent</item> |
| 36 | <item name="android:layout_height">wrap_content</item> | 36 | <item name="android:layout_height">wrap_content</item> |
| 37 | <item name="android:textColorHint">@color/login_edittext_hint</item> | 37 | <item name="android:textColorHint">@color/login_edittext_hint</item> |
| 38 | <item name="android:padding">10dp</item> | 38 | <item name="android:padding">10dp</item> |
| 39 | </style> | 39 | </style> |
| 40 | <style name="text_login_register_style" > | 40 | <style name="text_login_register_style" > |
| 41 | <item name="android:layout_width">wrap_content</item> | 41 | <item name="android:layout_width">wrap_content</item> |
| 42 | <item name="android:layout_height">wrap_content</item> | 42 | <item name="android:layout_height">wrap_content</item> |
| 43 | <item name="android:textSize">22sp</item> | 43 | <item name="android:textSize">22sp</item> |
| 44 | <item name="android:gravity">center</item> | 44 | <item name="android:gravity">center</item> |
| 45 | <item name="android:padding">10dp</item> | 45 | <item name="android:padding">10dp</item> |
| 46 | </style> | 46 | </style> |
| 47 | <style name="button_login_register_style"> | 47 | <style name="button_login_register_style"> |
| 48 | <item name="android:layout_width">match_parent</item> | 48 | <item name="android:layout_width">match_parent</item> |
| 49 | <item name="android:layout_height">wrap_content</item> | 49 | <item name="android:layout_height">wrap_content</item> |
| 50 | <item name="android:background">@drawable/selector_blue_btn_bg</item> | 50 | <item name="android:background">@drawable/selector_blue_btn_bg</item> |
| 51 | <item name="android:textSize">23sp</item> | 51 | <item name="android:textSize">23sp</item> |
| 52 | <item name="android:gravity">center</item> | 52 | <item name="android:gravity">center</item> |
| 53 | <item name="android:padding">10dp</item> | 53 | <item name="android:padding">10dp</item> |
| 54 | <item name="android:textColor">@android:color/white</item> | 54 | <item name="android:textColor">@android:color/white</item> |
| 55 | </style> | 55 | </style> |
| 56 | <style name="text_forget_pwd_style" > | 56 | <style name="text_forget_pwd_style" > |
| 57 | <item name="android:layout_width">wrap_content</item> | 57 | <item name="android:layout_width">wrap_content</item> |
| 58 | <item name="android:layout_height">wrap_content</item> | 58 | <item name="android:layout_height">wrap_content</item> |
| 59 | <item name="android:textSize">18sp</item> | 59 | <item name="android:textSize">18sp</item> |
| 60 | <item name="android:gravity">center</item> | 60 | <item name="android:gravity">center</item> |
| 61 | <item name="android:padding">8dp</item> | 61 | <item name="android:padding">8dp</item> |
| 62 | </style> | 62 | </style> |
| 63 | <style name="registererrhint_style"> | 63 | <style name="registererrhint_style"> |
| 64 | <item name="android:textSize">14dip</item> | 64 | <item name="android:textSize">14dip</item> |
| 65 | <item name="android:layout_width">match_parent</item> | 65 | <item name="android:layout_width">match_parent</item> |
| 66 | <item name="android:layout_height">wrap_content</item> | 66 | <item name="android:layout_height">wrap_content</item> |
| 67 | <item name="android:textColor">@color/error_hint</item> | 67 | <item name="android:textColor">@color/error_hint</item> |
| 68 | <item name="android:layout_marginTop">5dip</item> | 68 | <item name="android:layout_marginTop">5dip</item> |
| 69 | </style> | 69 | </style> |
| 70 | <style name="iv_pwd_change_style"> | 70 | <style name="iv_pwd_change_style"> |
| 71 | <item name="android:layout_width">wrap_content</item> | 71 | <item name="android:layout_width">wrap_content</item> |
| 72 | <item name="android:layout_height">wrap_content</item> | 72 | <item name="android:layout_height">wrap_content</item> |
| 73 | <item name="android:background">@mipmap/pwd_hide</item> | 73 | <item name="android:background">@mipmap/pwd_hide</item> |
| 74 | <item name="android:layout_alignParentRight">true</item> | 74 | <item name="android:layout_alignParentRight">true</item> |
| 75 | <item name="android:layout_centerVertical">true</item> | 75 | <item name="android:layout_centerVertical">true</item> |
| 76 | <item name="android:layout_marginRight">15dp</item> | 76 | <item name="android:layout_marginRight">15dp</item> |
| 77 | </style> | 77 | </style> |
| 78 | <style name="dialogWindowAnim" parent="android:Animation" mce_bogus="1"> | ||
| 79 | <item name="android:windowEnterAnimation">@anim/dialog_enter_anim</item> | ||
| 80 | <item name="android:windowExitAnimation">@anim/dialog_exit_anim</item> | ||
| 81 | </style> | ||
| 78 | 82 | ||
| 79 | 83 | ||
| 80 | 84 | ||
| 81 | 85 | ||
| 82 | </resources> | 86 | </resources> |
| 83 | 87 |
PersonalCenter/build.gradle
| 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. | 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. |
| 2 | 2 | ||
| 3 | buildscript { | 3 | buildscript { |
| 4 | repositories { | 4 | repositories { |
| 5 | jcenter() | 5 | jcenter() |
| 6 | } | 6 | } |
| 7 | dependencies { | 7 | dependencies { |
| 8 | classpath 'com.android.tools.build:gradle:2.2.3' | 8 | classpath 'com.android.tools.build:gradle:2.2.3' |
| 9 | 9 | ||
| 10 | // NOTE: Do not place your application dependencies here; they belong | 10 | // NOTE: Do not place your application dependencies here; they belong |
| 11 | // in the individual module build.gradle files | 11 | // in the individual module build.gradle files |
| 12 | classpath 'com.novoda:bintray-release:0.3.4' | 12 | classpath 'com.novoda:bintray-release:0.3.4' |
| 13 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' | ||
| 13 | } | 14 | } |
| 14 | } | 15 | } |
| 15 | 16 | ||
| 16 | allprojects { | 17 | allprojects { |
| 17 | repositories { | 18 | repositories { |
| 18 | jcenter() | 19 | jcenter() |
| 19 | } | 20 | } |
| 20 | } | 21 | } |
| 21 | 22 | ||
| 22 | task clean(type: Delete) { | 23 | task clean(type: Delete) { |
| 23 | delete rootProject.buildDir | 24 | delete rootProject.buildDir |
| 24 | } | 25 | } |
| 25 | 26 |