Commit b4a2140e7266c771444e644ffed29e16b03a597a

Authored by xiongwei
0 parents
Exists in master

登录,注册 ,忘记密码,修改密码,更换手机号等。。界面

Showing 72 changed files with 2581 additions and 0 deletions   Show diff stats
File was created 1 # 忽略 /CallTecher/app/build/ 目录下的所有文件
2 CallTecher/app/build/
3
4 # 忽略 /CallTecher/.idea/ 目录下的所有文件
5 CallTecher/.idea/
6
7 # 忽略 /CallTecher/.gradle/ 目录下的所有文件
8 CallTecher/.gradle/
9
10 # 忽略 /CallTecher/build/ 目录下的所有文件
11 CallTecher/build/
12
13 # 忽略 /CallTecher/ZBLibrary/build/ 目录下的所有文件
14 CallTecher/ZBLibrary/build/
15
16
PersonalCenter/.gitignore
File was created 1 *.iml
2 .gradle
3 /local.properties
4 /.idea/workspace.xml
5 /.idea/libraries
6 .DS_Store
7 /build
8 /captures
9 .externalNativeBuild
10
PersonalCenter/.idea/compiler.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="CompilerConfiguration">
4 <resourceExtensions />
5 <wildcardResourcePatterns>
6 <entry name="!?*.java" />
7 <entry name="!?*.form" />
8 <entry name="!?*.class" />
9 <entry name="!?*.groovy" />
10 <entry name="!?*.scala" />
11 <entry name="!?*.flex" />
12 <entry name="!?*.kt" />
13 <entry name="!?*.clj" />
14 <entry name="!?*.aj" />
15 </wildcardResourcePatterns>
16 <annotationProcessing>
17 <profile default="true" name="Default" enabled="false">
18 <processorPath useClasspath="true" />
19 </profile>
20 </annotationProcessing>
21 </component>
22 </project>
PersonalCenter/.idea/copyright/profiles_settings.xml
File was created 1 <component name="CopyrightManager">
2 <settings default="" />
3 </component>
PersonalCenter/.idea/gradle.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="GradleSettings">
4 <option name="linkedExternalProjectsSettings">
5 <GradleProjectSettings>
6 <option name="distributionType" value="DEFAULT_WRAPPED" />
7 <option name="externalProjectPath" value="$PROJECT_DIR$" />
8 <option name="modules">
9 <set>
10 <option value="$PROJECT_DIR$" />
11 <option value="$PROJECT_DIR$/app" />
12 </set>
13 </option>
14 <option name="resolveModulePerSourceSet" value="false" />
15 </GradleProjectSettings>
16 </option>
17 </component>
18 </project>
PersonalCenter/.idea/misc.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="EntryPointsManager">
4 <entry_points version="2.0" />
5 </component>
6 <component name="NullableNotNullManager">
7 <option name="myDefaultNullable" value="android.support.annotation.Nullable" />
8 <option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
9 <option name="myNullables">
10 <value>
11 <list size="4">
12 <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
13 <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
14 <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
15 <item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
16 </list>
17 </value>
18 </option>
19 <option name="myNotNulls">
20 <value>
21 <list size="4">
22 <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
23 <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
24 <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
25 <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
26 </list>
27 </value>
28 </option>
29 </component>
30 <component name="ProjectLevelVcsManager" settingsEditedManually="false">
31 <OptionsSetting value="true" id="Add" />
32 <OptionsSetting value="true" id="Remove" />
33 <OptionsSetting value="true" id="Checkout" />
34 <OptionsSetting value="true" id="Update" />
35 <OptionsSetting value="true" id="Status" />
36 <OptionsSetting value="true" id="Edit" />
37 <ConfirmationsSetting value="0" id="Add" />
38 <ConfirmationsSetting value="0" id="Remove" />
39 </component>
40 <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
41 <output url="file://$PROJECT_DIR$/build/classes" />
42 </component>
43 <component name="ProjectType">
44 <option name="id" value="Android" />
45 </component>
46 <component name="masterDetails">
47 <states>
48 <state key="ProjectJDKs.UI">
49 <settings>
50 <last-edited>1.8</last-edited>
51 <splitter-proportions>
52 <option name="proportions">
53 <list>
54 <option value="0.2" />
55 </list>
56 </option>
57 </splitter-proportions>
58 </settings>
59 </state>
60 </states>
61 </component>
62 </project>
PersonalCenter/.idea/modules.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="ProjectModuleManager">
4 <modules>
5 <module fileurl="file://$PROJECT_DIR$/PersonalCenter.iml" filepath="$PROJECT_DIR$/PersonalCenter.iml" />
6 <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
7 </modules>
8 </component>
9 </project>
PersonalCenter/.idea/runConfigurations.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="RunConfigurationProducerService">
4 <option name="ignoredProducers">
5 <set>
6 <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
7 <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
8 <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
9 </set>
10 </option>
11 </component>
12 </project>
PersonalCenter/app/.gitignore
File was created 1 /build
2
PersonalCenter/app/build.gradle
File was created 1 apply plugin: 'com.android.application'
2
3 android {
4 compileSdkVersion 25
5 buildToolsVersion "25.0.3"
6 defaultConfig {
7 applicationId "com.hjx.personalcenter"
8 minSdkVersion 9
9 targetSdkVersion 25
10 versionCode 1
11 versionName "1.0"
12 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 }
14 buildTypes {
15 release {
16 minifyEnabled false
17 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 }
19 }
20 }
21
22 dependencies {
23 compile fileTree(dir: 'libs', include: ['*.jar'])
24 androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 exclude group: 'com.android.support', module: 'support-annotations'
26 })
27 compile 'com.android.support:appcompat-v7:25.3.1'
28 testCompile 'junit:junit:4.12'
29 }
30
PersonalCenter/app/proguard-rules.pro
File was created 1 # Add project specific ProGuard rules here.
2 # By default, the flags in this file are appended to flags specified
3 # in C:\Users\h\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 # You can edit the include path and order by changing the proguardFiles
5 # directive in build.gradle.
6 #
7 # For more details, see
8 # http://developer.android.com/guide/developing/tools/proguard.html
9
10 # Add any project specific keep options here:
11
12 # If your project uses WebView with JS, uncomment the following
13 # and specify the fully qualified class name to the JavaScript interface
14 # class:
15 #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 # public *;
17 #}
18
PersonalCenter/app/src/androidTest/java/com/hjx/personalcenter/ExampleInstrumentedTest.java
File was created 1 package com.hjx.personalcenter;
2
3 import android.content.Context;
4 import android.support.test.InstrumentationRegistry;
5 import android.support.test.runner.AndroidJUnit4;
6
7 import org.junit.Test;
8 import org.junit.runner.RunWith;
9
10 import static org.junit.Assert.*;
11
12 /**
13 * Instrumentation test, which will execute on an Android device.
14 *
15 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16 */
17 @RunWith(AndroidJUnit4.class)
18 public class ExampleInstrumentedTest {
19 @Test
20 public void useAppContext() throws Exception {
21 // Context of the app under test.
22 Context appContext = InstrumentationRegistry.getTargetContext();
23
24 assertEquals("com.hjx.personalcenter", appContext.getPackageName());
25 }
26 }
27
PersonalCenter/app/src/main/AndroidManifest.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 package="com.hjx.personalcenter">
4
5 <application
6 android:allowBackup="true"
7 android:icon="@mipmap/ic_launcher"
8 android:label="@string/app_name"
9 android:supportsRtl="true"
10 android:theme="@style/Theme.AppCompat.NoActionBar">
11 <activity
12 android:name=".activity.MainActivity"
13 android:launchMode="singleTask"
14 android:screenOrientation="landscape">
15 <intent-filter>
16 <action android:name="android.intent.action.MAIN" />
17
18 <category android:name="android.intent.category.LAUNCHER" />
19 </intent-filter>
20 </activity>
21 <activity
22 android:name=".activity.LoginAndRegisterActivity"
23 android:launchMode="singleTask"
24 android:screenOrientation="landscape">
25
26 </activity>
27 <activity
28 android:name=".activity.ForgotPasswordActivity"
29 android:launchMode="singleTask"
30 android:screenOrientation="landscape">
31
32 </activity>
33 <activity
34 android:name=".activity.ChangePasswordActivity"
35 android:launchMode="singleTask"
36 android:screenOrientation="landscape">
37
38 </activity>
39 <activity
40 android:name=".activity.RegisterInfoActivity"
41 android:launchMode="singleTask"
42 android:screenOrientation="landscape">
43
44 </activity>
45 <activity
46 android:name=".activity.ElectronicCardValidationActivity"
47 android:launchMode="singleTask"
48 android:screenOrientation="landscape">
49
50 </activity>
51 <activity
52 android:name=".activity.ChangeBangDingActivity"
53 android:launchMode="singleTask"
54 android:screenOrientation="landscape">
55
56 </activity>
57 <activity
58 android:name=".activity.ChangeElectronicCardInfoActivity"
59 android:launchMode="singleTask"
60 android:screenOrientation="landscape">
61
62 </activity>
63 <activity
64 android:name=".activity.ChangeEletronicCardPhone"
65 android:launchMode="singleTask"
66 android:screenOrientation="landscape">
67
68 </activity>
69 </application>
70
71 </manifest>
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ChangeBangDingActivity.java
File was created 1 package com.hjx.personalcenter.activity;
2
3 import android.app.Activity;
4 import android.os.Bundle;
5
6 import com.hjx.personalcenter.R;
7
8 /**
9 * Created by h on 2017/8/9.
10 */
11
12 public class ChangeBangDingActivity extends Activity {
13 @Override
14 protected void onCreate(Bundle savedInstanceState) {
15 super.onCreate(savedInstanceState);
16 setContentView(R.layout.activity_chage_binding);
17 }
18 }
19
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ChangeElectronicCardInfoActivity.java
File was created 1 package com.hjx.personalcenter.activity;
2
3 import android.app.Activity;
4 import android.os.Bundle;
5
6 import com.hjx.personalcenter.R;
7
8 /**
9 * Created by h on 2017/8/9.
10 */
11
12 public class ChangeElectronicCardInfoActivity extends Activity{
13 @Override
14 protected void onCreate(Bundle savedInstanceState) {
15 super.onCreate(savedInstanceState);
16 setContentView(R.layout.activity_change_card_info);
17 }
18 }
19
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ChangeEletronicCardPhone.java
File was created 1 package com.hjx.personalcenter.activity;
2
3 import android.app.Activity;
4 import android.os.Bundle;
5
6 import com.hjx.personalcenter.R;
7
8 /**
9 * Created by h on 2017/8/9.
10 */
11
12 public class ChangeEletronicCardPhone extends Activity {
13 @Override
14 protected void onCreate(Bundle savedInstanceState) {
15 super.onCreate(savedInstanceState);
16 setContentView(R.layout.activity_electronicard_phone);
17 }
18 }
19
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ChangePasswordActivity.java
File was created 1 package com.hjx.personalcenter.activity;
2
3 import android.app.Activity;
4 import android.os.Bundle;
5
6 import com.hjx.personalcenter.R;
7
8 /**
9 * Created by h on 2017/8/9.
10 */
11
12 public class ChangePasswordActivity extends Activity {
13 @Override
14 protected void onCreate(Bundle savedInstanceState) {
15 super.onCreate(savedInstanceState);
16 setContentView(R.layout.activity_changepsword);
17 }
18 }
19
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ElectronicCardValidationActivity.java
File was created 1 package com.hjx.personalcenter.activity;
2
3 import android.app.Activity;
4 import android.os.Bundle;
5
6 import com.hjx.personalcenter.R;
7
8 /**
9 * Created by h on 2017/8/9.
10 */
11
12 public class ElectronicCardValidationActivity extends Activity {
13 @Override
14 protected void onCreate(Bundle savedInstanceState) {
15 super.onCreate(savedInstanceState);
16 setContentView(R.layout.activity_electroniccard_validation);
17 }
18 }
19
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ForgotPasswordActivity.java
File was created 1 package com.hjx.personalcenter.activity;
2
3 import android.app.Activity;
4 import android.os.Bundle;
5
6 import com.hjx.personalcenter.R;
7
8 /**
9 * Created by h on 2017/8/9.
10 */
11
12 public class ForgotPasswordActivity extends Activity {
13 @Override
14 protected void onCreate(Bundle savedInstanceState) {
15 super.onCreate(savedInstanceState);
16 setContentView(R.layout.activity_forgetpsword);
17 }
18 }
19
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/LoginAndRegisterActivity.java
File was created 1 package com.hjx.personalcenter.activity;
2
3 import android.os.Bundle;
4 import android.support.annotation.Nullable;
5 import android.support.v4.app.Fragment;
6 import android.support.v4.view.ViewPager;
7 import android.support.v7.app.AppCompatActivity;
8
9 import com.hjx.personalcenter.R;
10 import com.hjx.personalcenter.adapter.LoginAndRegisterAdapter;
11 import com.hjx.personalcenter.fragment.RegisterFragment;
12 import com.hjx.personalcenter.fragment.LoginFragment;
13 import com.hjx.personalcenter.thirdparty.SlidingTabLayout;
14
15 import java.util.ArrayList;
16 import java.util.Arrays;
17 import java.util.List;
18
19 /**
20 * 登录和注册 熊巍
21 * Created by h on 2017/8/8.
22 */
23
24 public class LoginAndRegisterActivity extends AppCompatActivity {
25 private ViewPager viewPager;
26 private SlidingTabLayout tableLayout;
27 private List<Fragment> loginlist;
28 private LoginAndRegisterAdapter logindapter;
29 private List<String> title = Arrays.asList("登录", "注册");
30
31 @Override
32 protected void onCreate(@Nullable Bundle savedInstanceState) {
33 super.onCreate(savedInstanceState);
34 setContentView(R.layout.activity_loginandregister);
35 initView();
36 initData();
37 setLister();
38 }
39
40 private void initView() {
41 viewPager = (ViewPager) findViewById(R.id.viewpager_login);
42 tableLayout = (SlidingTabLayout) findViewById(R.id.TabLayout_id);
43 }
44
45 private void initData() {
46 loginlist = new ArrayList<>();
47 for (int i = 0; i < title.size(); i++) {
48 if (title.get(i).equals("登录")) {
49 loginlist.add(LoginFragment.newInstance(i + 1));
50 } else {
51 loginlist.add(RegisterFragment.newInstance(i + 1));
52 }
53 }
54
55
56 //设置Tab上的标题
57 tableLayout.setData(title);
58 //设置关联的ViewPager
59 tableLayout.setViewPager(viewPager, 0);
60 logindapter = new LoginAndRegisterAdapter(loginlist, getSupportFragmentManager());
61 //给ViewPager设置适配器
62 viewPager.setAdapter(logindapter);
63 //设置滑动时数据不丢失
64 viewPager.setOffscreenPageLimit(1);
65 //将TabLayout和ViewPager关联起来。
66 }
67
68 private void setLister() {
69 }
70
71
72 }
73
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/MainActivity.java
File was created 1 package com.hjx.personalcenter.activity;
2
3 import android.content.Intent;
4 import android.support.v7.app.AppCompatActivity;
5 import android.os.Bundle;
6 import android.view.View;
7 import android.widget.TextView;
8
9 import com.hjx.personalcenter.R;
10
11 public class MainActivity extends AppCompatActivity {
12 TextView ssss;
13 @Override
14 protected void onCreate(Bundle savedInstanceState) {
15 super.onCreate(savedInstanceState);
16 setContentView(R.layout.activity_main);
17 ssss = (TextView) findViewById(R.id.ssss);
18 ssss.setOnClickListener(new View.OnClickListener() {
19 @Override
20 public void onClick(View v) {
21 Intent intent = new Intent(MainActivity.this,LoginAndRegisterActivity.class);
22 startActivity(intent);
23 }
24 });
25 }
26 }
27
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/RegisterInfoActivity.java
File was created 1 package com.hjx.personalcenter.activity;
2
3 import android.app.Activity;
4 import android.app.AlertDialog;
5 import android.content.DialogInterface;
6 import android.os.Bundle;
7 import android.view.View;
8 import android.widget.Button;
9 import android.widget.EditText;
10 import android.widget.TextView;
11 import android.widget.Toast;
12
13 import com.hjx.personalcenter.R;
14
15 /**填写注册信息 熊巍
16 * Created by h on 2017/8/9.
17 */
18
19 public class RegisterInfoActivity extends Activity implements View.OnClickListener {
20 private EditText et_username;
21 private TextView et_region,et_grade,et_school;
22 private Button btn_ok;
23 String[] items;
24
25 @Override
26 protected void onCreate(Bundle savedInstanceState) {
27 super.onCreate(savedInstanceState);
28 setContentView(R.layout.activity_registerinfo);
29 initView();
30 initData();
31 initLister();
32 }
33
34 private void initView() {
35 et_username = (EditText) findViewById(R.id.et_username);
36 et_region = (TextView) findViewById(R.id.et_region);
37 et_grade = (TextView) findViewById(R.id.et_grade);
38 et_school = (TextView) findViewById(R.id.et_school);
39 btn_ok = (Button) findViewById(R.id.btn_ok);
40
41
42 }
43
44 private void initData() {
45 items = new String[] { "魏", "蜀", "吴" };
46
47 }
48
49 private void initLister() {
50 et_region.setOnClickListener(this);
51 et_grade.setOnClickListener(this);
52 et_school.setOnClickListener(this);
53
54
55 }
56
57 @Override
58 public void onClick(View v) {
59 switch (v.getId()){
60 case R.id.et_region:
61 break;
62 case R.id.et_grade:
63 choisegrade();
64 break;
65 case R.id.et_school:
66 break;
67 case R.id.btn_ok:
68 break;
69 }
70
71 }
72
73 private void choisegrade() {
74 AlertDialog dialog = new AlertDialog.Builder(this)
75 .setTitle("选择年级")
76 .setItems(items, new DialogInterface.OnClickListener() {
77 @Override
78 public void onClick(DialogInterface dialog, int which) {
79 Toast.makeText(RegisterInfoActivity.this, items[which], Toast.LENGTH_SHORT).show();
80 }
81 }).create();
82 dialog.show();
83 }
84 }
85
PersonalCenter/app/src/main/java/com/hjx/personalcenter/adapter/LoginAndRegisterAdapter.java
File was created 1 package com.hjx.personalcenter.adapter;
2
3 import android.support.v4.app.Fragment;
4 import android.support.v4.app.FragmentManager;
5 import android.support.v4.app.FragmentPagerAdapter;
6
7 import java.util.List;
8
9 /**
10 * Created by Administrator on 2016/11/7.
11 */
12
13 public class LoginAndRegisterAdapter extends FragmentPagerAdapter {
14 private List<Fragment> list;
15
16 public LoginAndRegisterAdapter(List<Fragment> list, FragmentManager fragmentManager) {
17 super(fragmentManager);
18 this.list = list;
19 }
20
21 @Override
22 public int getCount() {
23 return list.size();
24 }
25
26 @Override
27 public Fragment getItem(int position) {
28 return list.get(position);
29 }
30
31 }
32
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/LoginFragment.java
File was created 1 package com.hjx.personalcenter.fragment;
2
3 import android.content.Intent;
4 import android.os.Bundle;
5 import android.support.annotation.Nullable;
6 import android.support.v4.app.Fragment;
7 import android.view.LayoutInflater;
8 import android.view.View;
9 import android.view.ViewGroup;
10 import android.widget.TextView;
11
12 import com.hjx.personalcenter.R;
13 import com.hjx.personalcenter.activity.ForgotPasswordActivity;
14
15 /**
16 * 登录
17 * Created by h on 2017/8/8.
18 */
19
20 public class LoginFragment extends Fragment implements View.OnClickListener {
21 private View mView;
22 private int type;
23 private TextView tv_forget_pwd;
24 public static String TABLAYOUT_FRAGMENT = "tab_fragment";
25
26 public static LoginFragment newInstance(int type) {
27 LoginFragment fragment = new LoginFragment();
28 Bundle bundle = new Bundle();
29 bundle.putSerializable(TABLAYOUT_FRAGMENT, type);
30 fragment.setArguments(bundle);
31 return fragment;
32
33 }
34
35 @Override
36 public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
37 if (mView == null) {
38 mView = inflater.inflate(R.layout.fragment_loginandregister_login, container, false);
39 initView(mView);
40 initData();
41 setLister();
42
43
44 }
45 return mView;
46 }
47 //初始化
48 private void initView(View mView) {
49 tv_forget_pwd = (TextView) mView.findViewById(R.id.tv_forget_pwd);
50
51 }
52 private void initData() {
53 }
54 private void setLister() {
55 tv_forget_pwd.setOnClickListener(this);
56 }
57
58
59 @Override
60 public void onClick(View v) {
61 switch (v.getId()){
62 case R.id.tv_forget_pwd:
63 Intent intent = new Intent();
64 intent.setClass(getActivity(),ForgotPasswordActivity.class);
65 startActivity(intent);
66 getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout);
67 break;
68 }
69
70 }
71 }
72
PersonalCenter/app/src/main/java/com/hjx/personalcenter/fragment/RegisterFragment.java
File was created 1 package com.hjx.personalcenter.fragment;
2
3 import android.content.Intent;
4 import android.os.Bundle;
5 import android.support.annotation.Nullable;
6 import android.support.v4.app.Fragment;
7 import android.view.LayoutInflater;
8 import android.view.View;
9 import android.view.ViewGroup;
10 import android.widget.Button;
11
12 import com.hjx.personalcenter.R;
13 import com.hjx.personalcenter.activity.RegisterInfoActivity;
14
15 /**
16 * 注册
17 * Created by Administrator on 2016/11/7.
18 */
19
20 public class RegisterFragment extends Fragment implements View.OnClickListener {
21 private View mView;
22 private Button btn_register;
23 private int type;
24 public static String TABLAYOUT_FRAGMENT = "tab_fragment";
25
26 public static RegisterFragment newInstance(int type) {
27 RegisterFragment fragment = new RegisterFragment();
28 Bundle bundle = new Bundle();
29 bundle.putSerializable(TABLAYOUT_FRAGMENT, type);
30 fragment.setArguments(bundle);
31 return fragment;
32
33 }
34 @Override
35 public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
36 if (mView == null) {
37 mView = inflater.inflate(R.layout.fragment_loginandregister_register, container, false);
38 initView(mView);
39 initData();
40 setLister();
41
42
43 }
44 return mView;
45 }
46
47 private void initView(View mView) {
48 btn_register = (Button) mView.findViewById(R.id.btn_register);
49
50 }
51 private void initData() {
52 }
53 private void setLister() {
54 btn_register.setOnClickListener(this);
55 }
56
57
58 @Override
59 public void onClick(View v) {
60 switch (v.getId()){
61 case R.id.btn_register:
62 Intent intent = new Intent();
63 intent.setClass(getActivity(),RegisterInfoActivity.class);
64 startActivity(intent);
65 getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout);
66 break;
67 }
68
69 }
70 }
71
PersonalCenter/app/src/main/java/com/hjx/personalcenter/thirdparty/SlidingTabLayout.java
File was created 1 package com.hjx.personalcenter.thirdparty;
2
3 import android.content.Context;
4 import android.graphics.Bitmap;
5 import android.graphics.BitmapFactory;
6 import android.graphics.Canvas;
7 import android.support.v4.view.ViewPager;
8 import android.support.v4.view.ViewPager.OnPageChangeListener;
9 import android.util.AttributeSet;
10 import android.util.DisplayMetrics;
11 import android.util.TypedValue;
12 import android.view.Gravity;
13 import android.view.View;
14 import android.view.WindowManager;
15 import android.widget.HorizontalScrollView;
16 import android.widget.LinearLayout;
17 import android.widget.TextView;
18
19 import com.hjx.personalcenter.R;
20
21 import java.util.List;
22
23 /**
24 * 首页滑动条
25 *
26 * @author gaok
27 * @date 2017/7/6
28 */
29 public class SlidingTabLayout extends HorizontalScrollView {
30 private Context mContext;
31 private int selection = 0;
32 /**
33 * tab容器
34 */
35 private LinearLayout mItemsLayout;
36 /**
37 * 指示器
38 */
39 private Bitmap mSlideIcon;
40 /**
41 * 指示器初始X偏移量
42 */
43 private int mInitTranslationX;
44 /**
45 * 指示器初始Y偏移量
46 */
47 private int mInitTranslationY;
48 /**
49 * 滑动过程中指示器的水平偏移量
50 */
51 private int mTranslationX;
52 /**
53 * tab总数
54 */
55 private int mTotalItemsCount;
56 /**
57 * 指示器绘制数据的初始化标志
58 */
59 private boolean isFirstTime = true;
60 /**
61 * 页面可见的tab数量,默认4个
62 */
63 private int VISIBLE_TAB_COUNT = 2;
64 /**
65 * 移动到倒数第几个,容器开始滑动
66 */
67 private int START_SCROLL = 2;
68 /**
69 * 标题正常时的颜色
70 */
71 private static final int COLOR_TEXT_NORMAL = 0xFF666666;
72 /**
73 * 标题选中时的颜色
74 */
75 private static final int COLOR_TEXT_HIGHLIGHTCOLOR = 0xFF21c4ff;
76 private ViewPager mViewPager;
77 private List<String> mTabTitles;
78 private int mTabVisibleCount = VISIBLE_TAB_COUNT;
79 private OnPageChangeListener onPageChangeListener;
80
81 public SlidingTabLayout(Context context) {
82 this(context, null);
83 }
84
85 public SlidingTabLayout(Context context, AttributeSet attrs) {
86 super(context, attrs);
87 this.mContext = context;
88 this.mSlideIcon = BitmapFactory.decodeResource(getResources(), R.mipmap.blank);
89 this.mItemsLayout = new LinearLayout(context);
90 initTabStripParams();
91 addView(mItemsLayout, 0, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
92 }
93
94 public void scroll(int position, float positionOffset) {
95 int tabWidth = mItemsLayout.getChildAt(position).getWidth();
96 mTranslationX = (int) ((position + positionOffset) * tabWidth);
97
98 // 容器滚动,当移动到倒数最后一个的时候,开始滚动
99 if (positionOffset > 0 && position >= (VISIBLE_TAB_COUNT - START_SCROLL) && mTotalItemsCount > VISIBLE_TAB_COUNT) {
100 if (VISIBLE_TAB_COUNT != 1) {
101 //注意这里是整体滑动,使得tabs跟指示器保持相对静止
102 this.scrollTo((position - (VISIBLE_TAB_COUNT - START_SCROLL)) * tabWidth + (int) (tabWidth * positionOffset), 0);
103 } else
104 // 为count为1时 的特殊处理
105 {
106 this.scrollTo(position * tabWidth + (int) (tabWidth * positionOffset), 0);
107 }
108 }
109 invalidate();
110 }
111
112 private void initTabStripParams() {
113 mItemsLayout.setClipChildren(false);
114 mItemsLayout.setClipToPadding(false);
115 mItemsLayout.setGravity(Gravity.BOTTOM);
116 mItemsLayout.setPadding(0, 0, 0, 0);
117 }
118
119 /**
120 * 绘制指示器
121 */
122 @Override
123 protected void dispatchDraw(Canvas canvas) {
124 canvas.save();
125 // 平移到正确的位置
126 canvas.translate(mInitTranslationX + mTranslationX, this.mInitTranslationY);//修正tabs的平移量
127 canvas.drawBitmap(this.mSlideIcon, 0, 0, null);
128 canvas.restore();
129 super.dispatchDraw(canvas);
130 }
131
132 @Override
133 protected void onLayout(boolean changed, int l, int t, int r, int b) {
134 super.onLayout(changed, l, t, r, b);
135 if (isFirstTime && (mTotalItemsCount > 0) && getItemView(this.selection) != null) {
136 View currentItemView = getItemView(this.selection);
137 this.mInitTranslationX = (currentItemView.getLeft() + currentItemView.getWidth() / 2 - this.mSlideIcon.getWidth() / 2);
138 this.mInitTranslationY = (b - t - this.mSlideIcon.getHeight());
139 isFirstTime = false;
140 }
141 }
142
143 public void setVisibleTabCount(int VISIBLE_TAB_COUNT) {
144 this.VISIBLE_TAB_COUNT = VISIBLE_TAB_COUNT;
145 }
146
147 public void setStartScroll(int START_SCROLL) {
148 this.START_SCROLL = START_SCROLL;
149 }
150
151 public View getItemView(int itemPosition) {
152 if ((itemPosition >= 0) && (itemPosition < this.mTotalItemsCount)) {
153 return this.mItemsLayout.getChildAt(itemPosition);
154 }
155 return null;
156 }
157
158 public void setData(List<String> datas) {
159 mTotalItemsCount = 0;
160 // 如果传入的list有值,则移除布局文件中设置的view
161 if (datas != null && datas.size() > 0) {
162 this.mItemsLayout.removeAllViews();
163 this.mTabTitles = datas;
164
165 for (String title : mTabTitles) {
166 // 添加view
167 this.mItemsLayout.addView(generateTextView(title));
168 mTotalItemsCount++;
169 }
170 // 设置item的click事件
171 setItemClickEvent();
172 }
173 }
174
175 /**
176 * 对外的ViewPager的回调接口
177 *
178 * @author zhy
179 */
180 public interface PageChangeListener {
181 void onPageScrolled(int position, float positionOffset, int positionOffsetPixels);
182
183 void onPageSelected(int position);
184
185 void onPageScrollStateChanged(int state);
186 }
187
188 // 设置关联的ViewPager
189 public void setViewPager(ViewPager mViewPager, int pos) {
190 this.mViewPager = mViewPager;
191
192 mViewPager.addOnPageChangeListener(new OnPageChangeListener() {
193 @Override
194 public void onPageSelected(int position) {
195 // 设置字体颜色高亮
196 resetTextViewColor();
197 highLightTextView(position);
198
199 // 回调
200 if (onPageChangeListener != null) {
201 onPageChangeListener.onPageSelected(position);
202 }
203 }
204
205 @Override
206 public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
207 // 滚动
208 scroll(position, positionOffset);
209
210 // 回调
211 if (onPageChangeListener != null) {
212 onPageChangeListener.onPageScrolled(position, positionOffset, positionOffsetPixels);
213 }
214
215 }
216
217 @Override
218 public void onPageScrollStateChanged(int state) {
219 // 回调
220 if (onPageChangeListener != null) {
221 onPageChangeListener.onPageScrollStateChanged(state);
222 }
223
224 }
225 });
226 // 设置当前页
227 mViewPager.setCurrentItem(pos);
228 // 高亮
229 highLightTextView(pos);
230 }
231
232 /**
233 * 重置文本颜色
234 */
235 private void resetTextViewColor() {
236 for (int i = 0; i < mItemsLayout.getChildCount(); i++) {
237 View view = mItemsLayout.getChildAt(i);
238 if (view instanceof TextView) {
239 ((TextView) view).setTextColor(COLOR_TEXT_NORMAL);
240 }
241 }
242 }
243
244 /**
245 * 高亮文本
246 *
247 * @param position
248 */
249 protected void highLightTextView(int position) {
250 View view = mItemsLayout.getChildAt(position);
251 if (view instanceof TextView) {
252 ((TextView) view).setTextColor(COLOR_TEXT_HIGHLIGHTCOLOR);
253 }
254
255 }
256
257 private void setItemClickEvent() {
258 int cCount = mItemsLayout.getChildCount();
259 for (int i = 0; i < cCount; i++) {
260 final int j = i;
261 View view = mItemsLayout.getChildAt(i);
262 view.setOnClickListener(new OnClickListener() {
263 @Override
264 public void onClick(View v) {
265 mViewPager.setCurrentItem(j);
266 }
267 });
268 }
269 }
270
271 /**
272 * 根据标题生成我们的TextView
273 *
274 * @param text
275 * @return
276 */
277 private TextView generateTextView(String text) {
278 TextView tv = new TextView(getContext());
279 LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
280 lp.width = getScreenWidth() / mTabVisibleCount;
281 tv.setGravity(Gravity.CENTER);
282 tv.setTextColor(COLOR_TEXT_NORMAL);
283 tv.setText(text);
284 tv.setTextSize(TypedValue.TYPE_NULL, 34);
285 tv.setLayoutParams(lp);
286 return tv;
287 }
288
289 /**
290 * 获得屏幕的宽度
291 *
292 * @return
293 */
294 public int getScreenWidth() {
295 WindowManager wm = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE);
296 DisplayMetrics outMetrics = new DisplayMetrics();
297 wm.getDefaultDisplay().getMetrics(outMetrics);
298 return outMetrics.widthPixels;
299 }
300
301 public LinearLayout getLinearLayout() {
302 return mItemsLayout;
303 }
304 }
PersonalCenter/app/src/main/res/anim/rightin.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <set xmlns:android="http://schemas.android.com/apk/res/android"
3 android:interpolator="@android:anim/decelerate_interpolator">
4 <scale android:fromXScale="0.1" android:toXScale="1.0"
5 android:fromYScale="0.1" android:toYScale="1.0"
6 android:pivotX="50%p" android:pivotY="50%p"
7 android:duration="300" />
8 <!-- 这里为了看到动画演示效果,把动画持续时间设为3秒 -->
9 <alpha
10 android:fromAlpha="0.1"
11 android:toAlpha="1.0"
12 android:duration="300" />
13 </set>
PersonalCenter/app/src/main/res/anim/rightout.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <set xmlns:android="http://schemas.android.com/apk/res/android"
3 android:interpolator="@android:anim/decelerate_interpolator"
4 android:zAdjustment="top">
5 <scale android:fromXScale="1.0" android:toXScale=".5"
6 android:fromYScale="1.0" android:toYScale=".5"
7 android:pivotX="50%p" android:pivotY="50%p"
8 android:duration="300" />
9 <!-- 系统内置的动画持续时间
10 android:duration="@android:integer/config_mediumAnimTime"
11 -->
12 <alpha android:fromAlpha="1.0" android:toAlpha="0"
13 android:duration="300"/>
14 </set>
PersonalCenter/app/src/main/res/color/btn_text_color.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector xmlns:android="http://schemas.android.com/apk/res/android">
3
4 <item android:state_selected="true" android:color="@color/login_text_blue"/>
5 <item android:state_focused="true" android:color="@color/login_text_blue"/>
6 <item android:state_pressed="true" android:color="@color/login_text_blue"/>
7 <item android:color="@color/login_text_black"/>
8
9 </selector>
PersonalCenter/app/src/main/res/drawable/blue_btn_bg_normal.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <shape xmlns:android="http://schemas.android.com/apk/res/android"
3 android:shape="rectangle" >
4
5 <solid android:color="@color/login_text_blue" />
6
7 <corners
8 android:bottomLeftRadius="8dp"
9 android:bottomRightRadius="8dp"
10 android:topLeftRadius="8dp"
11 android:topRightRadius="8dp" />
12
13 <stroke
14 android:width="1px"
15 android:color="@color/login_text_blue" />
16
17 </shape>
PersonalCenter/app/src/main/res/drawable/blue_btn_bg_pressed.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <shape xmlns:android="http://schemas.android.com/apk/res/android"
3 android:shape="rectangle" >
4
5 <solid android:color="@color/login_text_blue" />
6
7 <corners
8 android:bottomLeftRadius="8dp"
9 android:bottomRightRadius="8dp"
10 android:topLeftRadius="8dp"
11 android:topRightRadius="8dp" />
12
13 <stroke
14 android:width="1px"
15 android:color="@color/login_text_blue" />
16
17 </shape>
PersonalCenter/app/src/main/res/drawable/btn_rect_normal.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <shape xmlns:android="http://schemas.android.com/apk/res/android"
3 android:shape="rectangle" >
4
5 <solid android:color="#ffffffff" />
6
7 <corners
8 android:bottomLeftRadius="0dp"
9 android:bottomRightRadius="8dp"
10 android:topLeftRadius="0dp"
11 android:topRightRadius="8dp" />
12
13 <stroke
14 android:width="2px"
15 android:color="@color/login_edittext_normal" />
16
17 </shape>
PersonalCenter/app/src/main/res/drawable/edittext_input_normal.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <shape xmlns:android="http://schemas.android.com/apk/res/android"
3 android:shape="rectangle" >
4
5 <solid android:color="#ffffffff" />
6
7 <corners
8 android:bottomLeftRadius="8dp"
9 android:bottomRightRadius="8dp"
10 android:topLeftRadius="8dp"
11 android:topRightRadius="8dp" />
12
13 <stroke
14 android:width="2px"
15 android:color="@color/login_edittext_normal" />
16
17 </shape>
PersonalCenter/app/src/main/res/drawable/edittext_input_pressed.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <shape xmlns:android="http://schemas.android.com/apk/res/android"
3 android:shape="rectangle" >
4
5 <solid android:color="#ffffffff" />
6
7 <corners
8 android:bottomLeftRadius="8dp"
9 android:bottomRightRadius="8dp"
10 android:topLeftRadius="8dp"
11 android:topRightRadius="8dp" />
12
13 <stroke
14 android:width="2px"
15 android:color="@color/login_edittext_pressed" />
16
17 </shape>
PersonalCenter/app/src/main/res/drawable/edittext_rect_input_normal.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <shape xmlns:android="http://schemas.android.com/apk/res/android"
3 android:shape="rectangle" >
4
5 <solid android:color="#ffffffff" />
6
7 <corners
8 android:bottomLeftRadius="8dp"
9 android:bottomRightRadius="0dp"
10 android:topLeftRadius="8dp"
11 android:topRightRadius="0dp" />
12
13 <stroke
14 android:width="2px"
15 android:color="@color/login_edittext_normal" />
16
17 </shape>
PersonalCenter/app/src/main/res/drawable/edittext_rect_input_pressed.xml
File was created 1 <?xml version="1.0" encoding="UTF-8"?>
2 <shape xmlns:android="http://schemas.android.com/apk/res/android"
3 android:shape="rectangle" >
4
5 <solid android:color="#ffffffff" />
6
7 <corners
8 android:bottomLeftRadius="8dp"
9 android:bottomRightRadius="0dp"
10 android:topLeftRadius="8dp"
11 android:topRightRadius="0dp" />
12
13 <stroke
14 android:width="2px"
15 android:color="@color/login_edittext_pressed" />
16
17 </shape>
PersonalCenter/app/src/main/res/drawable/selector_blue_btn_bg.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector xmlns:android="http://schemas.android.com/apk/res/android">
3 <item android:drawable="@drawable/blue_btn_bg_pressed" android:state_pressed="true"/>
4 <item android:drawable="@drawable/blue_btn_bg_pressed" android:state_checked="true"/>
5 <item android:drawable="@drawable/blue_btn_bg_normal"/>
6 </selector>
PersonalCenter/app/src/main/res/drawable/selector_edittext_bg.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector xmlns:android="http://schemas.android.com/apk/res/android">
3 <item android:drawable="@drawable/edittext_input_pressed" android:state_pressed="true"/>
4 <item android:drawable="@drawable/edittext_input_pressed" android:state_focused="true"/>
5 <item android:drawable="@drawable/edittext_input_normal"/>
6 </selector>
PersonalCenter/app/src/main/res/drawable/selector_edittext_rect_bg.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector xmlns:android="http://schemas.android.com/apk/res/android">
3 <item android:drawable="@drawable/edittext_rect_input_pressed" android:state_pressed="true"/>
4 <item android:drawable="@drawable/edittext_rect_input_pressed" android:state_focused="true"/>
5 <item android:drawable="@drawable/edittext_rect_input_normal"/>
6 </selector>
PersonalCenter/app/src/main/res/layout/activity_chage_binding.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:background="#ffffffff"
6 android:orientation="vertical">
7 <RelativeLayout
8 android:id="@+id/title"
9 android:layout_width="match_parent"
10 android:layout_height="wrap_content"
11 android:background="@color/login_text_blue"
12 android:minHeight="50dp" >
13
14 <ImageView
15 android:id="@+id/cancel"
16 android:layout_width="wrap_content"
17 android:layout_height="wrap_content"
18 android:layout_centerVertical="true"
19 android:paddingLeft="20dp"
20 android:paddingRight="20dp"
21 android:src="@mipmap/title_back" />
22
23 <TextView
24 android:id="@+id/menu_title"
25 android:layout_width="wrap_content"
26 android:layout_height="wrap_content"
27 android:layout_centerInParent="true"
28 android:text="@string/string_electroniccard_change_bangding"
29 android:textColor="@android:color/white"
30 android:textSize="22sp" />
31 </RelativeLayout>
32 <RelativeLayout
33 android:layout_width="match_parent"
34 android:layout_height="match_parent"
35 android:layout_below="@id/title"
36 android:background="#ffffffff"
37 android:orientation="vertical"
38 android:paddingLeft="250dp"
39 android:paddingRight="250dp" >
40
41 <EditText
42 android:id="@+id/et_phonenumber"
43 style="@style/login_register_edit_style"
44 android:layout_marginTop="150dp"
45 android:hint="手机号"
46 android:inputType="phone" />
47
48 <TextView
49 android:id="@+id/phonenumber_error_hint"
50 style="@style/registererrhint_style"
51 android:layout_below="@id/et_phonenumber" />
52
53 <LinearLayout
54 android:id="@+id/rl_authcode"
55 android:layout_width="match_parent"
56 android:layout_height="wrap_content"
57 android:layout_below="@id/et_phonenumber"
58 android:layout_marginTop="30dp"
59 android:orientation="horizontal">
60
61 <EditText
62 android:id="@+id/et_authcode"
63 style="@style/login_register_edit_rect_style"
64 android:layout_marginRight="-4px"
65 android:layout_weight="1"
66 android:hint="验证码"
67 android:numeric="integer" />
68
69 <Button
70 android:id="@+id/btn_authcode"
71 style="@style/login_register_btn_authcode_rect_style"
72 android:layout_marginLeft="0px"
73 android:layout_marginTop="0px"
74 android:layout_weight="2"
75 android:text="获取验证码"
76 android:textColor="@color/btn_text_color" />
77 </LinearLayout>
78
79 <TextView
80 android:id="@+id/authcode_error_hint"
81 style="@style/registererrhint_style"
82 android:layout_below="@id/rl_authcode" />
83
84 <TextView
85 android:id="@+id/password_error_hint"
86 style="@style/registererrhint_style"
87 android:layout_below="@id/rl_authcode" />
88
89 <Button
90 android:id="@+id/btn_register"
91 style="@style/button_login_register_style"
92 android:layout_below="@id/rl_authcode"
93 android:layout_marginTop="30dp"
94 android:text="@string/ok" />
95 </RelativeLayout>
96
97 </RelativeLayout>
PersonalCenter/app/src/main/res/layout/activity_change_card_info.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:background="#ffffffff"
6 android:orientation="vertical">
7
8 <RelativeLayout
9 android:id="@+id/title"
10 android:layout_width="match_parent"
11 android:layout_height="wrap_content"
12 android:background="@color/login_text_blue"
13 android:minHeight="50dp">
14
15 <ImageView
16 android:id="@+id/cancel"
17 android:layout_width="wrap_content"
18 android:layout_height="wrap_content"
19 android:layout_centerVertical="true"
20 android:paddingLeft="20dp"
21 android:paddingRight="20dp"
22 android:src="@mipmap/title_back" />
23
24 <TextView
25 android:id="@+id/menu_title"
26 android:layout_width="wrap_content"
27 android:layout_height="wrap_content"
28 android:layout_centerInParent="true"
29 android:text="@string/string_electroniccard_info_change"
30 android:textColor="@android:color/white"
31 android:textSize="22sp" />
32 </RelativeLayout>
33
34 <RelativeLayout
35 android:layout_width="match_parent"
36 android:layout_height="match_parent"
37 android:layout_below="@id/title"
38 android:background="#ffffffff"
39 android:orientation="vertical"
40 android:paddingLeft="250dp"
41 android:paddingRight="250dp">
42
43 <EditText
44 android:id="@+id/et_phonenumber"
45 style="@style/login_register_edit_style"
46 android:layout_marginTop="150dp"
47 android:hint="手机号"
48 android:inputType="phone" />
49
50 <TextView
51 android:id="@+id/phonenumber_error_hint"
52 style="@style/registererrhint_style"
53 android:layout_below="@id/et_phonenumber" />
54
55 <LinearLayout
56 android:id="@+id/rl_authcode"
57 android:layout_width="match_parent"
58 android:layout_height="wrap_content"
59 android:layout_below="@id/et_phonenumber"
60 android:layout_marginTop="30dp"
61 android:orientation="horizontal">
62
63 <EditText
64 android:id="@+id/et_authcode"
65 style="@style/login_register_edit_rect_style"
66 android:layout_marginRight="-4px"
67 android:layout_weight="1"
68 android:hint="验证码"
69 android:numeric="integer" />
70
71 <Button
72 android:id="@+id/btn_authcode"
73 style="@style/login_register_btn_authcode_rect_style"
74 android:layout_marginLeft="0px"
75 android:layout_marginTop="0px"
76 android:layout_weight="2"
77 android:text="获取验证码"
78 android:textColor="@color/btn_text_color" />
79 </LinearLayout>
80
81 <TextView
82 android:id="@+id/authcode_error_hint"
83 style="@style/registererrhint_style"
84 android:layout_below="@id/rl_authcode" />
85
86 <RelativeLayout
87 android:id="@+id/pwd_rl"
88 android:layout_width="match_parent"
89 android:layout_height="wrap_content"
90 android:layout_below="@id/rl_authcode"
91 android:layout_marginTop="30dp">
92
93 <EditText
94 android:id="@+id/et_newpassword"
95 style="@style/login_register_edit_style"
96 android:hint="请选择地区"
97 android:inputType="textPassword" />
98
99 <ImageView
100 android:id="@+id/iv_pwd_change"
101 style="@style/iv_pwd_change_style" />
102 </RelativeLayout>
103
104 <TextView
105 android:id="@+id/newpassword_error_hint"
106 style="@style/registererrhint_style"
107 android:layout_below="@id/pwd_rl" />
108
109 <EditText
110 android:id="@+id/et_again_newpassword"
111 style="@style/login_register_edit_style"
112 android:layout_below="@id/pwd_rl"
113 android:layout_marginTop="30dp"
114 android:hint="请选择详细地址"
115 android:inputType="textPassword" />
116
117 <TextView
118 android:id="@+id/again_newpassword_error_hint"
119 style="@style/registererrhint_style"
120 android:layout_below="@id/et_again_newpassword" />
121
122 <Button
123 android:id="@+id/btn_ok"
124 style="@style/button_login_register_style"
125 android:layout_below="@id/et_again_newpassword"
126 android:layout_marginTop="30dp"
127 android:text="@string/ok" />
128 </RelativeLayout>
129
130 </RelativeLayout>
PersonalCenter/app/src/main/res/layout/activity_changepsword.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:background="#ffffffff"
6 android:orientation="vertical" >
7
8 <RelativeLayout
9 android:id="@+id/title"
10 android:layout_width="match_parent"
11 android:layout_height="wrap_content"
12 android:background="@color/login_text_blue"
13 android:minHeight="50dp" >
14
15 <ImageView
16 android:id="@+id/cancel"
17 android:layout_width="wrap_content"
18 android:layout_height="wrap_content"
19 android:layout_centerVertical="true"
20 android:paddingLeft="20dp"
21 android:paddingRight="20dp"
22 android:src="@mipmap/title_back" />
23
24 <TextView
25 android:id="@+id/menu_title"
26 android:layout_width="wrap_content"
27 android:layout_height="wrap_content"
28 android:layout_centerInParent="true"
29 android:text="@string/string_menu_title"
30 android:textColor="@android:color/white"
31 android:textSize="22sp" />
32 </RelativeLayout>
33
34 <RelativeLayout
35 android:layout_width="match_parent"
36 android:layout_height="match_parent"
37 android:layout_below="@id/title"
38 android:background="#ffffffff"
39 android:orientation="vertical"
40 android:paddingLeft="250dp"
41 android:paddingRight="250dp" >
42
43 <RelativeLayout
44 android:id="@+id/pwd_rl"
45 android:layout_width="match_parent"
46 android:layout_height="wrap_content"
47 android:layout_marginTop="100dp"
48 >
49 <EditText
50 android:id="@+id/et_oldpassword"
51 style="@style/login_register_edit_style"
52 android:hint="输入原密码"
53 android:inputType="textPassword" />
54 <ImageView
55 android:id="@+id/iv_pwd_change"
56 style="@style/iv_pwd_change_style"
57 />
58 </RelativeLayout>
59
60 <TextView
61 android:id="@+id/oldpassword_error_hint"
62 style="@style/registererrhint_style"
63 android:layout_below="@id/pwd_rl" />
64
65 <EditText
66 android:id="@+id/et_newpassword"
67 style="@style/login_register_edit_style"
68 android:layout_below="@id/pwd_rl"
69 android:layout_marginTop="30dp"
70 android:hint="密码为英文和数字组成,最少8位"
71 android:inputType="textPassword" />
72
73 <TextView
74 android:id="@+id/newpassword_error_hint"
75 style="@style/registererrhint_style"
76 android:layout_below="@id/et_newpassword" />
77
78 <EditText
79 android:id="@+id/et_again_newpassword"
80 style="@style/login_register_edit_style"
81 android:layout_below="@id/et_newpassword"
82 android:layout_marginTop="30dp"
83 android:hint="再次输入新密码"
84 android:inputType="textPassword" />
85
86 <TextView
87 android:id="@+id/again_newpassword_error_hint"
88 style="@style/registererrhint_style"
89 android:layout_below="@id/et_again_newpassword" />
90
91 <Button
92 android:id="@+id/btn_ok"
93 style="@style/button_login_register_style"
94 android:layout_below="@id/et_again_newpassword"
95 android:layout_marginTop="30dp"
96 android:text="确 定" />
97 </RelativeLayout>
98
99 </RelativeLayout>
PersonalCenter/app/src/main/res/layout/activity_electronicard_phone.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:background="#ffffffff"
6 android:orientation="vertical">
7 <RelativeLayout
8 android:id="@+id/title"
9 android:layout_width="match_parent"
10 android:layout_height="wrap_content"
11 android:background="@color/login_text_blue"
12 android:minHeight="50dp" >
13
14 <ImageView
15 android:id="@+id/cancel"
16 android:layout_width="wrap_content"
17 android:layout_height="wrap_content"
18 android:layout_centerVertical="true"
19 android:paddingLeft="20dp"
20 android:paddingRight="20dp"
21 android:src="@mipmap/title_back" />
22
23 <TextView
24 android:id="@+id/menu_title"
25 android:layout_width="wrap_content"
26 android:layout_height="wrap_content"
27 android:layout_centerInParent="true"
28 android:text="@string/string_electroniccard_info_change"
29 android:textColor="@android:color/white"
30 android:textSize="22sp" />
31 </RelativeLayout>
32 <RelativeLayout
33 android:layout_width="match_parent"
34 android:layout_height="match_parent"
35 android:layout_below="@id/title"
36 android:background="#ffffffff"
37 android:orientation="vertical"
38 android:paddingLeft="250dp"
39 android:paddingRight="250dp" >
40
41 <EditText
42 android:id="@+id/et_phonenumber"
43 style="@style/login_register_edit_style"
44 android:layout_marginTop="150dp"
45 android:hint="手机号"
46 android:inputType="phone" />
47
48 <TextView
49 android:id="@+id/phonenumber_error_hint"
50 style="@style/registererrhint_style"
51 android:layout_below="@id/et_phonenumber" />
52
53 <LinearLayout
54 android:id="@+id/rl_authcode"
55 android:layout_width="match_parent"
56 android:layout_height="wrap_content"
57 android:layout_below="@id/et_phonenumber"
58 android:layout_marginTop="30dp"
59 android:orientation="horizontal">
60
61 <EditText
62 android:id="@+id/et_authcode"
63 style="@style/login_register_edit_rect_style"
64 android:layout_marginRight="-4px"
65 android:layout_weight="1"
66 android:hint="验证码"
67 android:numeric="integer" />
68
69 <Button
70 android:id="@+id/btn_authcode"
71 style="@style/login_register_btn_authcode_rect_style"
72 android:layout_marginLeft="0px"
73 android:layout_marginTop="0px"
74 android:layout_weight="2"
75 android:text="获取验证码"
76 android:textColor="@color/btn_text_color" />
77 </LinearLayout>
78
79 <TextView
80 android:id="@+id/authcode_error_hint"
81 style="@style/registererrhint_style"
82 android:layout_below="@id/rl_authcode" />
83
84 <TextView
85 android:id="@+id/password_error_hint"
86 style="@style/registererrhint_style"
87 android:layout_below="@id/pwd_rl" />
88
89 <Button
90 android:id="@+id/btn_register"
91 style="@style/button_login_register_style"
92 android:layout_below="@id/rl_authcode"
93 android:layout_marginTop="30dp"
94 android:text="@string/ok" />
95 </RelativeLayout>
96
97 </RelativeLayout>
PersonalCenter/app/src/main/res/layout/activity_electroniccard_validation.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:background="#ffffffff"
6 android:orientation="vertical">
7 <RelativeLayout
8 android:id="@+id/title"
9 android:layout_width="match_parent"
10 android:layout_height="wrap_content"
11 android:background="@color/login_text_blue"
12 android:minHeight="50dp" >
13
14 <ImageView
15 android:id="@+id/cancel"
16 android:layout_width="wrap_content"
17 android:layout_height="wrap_content"
18 android:layout_centerVertical="true"
19 android:paddingLeft="20dp"
20 android:paddingRight="20dp"
21 android:src="@mipmap/title_back" />
22
23 <TextView
24 android:id="@+id/menu_title"
25 android:layout_width="wrap_content"
26 android:layout_height="wrap_content"
27 android:layout_centerInParent="true"
28 android:text="@string/string_electroniccard_info_change"
29 android:textColor="@android:color/white"
30 android:textSize="22sp" />
31 </RelativeLayout>
32 <RelativeLayout
33 android:layout_width="match_parent"
34 android:layout_height="match_parent"
35 android:layout_below="@id/title"
36 android:background="#ffffffff"
37 android:orientation="vertical"
38 android:paddingLeft="250dp"
39 android:paddingRight="250dp" >
40
41 <EditText
42 android:id="@+id/et_phonenumber"
43 style="@style/login_register_edit_style"
44 android:layout_marginTop="150dp"
45 android:hint="手机号"
46 android:inputType="phone" />
47
48 <TextView
49 android:id="@+id/phonenumber_error_hint"
50 style="@style/registererrhint_style"
51 android:layout_below="@id/et_phonenumber" />
52
53 <LinearLayout
54 android:id="@+id/rl_authcode"
55 android:layout_width="match_parent"
56 android:layout_height="wrap_content"
57 android:layout_below="@id/et_phonenumber"
58 android:layout_marginTop="30dp"
59 android:orientation="horizontal">
60
61 <EditText
62 android:id="@+id/et_authcode"
63 style="@style/login_register_edit_rect_style"
64 android:layout_marginRight="-4px"
65 android:layout_weight="1"
66 android:hint="验证码"
67 android:numeric="integer" />
68
69 <Button
70 android:id="@+id/btn_authcode"
71 style="@style/login_register_btn_authcode_rect_style"
72 android:layout_marginLeft="0px"
73 android:layout_marginTop="0px"
74 android:layout_weight="2"
75 android:text="获取验证码"
76 android:textColor="@color/btn_text_color" />
77 </LinearLayout>
78
79 <TextView
80 android:id="@+id/authcode_error_hint"
81 style="@style/registererrhint_style"
82 android:layout_below="@id/rl_authcode" />
83
84 <TextView
85 android:id="@+id/password_error_hint"
86 style="@style/registererrhint_style"
87 android:layout_below="@id/pwd_rl" />
88
89 <Button
90 android:id="@+id/btn_register"
91 style="@style/button_login_register_style"
92 android:layout_below="@id/rl_authcode"
93 android:layout_marginTop="30dp"
94 android:text="@string/string_regist_next" />
95 </RelativeLayout>
96
97 </RelativeLayout>
PersonalCenter/app/src/main/res/layout/activity_forgetpsword.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:background="#ffffffff"
6 android:orientation="vertical">
7
8 <RelativeLayout
9 android:id="@+id/title"
10 android:layout_width="match_parent"
11 android:layout_height="wrap_content"
12 android:background="@color/login_text_blue"
13 android:minHeight="50dp">
14
15 <ImageView
16 android:id="@+id/cancel"
17 android:layout_width="wrap_content"
18 android:layout_height="wrap_content"
19 android:layout_centerVertical="true"
20 android:paddingLeft="20dp"
21 android:paddingRight="20dp"
22 android:src="@mipmap/title_back" />
23
24 <TextView
25 android:id="@+id/menu_title"
26 android:layout_width="wrap_content"
27 android:layout_height="wrap_content"
28 android:layout_centerInParent="true"
29 android:text="@string/string_menu_title"
30 android:textColor="@android:color/white"
31 android:textSize="22sp" />
32 </RelativeLayout>
33
34 <RelativeLayout
35 android:layout_width="match_parent"
36 android:layout_height="match_parent"
37 android:layout_below="@id/title"
38 android:background="#ffffffff"
39 android:orientation="vertical"
40 android:paddingLeft="250dp"
41 android:paddingRight="250dp">
42
43 <EditText
44 android:id="@+id/et_phonenumber"
45 style="@style/login_register_edit_style"
46 android:layout_marginTop="150dp"
47 android:hint="手机号"
48 android:inputType="phone" />
49
50 <TextView
51 android:id="@+id/phonenumber_error_hint"
52 style="@style/registererrhint_style"
53 android:layout_below="@id/et_phonenumber" />
54
55 <LinearLayout
56 android:id="@+id/rl_authcode"
57 android:layout_width="match_parent"
58 android:layout_height="wrap_content"
59 android:layout_below="@id/et_phonenumber"
60 android:layout_marginTop="30dp"
61 android:orientation="horizontal">
62
63 <EditText
64 android:id="@+id/et_authcode"
65 style="@style/login_register_edit_rect_style"
66 android:layout_marginRight="-4px"
67 android:layout_weight="1"
68 android:hint="验证码"
69 android:numeric="integer" />
70
71 <Button
72 android:id="@+id/btn_authcode"
73 style="@style/login_register_btn_authcode_rect_style"
74 android:layout_marginLeft="0px"
75 android:layout_marginTop="0px"
76 android:layout_weight="2"
77 android:text="获取验证码"
78 android:textColor="@color/btn_text_color" />
79 </LinearLayout>
80
81 <TextView
82 android:id="@+id/authcode_error_hint"
83 style="@style/registererrhint_style"
84 android:layout_below="@id/rl_authcode" />
85
86 <RelativeLayout
87 android:id="@+id/pwd_rl"
88 android:layout_width="match_parent"
89 android:layout_height="wrap_content"
90 android:layout_below="@id/rl_authcode"
91 android:layout_marginTop="30dp">
92
93 <EditText
94 android:id="@+id/et_newpassword"
95 style="@style/login_register_edit_style"
96 android:hint="密码为英文和数字组成,最少8位"
97 android:inputType="textPassword" />
98
99 <ImageView
100 android:id="@+id/iv_pwd_change"
101 style="@style/iv_pwd_change_style" />
102 </RelativeLayout>
103
104 <TextView
105 android:id="@+id/newpassword_error_hint"
106 style="@style/registererrhint_style"
107 android:layout_below="@id/pwd_rl" />
108
109 <EditText
110 android:id="@+id/et_again_newpassword"
111 style="@style/login_register_edit_style"
112 android:layout_below="@id/pwd_rl"
113 android:layout_marginTop="30dp"
114 android:hint="再次输入新密码"
115 android:inputType="textPassword" />
116
117 <TextView
118 android:id="@+id/again_newpassword_error_hint"
119 style="@style/registererrhint_style"
120 android:layout_below="@id/et_again_newpassword" />
121
122 <Button
123 android:id="@+id/btn_ok"
124 style="@style/button_login_register_style"
125 android:layout_below="@id/et_again_newpassword"
126 android:layout_marginTop="30dp"
127 android:text="确 定" />
128 </RelativeLayout>
129
130 </RelativeLayout>
PersonalCenter/app/src/main/res/layout/activity_loginandregister.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools"
4 android:id="@android:id/tabhost"
5 android:layout_width="fill_parent"
6 android:layout_height="fill_parent"
7 android:background="@color/white"
8 tools:context="com.hjx.personalcenter.activity.LoginAndRegisterActivity">
9
10
11 <ImageView
12 android:id="@+id/iv_logo"
13 android:layout_width="wrap_content"
14 android:layout_height="wrap_content"
15 android:layout_centerHorizontal="true"
16 android:layout_marginTop="55dp"
17 android:layout_marginBottom="0dp"
18 android:src="@mipmap/logo" />
19
20 <LinearLayout
21 android:layout_width="wrap_content"
22 android:layout_height="wrap_content"
23 android:layout_below="@+id/iv_logo"
24 android:orientation="vertical">
25
26 <com.hjx.personalcenter.thirdparty.SlidingTabLayout
27 android:id="@+id/TabLayout_id"
28 android:layout_width="match_parent"
29 android:layout_height="50dp">
30 </com.hjx.personalcenter.thirdparty.SlidingTabLayout>
31
32 <android.support.v4.view.ViewPager
33 android:id="@+id/viewpager_login"
34 android:layout_width="match_parent"
35 android:layout_height="match_parent"
36 android:background="@color/white" />
37 </LinearLayout>
38
39 </RelativeLayout>
PersonalCenter/app/src/main/res/layout/activity_main.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent">
5
6 <TextView
7 android:id="@+id/ssss"
8 android:layout_width="wrap_content"
9 android:layout_height="wrap_content"
10 android:text="Hello World!" />
11 </RelativeLayout>
12
PersonalCenter/app/src/main/res/layout/activity_registerinfo.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent">
5 <RelativeLayout
6 android:id="@+id/title"
7 android:layout_width="match_parent"
8 android:layout_height="wrap_content"
9 android:background="@color/login_text_blue"
10 android:minHeight="50dp" >
11
12 <ImageView
13 android:id="@+id/cancel"
14 android:layout_width="wrap_content"
15 android:layout_height="wrap_content"
16 android:layout_centerVertical="true"
17 android:paddingLeft="20dp"
18 android:paddingRight="20dp"
19 android:visibility="gone"
20 android:src="@mipmap/title_back" />
21
22 <TextView
23 android:id="@+id/menu_title"
24 android:layout_width="wrap_content"
25 android:layout_height="wrap_content"
26 android:layout_centerInParent="true"
27 android:text="@string/string_regist_info"
28 android:textColor="@android:color/white"
29 android:textSize="22sp" />
30 </RelativeLayout>
31 <LinearLayout
32 android:layout_width="match_parent"
33 android:layout_height="match_parent"
34 android:layout_below="@id/title"
35 android:background="#ffffffff"
36 android:orientation="vertical"
37 android:paddingLeft="250dp"
38 android:paddingRight="250dp">
39 <EditText
40 android:id="@+id/et_username"
41 style="@style/login_register_edit_style"
42 android:layout_marginTop="100dp"
43 android:textColor="@color/login_text_black"
44 android:hint="@string/string_regist_username" />
45 <TextView
46 android:id="@+id/et_region"
47 style="@style/login_register_edit_style"
48 android:layout_marginTop="30dp"
49 android:textColor="@color/login_text_black"
50 android:hint="@string/string_regist_region" />
51
52 <TextView
53 android:id="@+id/et_grade"
54 style="@style/login_register_edit_style"
55 android:layout_marginTop="30dp"
56 android:textColor="@color/login_text_black"
57 android:hint="@string/string_regist_grade" />
58
59 <TextView
60 android:id="@+id/et_school"
61 style="@style/login_register_edit_style"
62 android:layout_marginTop="30dp"
63 android:textColor="@color/login_text_black"
64 android:hint="@string/string_regist_school" />
65 <Button
66 android:id="@+id/btn_ok"
67 style="@style/button_login_register_style"
68 android:layout_marginTop="30dp"
69 android:text="@string/string_regist_next" />
70
71
72
73 </LinearLayout>
74
75
76
77
78 </RelativeLayout>
PersonalCenter/app/src/main/res/layout/fragment_loginandregister_login.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:background="#ffffffff"
6 android:orientation="vertical"
7 android:paddingLeft="250dp"
8 android:paddingRight="250dp" >
9
10
11 <EditText
12 android:id="@+id/et_phonenumber"
13 style="@style/login_register_edit_style"
14 android:layout_marginTop="20dp"
15 android:textColor="@color/login_text_black"
16 android:inputType="phone"
17 android:hint="手机号" />
18
19 <EditText
20 android:id="@+id/et_password"
21 style="@style/login_register_edit_style"
22 android:layout_below="@id/et_phonenumber"
23 android:layout_marginTop="30dp"
24 android:textColor="@color/login_text_black"
25 android:hint="密码"
26 android:inputType="textPassword" />
27
28 <Button
29 android:id="@+id/btn_login"
30 style="@style/button_login_register_style"
31 android:layout_below="@id/et_password"
32 android:layout_marginTop="30dp"
33 android:text="登 录" />
34
35 <TextView
36 android:id="@+id/tv_forget_pwd"
37 style="@style/text_forget_pwd_style"
38 android:layout_alignParentRight="true"
39 android:layout_below="@id/btn_login"
40 android:layout_marginTop="15dp"
41 android:text="@string/forget_pwd"
42 android:textColor="@color/btn_text_color" />
43
44 </RelativeLayout>
PersonalCenter/app/src/main/res/layout/fragment_loginandregister_register.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:background="#ffffffff"
6 android:orientation="vertical"
7 android:paddingLeft="250dp"
8 android:paddingRight="250dp">
9
10 <EditText
11 android:id="@+id/et_phonenumber"
12 style="@style/login_register_edit_style"
13 android:layout_marginTop="20dp"
14 android:hint="手机号"
15 android:inputType="phone" />
16
17 <TextView
18 android:id="@+id/phonenumber_error_hint"
19 style="@style/registererrhint_style"
20 android:layout_below="@id/et_phonenumber" />
21
22 <LinearLayout
23 android:id="@+id/rl_authcode"
24 android:layout_width="match_parent"
25 android:layout_height="wrap_content"
26 android:layout_below="@id/et_phonenumber"
27 android:layout_marginTop="30dp"
28 android:orientation="horizontal">
29
30 <EditText
31 android:id="@+id/et_authcode"
32 style="@style/login_register_edit_rect_style"
33 android:layout_marginRight="-4px"
34 android:layout_weight="1"
35 android:hint="验证码"
36 android:numeric="integer" />
37
38 <Button
39 android:id="@+id/btn_authcode"
40 style="@style/login_register_btn_authcode_rect_style"
41 android:layout_marginLeft="0px"
42 android:layout_marginTop="0px"
43 android:layout_weight="2"
44 android:text="获取验证码"
45 android:textColor="@color/btn_text_color" />
46 </LinearLayout>
47
48 <TextView
49 android:id="@+id/authcode_error_hint"
50 style="@style/registererrhint_style"
51 android:layout_below="@id/rl_authcode" />
52
53 <RelativeLayout
54 android:id="@+id/pwd_rl"
55 android:layout_width="match_parent"
56 android:layout_height="wrap_content"
57 android:layout_below="@id/rl_authcode"
58 android:layout_marginTop="30dp">
59
60 <EditText
61 android:id="@+id/et_password"
62 style="@style/login_register_edit_style"
63 android:hint="密码为英文和数字组成,最少8位"
64 android:inputType="textPassword" />
65
66 <ImageView
67 android:id="@+id/iv_pwd_change"
68 style="@style/iv_pwd_change_style" />
69 </RelativeLayout>
70
71 <TextView
72 android:id="@+id/password_error_hint"
73 style="@style/registererrhint_style"
74 android:layout_below="@id/pwd_rl" />
75
76 <Button
77 android:id="@+id/btn_register"
78 style="@style/button_login_register_style"
79 android:layout_below="@id/pwd_rl"
80 android:layout_marginTop="30dp"
81 android:text="立即注册" />
82
83 </RelativeLayout>
PersonalCenter/app/src/main/res/mipmap-hdpi/ic_launcher.png

3.34 KB

PersonalCenter/app/src/main/res/mipmap-mdpi/ic_launcher.png

2.15 KB

PersonalCenter/app/src/main/res/mipmap-xhdpi/blank.PNG

171 Bytes

PersonalCenter/app/src/main/res/mipmap-xhdpi/ic_launcher.png

4.73 KB

PersonalCenter/app/src/main/res/mipmap-xhdpi/logo.png

21.1 KB

PersonalCenter/app/src/main/res/mipmap-xhdpi/pwd_hide.png

561 Bytes

PersonalCenter/app/src/main/res/mipmap-xhdpi/title_back.png

544 Bytes

PersonalCenter/app/src/main/res/mipmap-xxhdpi/ic_launcher.png

7.54 KB

PersonalCenter/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png

4.73 KB

PersonalCenter/app/src/main/res/values-w820dp/dimens.xml
File was created 1 <resources>
2 <!-- Example customization of dimensions originally defined in res/values/dimens.xml
3 (such as screen margins) for screens with more than 820dp of available width. This
4 would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
5 <dimen name="activity_horizontal_margin">64dp</dimen>
6 </resources>
7
PersonalCenter/app/src/main/res/values/colors.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <resources>
3 <color name="colorPrimary">#3F51B5</color>
4 <color name="colorPrimaryDark">#303F9F</color>
5 <color name="colorAccent">#FF4081</color>
6 <color name="white">#ffffffff</color>
7 <color name="login_edittext_hint">#afafaf</color>
8 <color name="login_text_blue">#1cb8ff</color>
9 <color name="login_text_black">#313131</color>
10 <color name="login_edittext_normal">#d4d4d4</color>
11 <color name="error_hint">#ED1c24</color>
12 <color name="login_edittext_pressed">#1cb8ff</color>
13 </resources>
14
PersonalCenter/app/src/main/res/values/dimens.xml
File was created 1 <resources>
2 <!-- Default screen margins, per the Android Design guidelines. -->
3 <dimen name="activity_horizontal_margin">16dp</dimen>
4 <dimen name="activity_vertical_margin">16dp</dimen>
5 </resources>
6
PersonalCenter/app/src/main/res/values/strings.xml
File was created 1 <resources>
2 <string name="app_name">PersonalCenter</string>
3
4
5
6 //登录注册
7 <string name="cancel">取 消</string>
8 <string name="ok">确 定</string>
9 <string name="forget_pwd">忘记密码</string>
10 <string name="string_menu_title">修改密码</string>
11 <string name="string_regist_info">填写注册信息</string>
12 <string name="string_regist_username">用户名</string>
13 <string name="string_regist_region">地区</string>
14 <string name="string_regist_grade">年级</string>
15 <string name="string_regist_school">学校</string>
16 <string name="string_regist_next">下一步</string>
17 //电子保卡
18 <string name="string_electroniccard_info_title">填写保卡信息</string>
19 <string name="string_electroniccard_info_change">修改保卡信息</string>
20 <string name="string_electroniccard_change_bangding">更换绑定</string>
21
22
23 </resources>
24
PersonalCenter/app/src/main/res/values/styles.xml
File was created 1 <resources>
2
3 <!-- Base application theme. -->
4 <style name="AppTheme" parent="Theme.AppCompat">
5 <!-- Customize your theme here. -->
6 <item name="colorPrimary">@color/colorPrimary</item>
7 <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
8 <item name="colorAccent">@color/colorAccent</item>
9 </style>
10
11 <style name="login_register_edit_style">
12 <item name="android:textSize">19sp</item>
13 <item name="android:singleLine">true</item>
14 <item name="android:background">@drawable/selector_edittext_bg</item>
15 <item name="android:layout_width">match_parent</item>
16 <item name="android:layout_height">wrap_content</item>
17 <item name="android:textColorHint">@color/login_edittext_hint</item>
18 <item name="android:padding">10dp</item>
19 </style>
20
21 <style name="login_register_edit_rect_style">
22 <item name="android:textSize">19sp</item>
23 <item name="android:singleLine">true</item>
24 <item name="android:background">@drawable/selector_edittext_rect_bg</item>
25 <item name="android:layout_width">match_parent</item>
26 <item name="android:layout_height">wrap_content</item>
27 <item name="android:textColorHint">@color/login_edittext_hint</item>
28 <item name="android:padding">10dp</item>
29 </style>
30
31 <style name="login_register_btn_authcode_rect_style">
32 <item name="android:textSize">19sp</item>
33 <item name="android:singleLine">true</item>
34 <item name="android:background">@drawable/btn_rect_normal</item>
35 <item name="android:layout_width">match_parent</item>
36 <item name="android:layout_height">wrap_content</item>
37 <item name="android:textColorHint">@color/login_edittext_hint</item>
38 <item name="android:padding">10dp</item>
39 </style>
40 <style name="text_login_register_style" >
41 <item name="android:layout_width">wrap_content</item>
42 <item name="android:layout_height">wrap_content</item>
43 <item name="android:textSize">22sp</item>
44 <item name="android:gravity">center</item>
45 <item name="android:padding">10dp</item>
46 </style>
47 <style name="button_login_register_style">
48 <item name="android:layout_width">match_parent</item>
49 <item name="android:layout_height">wrap_content</item>
50 <item name="android:background">@drawable/selector_blue_btn_bg</item>
51 <item name="android:textSize">23sp</item>
52 <item name="android:gravity">center</item>
53 <item name="android:padding">10dp</item>
54 <item name="android:textColor">@android:color/white</item>
55 </style>
56 <style name="text_forget_pwd_style" >
57 <item name="android:layout_width">wrap_content</item>
58 <item name="android:layout_height">wrap_content</item>
59 <item name="android:textSize">18sp</item>
60 <item name="android:gravity">center</item>
61 <item name="android:padding">8dp</item>
62 </style>
63 <style name="registererrhint_style">
64 <item name="android:textSize">14dip</item>
65 <item name="android:layout_width">match_parent</item>
66 <item name="android:layout_height">wrap_content</item>
67 <item name="android:textColor">@color/error_hint</item>
68 <item name="android:layout_marginTop">5dip</item>
69 </style>
70 <style name="iv_pwd_change_style">
71 <item name="android:layout_width">wrap_content</item>
72 <item name="android:layout_height">wrap_content</item>
73 <item name="android:background">@mipmap/pwd_hide</item>
74 <item name="android:layout_alignParentRight">true</item>
75 <item name="android:layout_centerVertical">true</item>
76 <item name="android:layout_marginRight">15dp</item>
77 </style>
78
79
80
81
82 </resources>
83
PersonalCenter/app/src/test/java/com/hjx/personalcenter/ExampleUnitTest.java
File was created 1 package com.hjx.personalcenter;
2
3 import org.junit.Test;
4
5 import static org.junit.Assert.*;
6
7 /**
8 * Example local unit test, which will execute on the development machine (host).
9 *
10 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
11 */
12 public class ExampleUnitTest {
13 @Test
14 public void addition_isCorrect() throws Exception {
15 assertEquals(4, 2 + 2);
16 }
17 }
PersonalCenter/build.gradle
File was created 1 // Top-level build file where you can add configuration options common to all sub-projects/modules.
2
3 buildscript {
4 repositories {
5 jcenter()
6 }
7 dependencies {
8 classpath 'com.android.tools.build:gradle:2.2.2'
9
10 // NOTE: Do not place your application dependencies here; they belong
11 // in the individual module build.gradle files
12 }
13 }
14
15 allprojects {
16 repositories {
17 jcenter()
18 }
19 }
20
21 task clean(type: Delete) {
22 delete rootProject.buildDir
23 }
24
PersonalCenter/gradle.properties
File was created 1 # Project-wide Gradle settings.
2
3 # IDE (e.g. Android Studio) users:
4 # Gradle settings configured through the IDE *will override*
5 # any settings specified in this file.
6
7 # For more details on how to configure your build environment visit
8 # http://www.gradle.org/docs/current/userguide/build_environment.html
9
10 # Specifies the JVM arguments used for the daemon process.
11 # The setting is particularly useful for tweaking memory settings.
12 org.gradle.jvmargs=-Xmx1536m
13
14 # When configured, Gradle will run in incubating parallel mode.
15 # This option should only be used with decoupled projects. More details, visit
16 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 # org.gradle.parallel=true
18
PersonalCenter/gradle/wrapper/gradle-wrapper.jar
No preview for this file type
PersonalCenter/gradle/wrapper/gradle-wrapper.properties
File was created 1 #Mon Dec 28 10:00:20 PST 2015
2 distributionBase=GRADLE_USER_HOME
3 distributionPath=wrapper/dists
4 zipStoreBase=GRADLE_USER_HOME
5 zipStorePath=wrapper/dists
6 distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7
PersonalCenter/gradlew
File was created 1 #!/usr/bin/env bash
2
3 ##############################################################################
4 ##
5 ## Gradle start up script for UN*X
6 ##
7 ##############################################################################
8
9 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 DEFAULT_JVM_OPTS=""
11
12 APP_NAME="Gradle"
13 APP_BASE_NAME=`basename "$0"`
14
15 # Use the maximum available, or set MAX_FD != -1 to use that value.
16 MAX_FD="maximum"
17
18 warn ( ) {
19 echo "$*"
20 }
21
22 die ( ) {
23 echo
24 echo "$*"
25 echo
26 exit 1
27 }
28
29 # OS specific support (must be 'true' or 'false').
30 cygwin=false
31 msys=false
32 darwin=false
33 case "`uname`" in
34 CYGWIN* )
35 cygwin=true
36 ;;
37 Darwin* )
38 darwin=true
39 ;;
40 MINGW* )
41 msys=true
42 ;;
43 esac
44
45 # Attempt to set APP_HOME
46 # Resolve links: $0 may be a link
47 PRG="$0"
48 # Need this for relative symlinks.
49 while [ -h "$PRG" ] ; do
50 ls=`ls -ld "$PRG"`
51 link=`expr "$ls" : '.*-> \(.*\)$'`
52 if expr "$link" : '/.*' > /dev/null; then
53 PRG="$link"
54 else
55 PRG=`dirname "$PRG"`"/$link"
56 fi
57 done
58 SAVED="`pwd`"
59 cd "`dirname \"$PRG\"`/" >/dev/null
60 APP_HOME="`pwd -P`"
61 cd "$SAVED" >/dev/null
62
63 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64
65 # Determine the Java command to use to start the JVM.
66 if [ -n "$JAVA_HOME" ] ; then
67 if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 # IBM's JDK on AIX uses strange locations for the executables
69 JAVACMD="$JAVA_HOME/jre/sh/java"
70 else
71 JAVACMD="$JAVA_HOME/bin/java"
72 fi
73 if [ ! -x "$JAVACMD" ] ; then
74 die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75
76 Please set the JAVA_HOME variable in your environment to match the
77 location of your Java installation."
78 fi
79 else
80 JAVACMD="java"
81 which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82
83 Please set the JAVA_HOME variable in your environment to match the
84 location of your Java installation."
85 fi
86
87 # Increase the maximum file descriptors if we can.
88 if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 MAX_FD_LIMIT=`ulimit -H -n`
90 if [ $? -eq 0 ] ; then
91 if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 MAX_FD="$MAX_FD_LIMIT"
93 fi
94 ulimit -n $MAX_FD
95 if [ $? -ne 0 ] ; then
96 warn "Could not set maximum file descriptor limit: $MAX_FD"
97 fi
98 else
99 warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 fi
101 fi
102
103 # For Darwin, add options to specify how the application appears in the dock
104 if $darwin; then
105 GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 fi
107
108 # For Cygwin, switch paths to Windows format before running java
109 if $cygwin ; then
110 APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 JAVACMD=`cygpath --unix "$JAVACMD"`
113
114 # We build the pattern for arguments to be converted via cygpath
115 ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 SEP=""
117 for dir in $ROOTDIRSRAW ; do
118 ROOTDIRS="$ROOTDIRS$SEP$dir"
119 SEP="|"
120 done
121 OURCYGPATTERN="(^($ROOTDIRS))"
122 # Add a user-defined pattern to the cygpath arguments
123 if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 fi
126 # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 i=0
128 for arg in "$@" ; do
129 CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131
132 if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 else
135 eval `echo args$i`="\"$arg\""
136 fi
137 i=$((i+1))
138 done
139 case $i in
140 (0) set -- ;;
141 (1) set -- "$args0" ;;
142 (2) set -- "$args0" "$args1" ;;
143 (3) set -- "$args0" "$args1" "$args2" ;;
144 (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 esac
151 fi
152
153 # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 function splitJvmOpts() {
155 JVM_OPTS=("$@")
156 }
157 eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159
160 exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161
PersonalCenter/gradlew.bat
File was created 1 @if "%DEBUG%" == "" @echo off
2 @rem ##########################################################################
3 @rem
4 @rem Gradle startup script for Windows
5 @rem
6 @rem ##########################################################################
7
8 @rem Set local scope for the variables with windows NT shell
9 if "%OS%"=="Windows_NT" setlocal
10
11 @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 set DEFAULT_JVM_OPTS=
13
14 set DIRNAME=%~dp0
15 if "%DIRNAME%" == "" set DIRNAME=.
16 set APP_BASE_NAME=%~n0
17 set APP_HOME=%DIRNAME%
18
19 @rem Find java.exe
20 if defined JAVA_HOME goto findJavaFromJavaHome
21
22 set JAVA_EXE=java.exe
23 %JAVA_EXE% -version >NUL 2>&1
24 if "%ERRORLEVEL%" == "0" goto init
25
26 echo.
27 echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 echo.
29 echo Please set the JAVA_HOME variable in your environment to match the
30 echo location of your Java installation.
31
32 goto fail
33
34 :findJavaFromJavaHome
35 set JAVA_HOME=%JAVA_HOME:"=%
36 set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37
38 if exist "%JAVA_EXE%" goto init
39
40 echo.
41 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 echo.
43 echo Please set the JAVA_HOME variable in your environment to match the
44 echo location of your Java installation.
45
46 goto fail
47
48 :init
49 @rem Get command-line arguments, handling Windowz variants
50
51 if not "%OS%" == "Windows_NT" goto win9xME_args
52 if "%@eval[2+2]" == "4" goto 4NT_args
53
54 :win9xME_args
55 @rem Slurp the command line arguments.
56 set CMD_LINE_ARGS=
57 set _SKIP=2
58
59 :win9xME_args_slurp
60 if "x%~1" == "x" goto execute
61
62 set CMD_LINE_ARGS=%*
63 goto execute
64
65 :4NT_args
66 @rem Get arguments from the 4NT Shell from JP Software
67 set CMD_LINE_ARGS=%$
68
69 :execute
70 @rem Setup the command line
71
72 set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73
74 @rem Execute Gradle
75 "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76
77 :end
78 @rem End local scope for the variables with windows NT shell
79 if "%ERRORLEVEL%"=="0" goto mainEnd
80
81 :fail
82 rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 rem the _cmd.exe /c_ return code!
84 if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 exit /b 1
86
87 :mainEnd
88 if "%OS%"=="Windows_NT" endlocal
89
90 :omega
91
PersonalCenter/settings.gradle
File was created 1 include ':app'
2