提交 7b5c11e5 authored 作者: lgd's avatar lgd

1.忘记密码

上级 90660f7d
......@@ -72,6 +72,22 @@
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.login.ForgetOneActivity"
android:configChanges="keyboardHidden|orientation"
android:label=" "
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.login.ForgetTwoActivity"
android:configChanges="keyboardHidden|orientation"
android:label=" "
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider"
......
package com.wd.workoffice.ui.login;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/*
* 忘记密码第一步
* */
public class ForgetOneActivity extends WorkToolBarActivity {
@BindView(R.id.et_phone)
EditText etPhone;
@BindView(R.id.et_code)
EditText etCode;
@BindView(R.id.tv_code)
TextView tvCode;
@BindView(R.id.btn_register)
Button btnRegister;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
public void initData() {
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_forget_pwd_one;
}
@OnClick({R.id.tv_code, R.id.btn_register})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_code:
break;
case R.id.btn_register:
startActivity(ForgetTwoActivity.class);
break;
}
}
}
package com.wd.workoffice.ui.login;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/*
* 忘记密码第二步
* */
public class ForgetTwoActivity extends WorkToolBarActivity {
@BindView(R.id.et_pwd)
EditText etPwd;
@BindView(R.id.et_confirm_pwd)
EditText etConfirmPwd;
@BindView(R.id.btn_login)
Button btnLogin;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
public void initData() {
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_forget_pwd_two;
}
@OnClick(R.id.btn_login)
public void onViewClicked() {
}
}
......@@ -10,6 +10,7 @@ import android.widget.RadioGroup;
import android.widget.TextView;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkBaseActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
......@@ -19,7 +20,7 @@ import flexible.xd.android_base.base.BaseActivity;
/*
* 注释:关于登录页
* */
public class LoginActivity extends BaseActivity {
public class LoginActivity extends WorkBaseActivity {
@BindView(R.id.rb_pwd)
......@@ -70,48 +71,7 @@ public class LoginActivity extends BaseActivity {
return R.layout.activity_login;
}
private void initViewData() {
// //2.《忘记密码》
// mForgetpassword.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// ToastUtils.showShortToast(MainActivity.this, "忘记密码");
// startActivity(new Intent(MainActivity.this, Main3Activity.class));
// }
// });
// //3.《没有账号立即注册》
// mRegister.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// startActivity(new Intent(MainActivity.this, RegisterFirstActivity.class));//Zhengwang_Bat_MesActivity
// }
// });
}
private void getView() {
// //密码登录点击
// mRbntPassword.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// mLinearPassword.setVisibility(View.VISIBLE);//显示
// mLinearPhone.setVisibility(View.GONE);//隐藏
// }
// });
// //手机号验证码登录
// mRbntPhone.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
//
// }
// });
// mBanck.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// finish();
// }
// });
}
@OnClick({R.id.rb_pwd, R.id.rb_phone, R.id.btn_login,R.id.tv_code, R.id.tv_forget, R.id.tv_register})
......@@ -139,6 +99,7 @@ public class LoginActivity extends BaseActivity {
// presenter.postBodyMethod(MyApi.BASE_URL_LOGIN, map, LoginBean.class);
break;
case R.id.tv_forget:
startActivity(ForgetOneActivity.class);
break;
case R.id.tv_register:
startActivity(RegisterFirstActivity.class);
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="70mm"
android:layout_centerHorizontal="true"
android:text="忘记密码"
android:textColor="@color/mainTextColor"
android:textSize="28sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="50mm"
android:layout_alignParentBottom="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="58mm"
android:layout_marginTop="70mm"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50mm"
android:layout_centerInParent="true"
android:layout_marginTop="20mm"
android:background="@drawable/shape_login_et"
android:gravity="center_vertical">
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:layout_centerVertical="true"
android:layout_marginLeft="13mm"
android:background="@mipmap/login_phone" />
<EditText
android:id="@+id/et_phone"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:background="@null"
android:hint="输入手机号"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50mm"
android:layout_marginTop="20mm"
android:background="@drawable/shape_login_et"
android:gravity="center">
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:layout_marginLeft="13mm"
android:background="@mipmap/login_pwd" />
<EditText
android:id="@+id/et_code"
android:layout_width="0dp"
android:layout_height="30mm"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical"
android:hint="输入验证码"
android:inputType="textPassword"
android:textColorHint="@color/flexible_text_sup"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_code"
android:layout_width="70mm"
android:layout_height="match_parent"
android:gravity="center"
android:text="获取验证码"
android:textColor="@color/mainTextColor"
android:textSize="13sp" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/btn_register"
android:layout_width="match_parent"
android:layout_height="50mm"
android:layout_marginHorizontal="58mm"
android:layout_marginTop="80mm"
android:background="@mipmap/btn_main_bg"
android:text="注册"
android:textColor="@color/white"
android:textSize="20sp" />
</LinearLayout>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="70mm"
android:text="设置新密码"
android:textColor="@color/mainTextColor"
android:textSize="28sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="50mm"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="58mm"
android:layout_marginTop="70mm"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50mm"
android:layout_centerInParent="true"
android:layout_marginTop="20mm"
android:background="@drawable/shape_login_et"
android:gravity="center_vertical">
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:layout_centerVertical="true"
android:layout_marginLeft="13mm"
android:background="@mipmap/login_pwd" />
<EditText
android:id="@+id/et_pwd"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:background="@null"
android:hint="设置账号密码"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50mm"
android:layout_marginTop="20mm"
android:background="@drawable/shape_login_et"
android:gravity="center">
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:layout_marginLeft="13mm"
android:background="@mipmap/login_pwd" />
<EditText
android:id="@+id/et_confirm_pwd"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical"
android:hint="再次确认密码"
android:inputType="textPassword"
android:textColorHint="@color/flexible_text_sup"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/btn_login"
android:layout_width="match_parent"
android:layout_height="50mm"
android:layout_marginHorizontal="58mm"
android:layout_marginTop="80mm"
android:background="@mipmap/btn_main_bg"
android:text="登录"
android:textColor="@color/white"
android:textSize="20sp" />
</LinearLayout>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论