Commit 23951db346674b54f1f29f12f21122087ebc917e

Authored by 陶汉栋
2 parents 180671fd d8b159ee

no message

.idea/gradle.xml
... ... @@ -10,6 +10,7 @@
10 10 <option value="$PROJECT_DIR$" />
11 11 <option value="$PROJECT_DIR$/app" />
12 12 <option value="$PROJECT_DIR$/mvpsdk" />
  13 + <option value="$PROJECT_DIR$/roundedimageview-2.2.1" />
13 14 </set>
14 15 </option>
15 16 <option name="resolveModulePerSourceSet" value="false" />
... ...
app/build.gradle
... ... @@ -27,4 +27,5 @@ dependencies {
27 27 androidTestImplementation 'com.android.support.test:runner:1.0.1'
28 28 androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
29 29 implementation project(':mvpsdk')
  30 + implementation project(':roundedimageview-2.2.1')
30 31 }
... ...
app/src/main/AndroidManifest.xml
... ... @@ -10,14 +10,14 @@
10 10 android:roundIcon="@mipmap/ic_launcher_round"
11 11 android:supportsRtl="true"
12 12 android:theme="@style/AppTheme">
13   - <activity android:name=".ui.MainActivity">
  13 + <activity android:name=".ui.activity.LoginAndRegistActivity">
14 14 <intent-filter>
15 15 <action android:name="android.intent.action.MAIN" />
16 16  
17 17 <category android:name="android.intent.category.LAUNCHER" />
18 18 </intent-filter>
19 19 </activity>
20   - <activity android:name=".ui.activity.LoginAndRegistActivity" />
  20 + <!--<activity android:name=".ui.activity.LoginAndRegistActivity" />-->
21 21 <activity android:name=".ui.activity.StartActivity"></activity>
22 22 </application>
23 23  
... ...
app/src/main/java/com/shunzhi/parent/contract/loginandregister/LoginAndRegisterContract.java 0 → 100644
... ... @@ -0,0 +1,44 @@
  1 +package com.shunzhi.parent.contract.loginandregister;
  2 +
  3 +import com.google.gson.JsonObject;
  4 +import com.share.mvpsdk.base.BasePresenter;
  5 +import com.share.mvpsdk.base.IBaseFragment;
  6 +import com.share.mvpsdk.base.IBaseModel;
  7 +
  8 +import io.reactivex.Observable;
  9 +
  10 +/**
  11 + * Created by Administrator on 2018/3/6 0006.
  12 + */
  13 +
  14 +public interface LoginAndRegisterContract {
  15 +
  16 + abstract class LoginPresenter extends BasePresenter<ILoginModel,ILoginView>{
  17 + public abstract void loginResult(String loginName,String loginPwd);
  18 +
  19 + public abstract void registerResult(String adminName,String idCode,String password);
  20 +
  21 + public abstract void idCodeResult(String phoneNumber);
  22 +
  23 + public abstract void getUserInfo();
  24 + }
  25 +
  26 + interface ILoginModel extends IBaseModel{
  27 + Observable<JsonObject> getLoginResult(String loginName, String loginPed);
  28 +
  29 + Observable<JsonObject> getRegisterResult(String adminName,String idCode,String password);
  30 +
  31 + Observable<JsonObject> getidCodeResult(String phoneNumber);
  32 +
  33 + //获取登录用户信息
  34 +// Observable<CurrentBean> getUserInfo();
  35 + }
  36 + interface ILoginView extends IBaseFragment {
  37 +
  38 + //更新用户信息
  39 + void getUserInfo();
  40 +
  41 + }
  42 +
  43 +
  44 +}
... ...
app/src/main/java/com/shunzhi/parent/model/loginandregister/LoginAndRegisterModel.java 0 → 100644
... ... @@ -0,0 +1,37 @@
  1 +package com.shunzhi.parent.model.loginandregister;
  2 +
  3 +import com.google.gson.JsonObject;
  4 +import com.share.mvpsdk.base.BaseModel;
  5 +import com.shunzhi.parent.contract.loginandregister.LoginAndRegisterContract;
  6 +
  7 +import io.reactivex.Observable;
  8 +
  9 +/**
  10 + * Created by Administrator on 2018/3/6 0006.
  11 + */
  12 +
  13 +public class LoginAndRegisterModel extends BaseModel implements LoginAndRegisterContract.ILoginModel {
  14 +
  15 +
  16 +
  17 + public static LoginAndRegisterModel newInstance() {
  18 + return new LoginAndRegisterModel();
  19 + }
  20 +
  21 +
  22 + @Override
  23 + public Observable<JsonObject> getLoginResult(String loginName, String loginPed) {
  24 + return null;
  25 + }
  26 +
  27 + @Override
  28 + public Observable<JsonObject> getRegisterResult(String adminName, String idCode, String password) {
  29 + return null;
  30 + }
  31 +
  32 + @Override
  33 + public Observable<JsonObject> getidCodeResult(String phoneNumber) {
  34 + return null;
  35 + }
  36 +
  37 +}
... ...
app/src/main/java/com/shunzhi/parent/model/loginandregister/loginAndRegisterModel.java 0 → 100644
... ... @@ -0,0 +1,37 @@
  1 +package com.shunzhi.parent.model.loginandregister;
  2 +
  3 +import com.google.gson.JsonObject;
  4 +import com.share.mvpsdk.base.BaseModel;
  5 +import com.shunzhi.parent.contract.loginandregister.LoginAndRegisterContract;
  6 +
  7 +import io.reactivex.Observable;
  8 +
  9 +/**
  10 + * Created by Administrator on 2018/3/6 0006.
  11 + */
  12 +
  13 +public class LoginAndRegisterModel extends BaseModel implements LoginAndRegisterContract.ILoginModel {
  14 +
  15 +
  16 +
  17 + public static LoginAndRegisterModel newInstance() {
  18 + return new LoginAndRegisterModel();
  19 + }
  20 +
  21 +
  22 + @Override
  23 + public Observable<JsonObject> getLoginResult(String loginName, String loginPed) {
  24 + return null;
  25 + }
  26 +
  27 + @Override
  28 + public Observable<JsonObject> getRegisterResult(String adminName, String idCode, String password) {
  29 + return null;
  30 + }
  31 +
  32 + @Override
  33 + public Observable<JsonObject> getidCodeResult(String phoneNumber) {
  34 + return null;
  35 + }
  36 +
  37 +}
... ...
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java 0 → 100644
... ... @@ -0,0 +1,55 @@
  1 +package com.shunzhi.parent.presenter.loginandregister;
  2 +
  3 +import android.text.TextUtils;
  4 +
  5 +import com.share.mvpsdk.utils.ToastUtils;
  6 +import com.shunzhi.parent.contract.loginandregister.LoginAndRegisterContract;
  7 +import com.shunzhi.parent.model.loginandregister.LoginAndRegisterModel;
  8 +
  9 +/**
  10 + * Created by Administrator on 2018/3/6 0006.
  11 + */
  12 +
  13 +public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPresenter {
  14 + @Override
  15 + public void loginResult(String loginName, String loginPwd) {
  16 + if (TextUtils.isEmpty(loginName)){
  17 + ToastUtils.showToast("登录名不能为空");
  18 + return;
  19 + }else if(TextUtils.isEmpty(loginPwd)){
  20 + ToastUtils.showToast("密码不能为空");
  21 + return;
  22 + }
  23 +
  24 + }
  25 +
  26 + @Override
  27 + public void registerResult(String adminName, String idCode, String password) {
  28 +
  29 +
  30 + }
  31 +
  32 + @Override
  33 + public void idCodeResult(String phoneNumber) {
  34 + if(TextUtils.isEmpty(phoneNumber)){
  35 + ToastUtils.showToast("请先输入手机号");
  36 + return;
  37 + }
  38 + }
  39 +
  40 + @Override
  41 + public void getUserInfo() {
  42 +
  43 + }
  44 +
  45 +
  46 + @Override
  47 + public LoginAndRegisterContract.ILoginModel getModel() {
  48 + return LoginAndRegisterModel.newInstance();
  49 + }
  50 +
  51 + @Override
  52 + public void onStart() {
  53 +
  54 + }
  55 +}
... ...
app/src/main/java/com/shunzhi/parent/ui/activity/LoginAndRegistActivity.java
1 1 package com.shunzhi.parent.ui.activity;
2 2  
3   -import android.support.v7.app.AppCompatActivity;
4 3 import android.os.Bundle;
5 4  
  5 +import com.share.mvpsdk.base.activity.BaseCompatActivity;
6 6 import com.shunzhi.parent.R;
  7 +import com.shunzhi.parent.ui.fragment.loginandregistfragment.LoginAndRegistFragment;
7 8  
8   -public class LoginAndRegistActivity extends AppCompatActivity {
  9 +import me.yokeyword.fragmentation.SupportFragment;
  10 +
  11 +public class LoginAndRegistActivity extends BaseCompatActivity {
  12 + String type = "注册";
  13 +
  14 +
  15 + private SupportFragment[] mFragments = new SupportFragment[1];
  16 +
  17 + @Override
  18 + protected void initView(Bundle savedInstanceState) {
  19 + if (savedInstanceState == null) {
  20 + type = getIntent().getStringExtra("type");
  21 + mFragments[0] = LoginAndRegistFragment.getInstance(type);
  22 + loadRootFragment(R.id.frame, mFragments[0]);
  23 + } else {
  24 + mFragments[0] = findFragment(LoginAndRegistFragment.class);
  25 + }
  26 + }
9 27  
10 28 @Override
11   - protected void onCreate(Bundle savedInstanceState) {
12   - super.onCreate(savedInstanceState);
13   - setContentView(R.layout.activity_regist);
  29 + protected int getLayoutId() {
  30 + return R.layout.activity_regist;
14 31 }
15 32 }
... ...
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
... ... @@ -13,7 +13,7 @@ import com.shunzhi.parent.R;
13 13 /**
14 14 * A simple {@link Fragment} subclass.
15 15 * Activities that contain this fragment must implement the
16   - * {@link ConsultFragment.OnFragmentInteractionListener} interface
  16 + * {@link OnFragmentInteractionListener} interface
17 17 * to handle interaction events.
18 18 * Use the {@link ConsultFragment#newInstance} factory method to
19 19 * create an instance of this fragment.
... ...
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
... ... @@ -13,7 +13,7 @@ import com.shunzhi.parent.R;
13 13 /**
14 14 * A simple {@link Fragment} subclass.
15 15 * Activities that contain this fragment must implement the
16   - * {@link MineFragment.OnFragmentInteractionListener} interface
  16 + * {@link OnFragmentInteractionListener} interface
17 17 * to handle interaction events.
18 18 * Use the {@link MineFragment#newInstance} factory method to
19 19 * create an instance of this fragment.
... ...
app/src/main/java/com/shunzhi/parent/ui/fragment/ReportFragment.java
... ... @@ -13,7 +13,7 @@ import com.shunzhi.parent.R;
13 13 /**
14 14 * A simple {@link Fragment} subclass.
15 15 * Activities that contain this fragment must implement the
16   - * {@link ReportFragment.OnFragmentInteractionListener} interface
  16 + * {@link OnFragmentInteractionListener} interface
17 17 * to handle interaction events.
18 18 * Use the {@link ReportFragment#newInstance} factory method to
19 19 * create an instance of this fragment.
... ...
app/src/main/java/com/shunzhi/parent/ui/fragment/loginandregistfragment/LoginAndRegistFragment.java
1 1 package com.shunzhi.parent.ui.fragment.loginandregistfragment;
2 2  
3   -import android.content.Context;
4   -import android.net.Uri;
5 3 import android.os.Bundle;
6   -import android.support.v4.app.Fragment;
7   -import android.view.LayoutInflater;
  4 +import android.support.annotation.NonNull;
  5 +import android.support.annotation.Nullable;
8 6 import android.view.View;
9   -import android.view.ViewGroup;
  7 +import android.widget.EditText;
  8 +import android.widget.LinearLayout;
  9 +import android.widget.TextView;
10 10  
  11 +import com.makeramen.roundedimageview.RoundedImageView;
  12 +import com.share.mvpsdk.base.BasePresenter;
  13 +import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
11 14 import com.shunzhi.parent.R;
  15 +import com.shunzhi.parent.contract.loginandregister.LoginAndRegisterContract;
  16 +import com.shunzhi.parent.presenter.loginandregister.LoginAndRegisterPresenter;
  17 +
  18 +
  19 +public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel>
  20 + implements LoginAndRegisterContract.ILoginView, View.OnClickListener {
  21 +
  22 + public RoundedImageView roundedImageView;
  23 + public EditText phoneNumber, idCode, password;
  24 + public TextView get_idCode, loginAndRegister, tv_info, tv_goto;
  25 + public LinearLayout phoneLayout, idCodeLayout, passwordLayout;
  26 + public static String typepage;
12 27  
13   -/**
14   - * A simple {@link Fragment} subclass.
15   - * Activities that contain this fragment must implement the
16   - * {@link LoginAndRegistFragment.OnFragmentInteractionListener} interface
17   - * to handle interaction events.
18   - * Use the {@link LoginAndRegistFragment#newInstance} factory method to
19   - * create an instance of this fragment.
20   - */
21   -public class LoginAndRegistFragment extends Fragment {
22   - // TODO: Rename parameter arguments, choose names that match
23   - // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
24   - private static final String ARG_PARAM1 = "param1";
25   - private static final String ARG_PARAM2 = "param2";
26   -
27   - // TODO: Rename and change types of parameters
28   - private String mParam1;
29   - private String mParam2;
30   -
31   - private OnFragmentInteractionListener mListener;
32   -
33   - public LoginAndRegistFragment() {
34   - // Required empty public constructor
35   - }
36 28  
37   - /**
38   - * Use this factory method to create a new instance of
39   - * this fragment using the provided parameters.
40   - *
41   - * @param param1 Parameter 1.
42   - * @param param2 Parameter 2.
43   - * @return A new instance of fragment LoginAndRegistFragment.
44   - */
45   - // TODO: Rename and change types and number of parameters
46   - public static LoginAndRegistFragment newInstance(String param1, String param2) {
47   - LoginAndRegistFragment fragment = new LoginAndRegistFragment();
48   - Bundle args = new Bundle();
49   - args.putString(ARG_PARAM1, param1);
50   - args.putString(ARG_PARAM2, param2);
51   - fragment.setArguments(args);
52   - return fragment;
  29 + public static LoginAndRegistFragment getInstance(String type) {
  30 + typepage = type;
  31 + LoginAndRegistFragment loginFragment = new LoginAndRegistFragment();
  32 + return loginFragment;
53 33 }
54 34  
  35 +
  36 + @NonNull
55 37 @Override
56   - public void onCreate(Bundle savedInstanceState) {
57   - super.onCreate(savedInstanceState);
58   - if (getArguments() != null) {
59   - mParam1 = getArguments().getString(ARG_PARAM1);
60   - mParam2 = getArguments().getString(ARG_PARAM2);
61   - }
  38 + public BasePresenter initPresenter() {
  39 + return new LoginAndRegisterPresenter();
62 40 }
63 41  
64 42 @Override
65   - public View onCreateView(LayoutInflater inflater, ViewGroup container,
66   - Bundle savedInstanceState) {
67   - // Inflate the layout for this fragment
68   - return inflater.inflate(R.layout.fragment_login_and_regist, container, false);
  43 + public int getLayoutId() {
  44 + return R.layout.fragment_login_and_regist;
69 45 }
70 46  
71   - // TODO: Rename method, update argument and hook method into UI event
72   - public void onButtonPressed(Uri uri) {
73   - if (mListener != null) {
74   - mListener.onFragmentInteraction(uri);
  47 + @Override
  48 + public void initUI(View view, @Nullable Bundle savedInstanceState) {
  49 +
  50 + roundedImageView = view.findViewById(R.id.photoImage);
  51 + phoneNumber = view.findViewById(R.id.et_phoneNumber);
  52 + idCode = view.findViewById(R.id.et_idCode);
  53 + password = view.findViewById(R.id.et_password);
  54 + get_idCode = view.findViewById(R.id.get_idCode);
  55 + loginAndRegister = view.findViewById(R.id.loginAndRegister);
  56 + tv_info = view.findViewById(R.id.tv_info);
  57 + tv_goto = view.findViewById(R.id.tv_goto);
  58 + phoneLayout = view.findViewById(R.id.phoneLayout);
  59 + idCodeLayout = view.findViewById(R.id.idCodeLayout);
  60 + passwordLayout = view.findViewById(R.id.passwordLayout);
  61 + get_idCode.setOnClickListener(this);
  62 + tv_goto.setOnClickListener(this);
  63 + loginAndRegister.setOnClickListener(this);
  64 + if (typepage.equals("登录")) {
  65 + idCodeLayout.setVisibility(View.GONE);
  66 + loginAndRegister.setText("登录");
  67 + tv_info.setText("还没有账号");
  68 + tv_goto.setText("注册");
  69 + }else if(typepage.equals("注册")){
  70 + idCodeLayout.setVisibility(View.VISIBLE);
  71 + loginAndRegister.setText("注册");
  72 + tv_info.setText("已注册,直接登录");
  73 + tv_goto.setText("登录");
75 74 }
76 75 }
77 76  
  77 +
78 78 @Override
79   - public void onAttach(Context context) {
80   - super.onAttach(context);
81   - if (context instanceof OnFragmentInteractionListener) {
82   - mListener = (OnFragmentInteractionListener) context;
83   - } else {
84   - throw new RuntimeException(context.toString()
85   - + " must implement OnFragmentInteractionListener");
86   - }
  79 + public void getUserInfo() {
  80 +
87 81 }
88 82  
89 83 @Override
90   - public void onDetach() {
91   - super.onDetach();
92   - mListener = null;
93   - }
  84 + public void onClick(View v) {
  85 + if (v == loginAndRegister) {
  86 + if (loginAndRegister.getText().toString().trim().equals("登录")) {
  87 + mPresenter.loginResult(phoneNumber.getText().toString(), password.getText().toString());
  88 + } else if (loginAndRegister.getText().toString().trim().equals("注册")) {
  89 + mPresenter.registerResult(phoneNumber.getText().toString(), idCode.getText().toString(), password.getText().toString());
  90 + }
94 91  
95   - /**
96   - * This interface must be implemented by activities that contain this
97   - * fragment to allow an interaction in this fragment to be communicated
98   - * to the activity and potentially other fragments contained in that
99   - * activity.
100   - * <p>
101   - * See the Android Training lesson <a href=
102   - * "http://developer.android.com/training/basics/fragments/communicating.html"
103   - * >Communicating with Other Fragments</a> for more information.
104   - */
105   - public interface OnFragmentInteractionListener {
106   - // TODO: Update argument type and name
107   - void onFragmentInteraction(Uri uri);
  92 + } else if (v == tv_goto) {
  93 + if (tv_goto.equals("登录")) {
  94 +
  95 + } else if (tv_goto.equals("注册")) {
  96 +
  97 + }
  98 + } else if (v == get_idCode) {
  99 + mPresenter.idCodeResult(phoneNumber.getText().toString());
  100 + }
108 101 }
109 102 }
... ...
app/src/main/res/drawable-xhdpi/eye_close.png 0 → 100644

866 Bytes

app/src/main/res/drawable-xhdpi/eye_open.png 0 → 100644

1.65 KB

app/src/main/res/drawable-xhdpi/test.png 0 → 100644

27.8 KB

app/src/main/res/drawable/rudiobtn.xml 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <stroke android:color="#00000000" android:width="1dp"/>
  4 + <solid android:color="#b3cfff" />
  5 + <corners android:radius="5dp"/>
  6 +</shape>
0 7 \ No newline at end of file
... ...
app/src/main/res/drawable/rudiobtn2.xml 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <stroke android:color="#b8b8b9" android:width="1dp"/>
  4 + <solid android:color="#00000000"/>
  5 + <corners android:radius="180dp"/>
  6 +</shape>
0 7 \ No newline at end of file
... ...
app/src/main/res/layout/activity_regist.xml
... ... @@ -5,5 +5,9 @@
5 5 android:layout_width="match_parent"
6 6 android:layout_height="match_parent"
7 7 tools:context="com.shunzhi.parent.ui.activity.LoginAndRegistActivity">
8   -
  8 +<FrameLayout
  9 + android:id="@+id/frame"
  10 + android:layout_width="match_parent"
  11 + android:layout_height="match_parent"
  12 + />
9 13 </android.support.constraint.ConstraintLayout>
... ...
app/src/main/res/layout/fragment_login_and_regist.xml
1 1 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2 + xmlns:app="http://schemas.android.com/apk/res-auto"
2 3 xmlns:tools="http://schemas.android.com/tools"
3 4 android:layout_width="match_parent"
4 5 android:layout_height="match_parent"
5 6 tools:context="com.shunzhi.parent.ui.fragment.loginandregistfragment.LoginAndRegistFragment">
6 7  
7   - <!-- TODO: Update blank fragment layout -->
8   - <TextView
  8 +
  9 + <LinearLayout
9 10 android:layout_width="match_parent"
10 11 android:layout_height="match_parent"
11   - android:text="@string/hello_blank_fragment" />
  12 + android:orientation="vertical">
  13 +
  14 + <com.makeramen.roundedimageview.RoundedImageView
  15 + android:id="@+id/photoImage"
  16 + android:layout_width="80dp"
  17 + android:layout_height="80dp"
  18 + android:layout_gravity="center"
  19 + android:layout_marginTop="80dp"
  20 + android:scaleType="centerCrop"
  21 + android:src="@drawable/test"
  22 + app:riv_border_width="0dp"
  23 + app:riv_corner_radius="10dp"
  24 + app:riv_oval="false" />
  25 +
  26 + <LinearLayout
  27 + android:layout_width="match_parent"
  28 + android:layout_height="match_parent"
  29 + android:layout_marginLeft="40dp"
  30 + android:layout_marginRight="40dp"
  31 + android:layout_marginTop="50dp"
  32 + android:orientation="vertical">
  33 +
  34 + <LinearLayout
  35 + android:id="@+id/phoneLayout"
  36 + android:layout_width="match_parent"
  37 + android:layout_height="wrap_content"
  38 + android:orientation="vertical">
  39 +
  40 + <EditText
  41 + android:id="@+id/et_phoneNumber"
  42 + android:layout_width="match_parent"
  43 + android:layout_height="50dp"
  44 + android:background="@null"
  45 + android:hint="请输入手机号码"
  46 + android:textColorHint="@color/hintTextColor"
  47 + android:textSize="@dimen/sp_16" />
  48 +
  49 + <TextView
  50 + android:layout_width="match_parent"
  51 + android:layout_height="1dp"
  52 + android:background="@color/bottomline" />
  53 + </LinearLayout>
  54 +
  55 + <LinearLayout
  56 + android:id="@+id/idCodeLayout"
  57 + android:layout_width="match_parent"
  58 + android:layout_height="wrap_content"
  59 + android:orientation="vertical">
  60 +
  61 + <LinearLayout
  62 + android:layout_width="match_parent"
  63 + android:layout_height="wrap_content"
  64 + android:orientation="horizontal">
  65 +
  66 + <EditText
  67 + android:id="@+id/et_idCode"
  68 + android:layout_width="wrap_content"
  69 + android:layout_height="50dp"
  70 + android:layout_weight="1"
  71 + android:background="@null"
  72 + android:hint="请输入验证码"
  73 + android:textColorHint="@color/hintTextColor"
  74 + android:textSize="@dimen/sp_16" />
  75 +
  76 + <TextView
  77 + android:id="@+id/get_idCode"
  78 + android:layout_width="wrap_content"
  79 + android:layout_height="wrap_content"
  80 + android:background="@drawable/rudiobtn2"
  81 + android:paddingBottom="5dp"
  82 + android:paddingLeft="15dp"
  83 + android:paddingRight="15dp"
  84 + android:paddingTop="5dp"
  85 + android:text="获取"
  86 + android:textColor="@color/hintTextColor"
  87 + android:textSize="@dimen/sp_16"
  88 +
  89 + />
  90 +
  91 + </LinearLayout>
  92 +
  93 + <TextView
  94 + android:layout_width="match_parent"
  95 + android:layout_height="1dp"
  96 + android:background="@color/bottomline" />
  97 +
  98 + </LinearLayout>
  99 +
  100 + <LinearLayout
  101 + android:id="@+id/passwordLayout"
  102 + android:layout_width="match_parent"
  103 + android:layout_height="wrap_content"
  104 + android:orientation="vertical">
  105 +
  106 + <LinearLayout
  107 + android:layout_width="match_parent"
  108 + android:layout_height="wrap_content">
  109 +
  110 + <EditText
  111 + android:id="@+id/et_password"
  112 + android:layout_width="wrap_content"
  113 + android:layout_height="50dp"
  114 + android:layout_weight="1"
  115 + android:background="@null"
  116 + android:hint="请设置密码:6~8个字符"
  117 + android:textColorHint="@color/hintTextColor"
  118 + android:textSize="@dimen/sp_16" />
  119 +
  120 + <ImageView
  121 + android:id="@+id/img_eye"
  122 + android:layout_width="wrap_content"
  123 + android:layout_height="match_parent"
  124 + android:layout_gravity="center"
  125 + android:layout_marginRight="10dp"
  126 + android:src="@drawable/eye_close" />
  127 +
  128 + </LinearLayout>
  129 +
  130 + <TextView
  131 + android:layout_width="match_parent"
  132 + android:layout_height="1dp"
  133 + android:background="@color/bottomline" />
  134 +
  135 + </LinearLayout>
  136 +
  137 + <TextView
  138 + android:id="@+id/loginAndRegister"
  139 + android:layout_width="match_parent"
  140 + android:layout_height="wrap_content"
  141 + android:layout_marginTop="40dp"
  142 + android:background="@drawable/rudiobtn"
  143 + android:gravity="center"
  144 + android:paddingBottom="10dp"
  145 + android:paddingTop="10dp"
  146 + android:text="注册"
  147 + android:textColor="@color/white"
  148 + android:textSize="@dimen/sp_16" />
  149 +
  150 + <LinearLayout
  151 + android:layout_width="match_parent"
  152 + android:layout_height="wrap_content"
  153 + android:layout_marginTop="30dp"
  154 + android:gravity="center"
  155 + android:orientation="horizontal">
  156 +
  157 + <TextView
  158 + android:id="@+id/tv_info"
  159 + android:layout_width="wrap_content"
  160 + android:layout_height="wrap_content"
  161 + android:text="已注册,直接登录"
  162 + android:textColor="@color/hintTextColor"
  163 + android:textSize="@dimen/sp_16" />
  164 +
  165 + <TextView
  166 + android:id="@+id/tv_goto"
  167 + android:layout_width="wrap_content"
  168 + android:layout_height="wrap_content"
  169 + android:layout_marginLeft="20dp"
  170 + android:text="登录"
  171 + android:textColor="#acc9fc"
  172 + android:textSize="@dimen/sp_16" />
  173 +
  174 + </LinearLayout>
  175 +
  176 +
  177 + </LinearLayout>
  178 +
  179 + </LinearLayout>
12 180  
13 181 </FrameLayout>
... ...
app/src/main/res/values/colors.xml
... ... @@ -3,4 +3,9 @@
3 3 <color name="colorPrimary">#3F51B5</color>
4 4 <color name="colorPrimaryDark">#303F9F</color>
5 5 <color name="colorAccent">#FF4081</color>
  6 +
  7 +
  8 + <color name="hintTextColor">#C1C1C1</color>
  9 + <color name="bottomline">#B8B8B9</color>
  10 +
6 11 </resources>
... ...
roundedimageview-2.2.1/build.gradle 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +configurations.create("default")
  2 +artifacts.add("default", file('roundedimageview-2.2.1.aar'))
0 3 \ No newline at end of file
... ...
roundedimageview-2.2.1/roundedimageview-2.2.1.aar 0 → 100644
No preview for this file type
settings.gradle
1   -include ':app', ':mvpsdk'
  1 +include ':app', ':mvpsdk', ':roundedimageview-2.2.1'
... ...