parent
a5f1960943
commit
d51ff9e71d
25 changed files with 344 additions and 2273 deletions
@ -0,0 +1,30 @@ |
||||
package com.project.survey.activity.login |
||||
|
||||
import android.content.Intent |
||||
import androidx.core.widget.addTextChangedListener |
||||
import com.project.survey.activity.base.BaseBindingActivity |
||||
import com.project.survey.databinding.ActivityForgetPwdBinding |
||||
|
||||
/** |
||||
* 忘记密码 |
||||
*/ |
||||
class ForgetPwdActivity : BaseBindingActivity<ActivityForgetPwdBinding>() { |
||||
override fun getBinding(): ActivityForgetPwdBinding { |
||||
return ActivityForgetPwdBinding.inflate(layoutInflater) |
||||
} |
||||
|
||||
override fun initView() { |
||||
mBinding.etAccount.addTextChangedListener { |
||||
mBinding.tvSendCode.setEnabled(it?.isNotEmpty() == true); |
||||
} |
||||
|
||||
mBinding.tvSendCode.setOnClickListener { |
||||
startActivity(Intent(this, ForgetPwdInputCodeActivity::class.java)) |
||||
} |
||||
} |
||||
|
||||
override fun initData() { |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,25 @@ |
||||
package com.project.survey.activity.login |
||||
|
||||
import android.content.Intent |
||||
import com.project.survey.activity.base.BaseBindingActivity |
||||
import com.project.survey.databinding.ActivityForgetPwdInputCodeBinding |
||||
|
||||
/** |
||||
* 忘记密码后的输入验证码 |
||||
*/ |
||||
class ForgetPwdInputCodeActivity : BaseBindingActivity<ActivityForgetPwdInputCodeBinding>() { |
||||
override fun getBinding(): ActivityForgetPwdInputCodeBinding { |
||||
return ActivityForgetPwdInputCodeBinding.inflate(layoutInflater) |
||||
} |
||||
|
||||
override fun initView() { |
||||
mBinding.etInputCode.setOnInputListener { |
||||
startActivity(Intent(this, SetNewPwdActivity::class.java)) |
||||
} |
||||
} |
||||
|
||||
override fun initData() { |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,22 @@ |
||||
package com.project.survey.activity.login |
||||
|
||||
import com.project.survey.activity.base.BaseBindingActivity |
||||
import com.project.survey.databinding.ActivitySetNewPwdBinding |
||||
|
||||
/** |
||||
* 设置新密码 |
||||
*/ |
||||
class SetNewPwdActivity : BaseBindingActivity<ActivitySetNewPwdBinding>() { |
||||
override fun getBinding(): ActivitySetNewPwdBinding { |
||||
return ActivitySetNewPwdBinding.inflate(layoutInflater) |
||||
} |
||||
|
||||
override fun initView() { |
||||
|
||||
} |
||||
|
||||
override fun initData() { |
||||
|
||||
} |
||||
|
||||
} |
@ -1,318 +0,0 @@ |
||||
package com.project.survey.widget.edittext; |
||||
|
||||
import android.content.Context; |
||||
import android.content.res.TypedArray; |
||||
import android.graphics.Typeface; |
||||
import android.graphics.drawable.Drawable; |
||||
import android.os.Parcel; |
||||
import android.os.Parcelable; |
||||
import android.text.Editable; |
||||
import android.text.TextWatcher; |
||||
import android.text.method.PasswordTransformationMethod; |
||||
import android.util.AttributeSet; |
||||
import android.view.MotionEvent; |
||||
import android.widget.EditText; |
||||
|
||||
import androidx.annotation.NonNull; |
||||
import androidx.appcompat.widget.AppCompatEditText; |
||||
|
||||
import com.project.survey.R; |
||||
import com.project.survey.util.DensityUtils; |
||||
import com.project.survey.util.ResUtils; |
||||
|
||||
public class PassEdittext2 extends androidx.appcompat.widget.AppCompatEditText { |
||||
/** |
||||
* 增大点击区域 |
||||
*/ |
||||
private int mExtraClickArea; |
||||
|
||||
private final static int ALPHA_ICON_ENABLED = (int) (255 * 0.54f); |
||||
private final static int ALPHA_ICON_DISABLED = (int) (255 * 0.38f); |
||||
|
||||
private Drawable mShowPwDrawable; |
||||
private Drawable mHidePwDrawable; |
||||
private boolean mPasswordVisible; |
||||
private boolean mShowingIcon; |
||||
private boolean mSetErrorCalled; |
||||
private boolean mHoverShowsPw; |
||||
private boolean mHandlingHoverEvent; |
||||
private PasswordTransformationMethod mTransformationMethod; |
||||
|
||||
public PassEdittext2(Context context) { |
||||
this(context, null); |
||||
} |
||||
|
||||
public PassEdittext2(Context context, AttributeSet attrs) { |
||||
this(context, attrs, R.attr.PasswordEditTextStyle); |
||||
} |
||||
|
||||
public PassEdittext2(Context context, AttributeSet attrs, int defStyleAttr) { |
||||
super(context, attrs, defStyleAttr); |
||||
initAttrs(context, attrs, defStyleAttr); |
||||
} |
||||
|
||||
public void initAttrs(Context context, AttributeSet attrs, int defStyleAttr) { |
||||
mExtraClickArea = DensityUtils.dp2px(context, 20); |
||||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.PasswordEditText, defStyleAttr, 0); |
||||
boolean useNonMonospaceFont; |
||||
boolean enableIconAlpha; |
||||
try { |
||||
mShowPwDrawable = ResUtils.getDrawableAttrRes(getContext(), typedArray, R.styleable.PasswordEditText_pet_iconShow); |
||||
if (mShowPwDrawable == null) { |
||||
mShowPwDrawable = ResUtils.getVectorDrawable(getContext(), R.drawable.pet_icon_visibility_24dp); |
||||
} |
||||
mHidePwDrawable = ResUtils.getDrawableAttrRes(getContext(), typedArray, R.styleable.PasswordEditText_pet_iconHide); |
||||
if (mHidePwDrawable == null) { |
||||
mHidePwDrawable = ResUtils.getVectorDrawable(getContext(), R.drawable.pet_icon_visibility_off_24dp); |
||||
} |
||||
mHoverShowsPw = typedArray.getBoolean(R.styleable.PasswordEditText_pet_hoverShowsPw, false); |
||||
useNonMonospaceFont = typedArray.getBoolean(R.styleable.PasswordEditText_pet_nonMonospaceFont, false); |
||||
enableIconAlpha = typedArray.getBoolean(R.styleable.PasswordEditText_pet_enableIconAlpha, true); |
||||
boolean isAsteriskStyle = typedArray.getBoolean(R.styleable.PasswordEditText_pet_isAsteriskStyle, false); |
||||
if (isAsteriskStyle) { |
||||
mTransformationMethod = AsteriskPasswordTransformationMethod.getInstance(); |
||||
} else { |
||||
mTransformationMethod = PasswordTransformationMethod.getInstance(); |
||||
} |
||||
} finally { |
||||
typedArray.recycle(); |
||||
} |
||||
|
||||
if (enableIconAlpha) { |
||||
mHidePwDrawable.setAlpha(ALPHA_ICON_ENABLED); |
||||
mShowPwDrawable.setAlpha(ALPHA_ICON_DISABLED); |
||||
} |
||||
|
||||
// if (useNonMonospaceFont) {
|
||||
// setTypeface(Typeface.DEFAULT);
|
||||
// }
|
||||
|
||||
addTextChangedListener(new TextWatcher() { |
||||
@Override |
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
||||
} |
||||
|
||||
@Override |
||||
public void onTextChanged(CharSequence seq, int start, int before, int count) { |
||||
} |
||||
|
||||
@Override |
||||
public void afterTextChanged(Editable s) { |
||||
if (s.length() > 0) { |
||||
if (mSetErrorCalled) { |
||||
setCompoundDrawablesRelative(null, null, null, null); |
||||
mSetErrorCalled = false; |
||||
showPasswordVisibilityIndicator(true); |
||||
} |
||||
if (!mShowingIcon) { |
||||
showPasswordVisibilityIndicator(true); |
||||
} |
||||
} else { |
||||
// hides the indicator if no text inside text field
|
||||
mPasswordVisible = false; |
||||
handlePasswordInputVisibility(); |
||||
showPasswordVisibilityIndicator(false); |
||||
} |
||||
|
||||
} |
||||
}); |
||||
|
||||
handlePasswordInputVisibility(); |
||||
} |
||||
|
||||
public PassEdittext2 setExtraClickAreaSize(int extraClickArea) { |
||||
mExtraClickArea = extraClickArea; |
||||
return this; |
||||
} |
||||
|
||||
/** |
||||
* 设置密码输入框的样式 |
||||
* |
||||
* @param transformationMethod |
||||
* @return |
||||
*/ |
||||
public PassEdittext2 setPasswordTransformationMethod(PasswordTransformationMethod transformationMethod) { |
||||
mTransformationMethod = transformationMethod; |
||||
return this; |
||||
} |
||||
|
||||
/** |
||||
* 设置密码输入框的样式 |
||||
* |
||||
* @param isAsteriskStyle |
||||
* @return |
||||
*/ |
||||
public PassEdittext2 setIsAsteriskStyle(boolean isAsteriskStyle) { |
||||
if (isAsteriskStyle) { |
||||
mTransformationMethod = AsteriskPasswordTransformationMethod.getInstance(); |
||||
} else { |
||||
mTransformationMethod = PasswordTransformationMethod.getInstance(); |
||||
} |
||||
return this; |
||||
} |
||||
|
||||
private boolean isRtl() { |
||||
return getLayoutDirection() == LAYOUT_DIRECTION_RTL; |
||||
} |
||||
|
||||
@Override |
||||
public Parcelable onSaveInstanceState() { |
||||
Parcelable superState = super.onSaveInstanceState(); |
||||
return new PassEdittext2.SavedState(superState, mShowingIcon, mPasswordVisible); |
||||
} |
||||
|
||||
@Override |
||||
public void onRestoreInstanceState(Parcelable state) { |
||||
PasswordEditText.SavedState savedState = (PasswordEditText.SavedState) state; |
||||
super.onRestoreInstanceState(savedState.getSuperState()); |
||||
mShowingIcon = savedState.isShowingIcon(); |
||||
mPasswordVisible = savedState.isPasswordVisible(); |
||||
handlePasswordInputVisibility(); |
||||
showPasswordVisibilityIndicator(mShowingIcon); |
||||
} |
||||
|
||||
@Override |
||||
public void setError(CharSequence error) { |
||||
super.setError(error); |
||||
mSetErrorCalled = true; |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void setError(CharSequence error, Drawable icon) { |
||||
super.setError(error, icon); |
||||
mSetErrorCalled = true; |
||||
} |
||||
|
||||
@Override |
||||
public boolean onTouchEvent(MotionEvent event) { |
||||
if (!mShowingIcon) { |
||||
return super.onTouchEvent(event); |
||||
} else { |
||||
boolean touchable = isTouchable(event); |
||||
switch (event.getAction()) { |
||||
case MotionEvent.ACTION_DOWN: |
||||
if (mHoverShowsPw) { |
||||
if (touchable) { |
||||
togglePasswordIconVisibility(); |
||||
// prevent keyboard from coming up
|
||||
event.setAction(MotionEvent.ACTION_CANCEL); |
||||
mHandlingHoverEvent = true; |
||||
} |
||||
} |
||||
break; |
||||
case MotionEvent.ACTION_UP: |
||||
if (mHandlingHoverEvent || touchable) { |
||||
togglePasswordIconVisibility(); |
||||
// prevent keyboard from coming up
|
||||
event.setAction(MotionEvent.ACTION_CANCEL); |
||||
mHandlingHoverEvent = false; |
||||
} |
||||
break; |
||||
default: |
||||
break; |
||||
} |
||||
return super.onTouchEvent(event); |
||||
} |
||||
} |
||||
|
||||
private boolean isTouchable(MotionEvent event) { |
||||
boolean touchable; |
||||
if (isRtl()) { |
||||
touchable = event.getX() > getPaddingLeft() - mExtraClickArea && event.getX() < getPaddingLeft() + mShowPwDrawable.getIntrinsicWidth() + mExtraClickArea; |
||||
} else { |
||||
touchable = event.getX() > getWidth() - getPaddingRight() - mShowPwDrawable.getIntrinsicWidth() - mExtraClickArea && event.getX() < getWidth() - getPaddingRight() + mExtraClickArea; |
||||
} |
||||
return touchable; |
||||
} |
||||
|
||||
|
||||
private void showPasswordVisibilityIndicator(boolean shouldShowIcon) { |
||||
if (shouldShowIcon) { |
||||
Drawable drawable = mPasswordVisible ? mShowPwDrawable : mHidePwDrawable; |
||||
mShowingIcon = true; |
||||
setCompoundDrawablesRelativeWithIntrinsicBounds(null, null, drawable, null); |
||||
} else { |
||||
// reset drawable
|
||||
setCompoundDrawablesRelative(null, null, null, null); |
||||
mShowingIcon = false; |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* This method toggles the visibility of the icon and takes care of switching the input type |
||||
* of the view to be able to see the password afterwards. |
||||
* <p> |
||||
* This method may only be called if there is an icon visible |
||||
*/ |
||||
private void togglePasswordIconVisibility() { |
||||
mPasswordVisible = !mPasswordVisible; |
||||
handlePasswordInputVisibility(); |
||||
showPasswordVisibilityIndicator(true); |
||||
} |
||||
|
||||
/** |
||||
* This method is called when restoring the state (e.g. on orientation change) |
||||
*/ |
||||
private void handlePasswordInputVisibility() { |
||||
int selectionStart = getSelectionStart(); |
||||
int selectionEnd = getSelectionEnd(); |
||||
if (mPasswordVisible) { |
||||
setTransformationMethod(null); |
||||
} else { |
||||
setTransformationMethod(mTransformationMethod); |
||||
} |
||||
setSelection(selectionStart, selectionEnd); |
||||
|
||||
} |
||||
|
||||
/** |
||||
* Convenience class to save / restore the state of icon. |
||||
*/ |
||||
protected static class SavedState extends BaseSavedState { |
||||
|
||||
private final boolean mShowingIcon; |
||||
private final boolean mPasswordVisible; |
||||
|
||||
private SavedState(Parcelable superState, boolean sI, boolean pV) { |
||||
super(superState); |
||||
mShowingIcon = sI; |
||||
mPasswordVisible = pV; |
||||
} |
||||
|
||||
private SavedState(Parcel in) { |
||||
super(in); |
||||
mShowingIcon = in.readByte() != 0; |
||||
mPasswordVisible = in.readByte() != 0; |
||||
} |
||||
|
||||
public boolean isShowingIcon() { |
||||
return mShowingIcon; |
||||
} |
||||
|
||||
public boolean isPasswordVisible() { |
||||
return mPasswordVisible; |
||||
} |
||||
|
||||
@Override |
||||
public void writeToParcel(Parcel destination, int flags) { |
||||
super.writeToParcel(destination, flags); |
||||
destination.writeByte((byte) (mShowingIcon ? 1 : 0)); |
||||
destination.writeByte((byte) (mPasswordVisible ? 1 : 0)); |
||||
} |
||||
|
||||
public static final Creator<PassEdittext2.SavedState> CREATOR = new Creator<PassEdittext2.SavedState>() { |
||||
|
||||
@Override |
||||
public PassEdittext2.SavedState createFromParcel(Parcel in) { |
||||
return new PassEdittext2.SavedState(in); |
||||
} |
||||
|
||||
@Override |
||||
public PassEdittext2.SavedState[] newArray(int size) { |
||||
return new PassEdittext2.SavedState[size]; |
||||
} |
||||
|
||||
}; |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -1,13 +0,0 @@ |
||||
package com.project.survey.widget.edittext.materialedittext.validation; |
||||
|
||||
/** |
||||
* 长度验证 |
||||
* |
||||
* @author xuexiang |
||||
* @since 2018/11/26 下午5:06 |
||||
*/ |
||||
public abstract class METLengthChecker { |
||||
|
||||
public abstract int getLength(CharSequence text); |
||||
|
||||
} |
@ -1,43 +0,0 @@ |
||||
package com.project.survey.widget.edittext.materialedittext.validation; |
||||
|
||||
import androidx.annotation.NonNull; |
||||
|
||||
/** |
||||
* 自定义校验器 |
||||
* |
||||
* @author xuexiang |
||||
* @since 2018/11/26 下午5:06 |
||||
*/ |
||||
public abstract class METValidator { |
||||
|
||||
/** |
||||
* Error message that the view will display if validation fails. |
||||
* <p/> |
||||
* This is protected, so you can change this dynamically in your {@link #isValid(CharSequence, boolean)} |
||||
* implementation. If necessary, you can also interact with this via its getter and setter. |
||||
*/ |
||||
protected String errorMessage; |
||||
|
||||
public METValidator(@NonNull String errorMessage) { |
||||
this.errorMessage = errorMessage; |
||||
} |
||||
|
||||
public void setErrorMessage(@NonNull String errorMessage) { |
||||
this.errorMessage = errorMessage; |
||||
} |
||||
|
||||
@NonNull |
||||
public String getErrorMessage() { |
||||
return this.errorMessage; |
||||
} |
||||
|
||||
/** |
||||
* Abstract method to implement your own validation checking. |
||||
* |
||||
* @param text The CharSequence representation of the text in the EditText field. Cannot be null, but may be empty. |
||||
* @param isEmpty Boolean indicating whether or not the text param is empty |
||||
* @return True if valid, false if not |
||||
*/ |
||||
public abstract boolean isValid(@NonNull CharSequence text, boolean isEmpty); |
||||
|
||||
} |
@ -1,38 +0,0 @@ |
||||
/* |
||||
* Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com) |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
* |
||||
*/ |
||||
|
||||
package com.project.survey.widget.edittext.materialedittext.validation; |
||||
|
||||
import androidx.annotation.NonNull; |
||||
|
||||
/** |
||||
* 非空检验 |
||||
* |
||||
* @author xuexiang |
||||
* @since 2019/5/14 10:27 |
||||
*/ |
||||
public class NotAllowEmptyValidator extends METValidator { |
||||
|
||||
public NotAllowEmptyValidator(@NonNull String errorMessage) { |
||||
super(errorMessage); |
||||
} |
||||
|
||||
@Override |
||||
public boolean isValid(@NonNull CharSequence text, boolean isEmpty) { |
||||
return !isEmpty; |
||||
} |
||||
} |
@ -1,31 +0,0 @@ |
||||
package com.project.survey.widget.edittext.materialedittext.validation; |
||||
|
||||
import androidx.annotation.NonNull; |
||||
|
||||
import java.util.regex.Pattern; |
||||
|
||||
/** |
||||
* 正则表达式验证 |
||||
* |
||||
* @author xuexiang |
||||
* @since 2018/11/26 下午5:06 |
||||
*/ |
||||
public class RegexpValidator extends METValidator { |
||||
|
||||
private Pattern pattern; |
||||
|
||||
public RegexpValidator(@NonNull String errorMessage, @NonNull String regex) { |
||||
super(errorMessage); |
||||
pattern = Pattern.compile(regex); |
||||
} |
||||
|
||||
public RegexpValidator(@NonNull String errorMessage, @NonNull Pattern pattern) { |
||||
super(errorMessage); |
||||
this.pattern = pattern; |
||||
} |
||||
|
||||
@Override |
||||
public boolean isValid(@NonNull CharSequence text, boolean isEmpty) { |
||||
return pattern.matcher(text).matches(); |
||||
} |
||||
} |
@ -0,0 +1,5 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<item android:color="@color/white" android:state_enabled="true" /> |
||||
<item android:color="#A5A8AA" android:state_enabled="false" /> |
||||
</selector> |
@ -0,0 +1,7 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
||||
<item android:drawable="@drawable/bg_btn_enable" android:state_enabled="true" /> |
||||
<item android:drawable="@drawable/bg_btn_enable_not" android:state_enabled="false" /> |
||||
|
||||
</selector> |
@ -0,0 +1,6 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:shape="rectangle"> |
||||
<corners android:radius="@dimen/sw_99dp" /> |
||||
<solid android:color="#396BD0" /> |
||||
</shape> |
@ -0,0 +1,6 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:shape="rectangle"> |
||||
<corners android:radius="@dimen/sw_99dp" /> |
||||
<solid android:color="#E8EAEE" /> |
||||
</shape> |
@ -0,0 +1,67 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:orientation="vertical"> |
||||
|
||||
<include layout="@layout/toolbar" /> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginHorizontal="@dimen/sw_22dp" |
||||
android:layout_marginTop="@dimen/sw_12dp" |
||||
android:text="@string/authentication" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_20sp" |
||||
android:textStyle="bold" /> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginHorizontal="@dimen/sw_22dp" |
||||
android:layout_marginTop="@dimen/sw_6dp" |
||||
android:text="@string/please_input_username" |
||||
android:textColor="@color/c_727778" |
||||
android:textSize="@dimen/sw_14sp" /> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginHorizontal="@dimen/sw_22dp" |
||||
android:layout_marginTop="@dimen/sw_48dp" |
||||
android:text="@string/account" |
||||
android:textColor="@color/c_727778" |
||||
android:textSize="@dimen/sw_11sp" /> |
||||
|
||||
<EditText |
||||
android:id="@+id/etAccount" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginHorizontal="@dimen/sw_22dp" |
||||
android:text="" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_14sp" /> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginHorizontal="@dimen/sw_22dp" |
||||
android:layout_marginTop="@dimen/sw_48dp" |
||||
android:gravity="end" |
||||
android:orientation="horizontal"> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvSendCode" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:background="@drawable/bg_btn_eanble_sc" |
||||
android:enabled="false" |
||||
android:paddingHorizontal="@dimen/sw_20dp" |
||||
android:paddingVertical="@dimen/sw_6dp" |
||||
android:text="@string/send_the_verification_code" |
||||
android:textColor="@color/text_color_enable_sc" /> |
||||
|
||||
</LinearLayout> |
||||
|
||||
</LinearLayout> |
@ -0,0 +1,40 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:orientation="vertical"> |
||||
|
||||
<include layout="@layout/toolbar" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvAccountDesc" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginHorizontal="@dimen/sw_22dp" |
||||
android:layout_marginTop="@dimen/sw_12dp" |
||||
android:text="@string/please_input_code" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_20sp" |
||||
android:textStyle="bold" /> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginHorizontal="@dimen/sw_22dp" |
||||
android:layout_marginTop="@dimen/sw_6dp" |
||||
android:text="@string/the_verification_code_was_sent_for_forget_pwd" |
||||
android:textColor="@color/c_727778" |
||||
android:textSize="@dimen/sw_14sp" /> |
||||
|
||||
<com.project.survey.widget.edittext.verificationcode.SerialnumberLayout |
||||
android:id="@+id/etInputCode" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginHorizontal="@dimen/sw_22dp" |
||||
android:layout_marginTop="@dimen/sw_24dp" |
||||
app:code_number="6" |
||||
app:line_color_default="@color/c_dfdfdf" |
||||
app:line_color_focus="@color/colorPrimary" /> |
||||
|
||||
</LinearLayout> |
@ -0,0 +1,59 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:orientation="vertical"> |
||||
|
||||
<include layout="@layout/toolbar" /> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="@dimen/sw_12dp" |
||||
android:orientation="vertical" |
||||
android:paddingHorizontal="@dimen/sw_22dp"> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:text="@string/set_new_password" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_20sp" |
||||
android:textStyle="bold" /> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="@dimen/sw_6dp" |
||||
android:text="@string/please_enter_new_password" |
||||
android:textColor="@color/c_727778" |
||||
android:textSize="@dimen/sw_14sp" /> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="@dimen/sw_40dp" |
||||
android:text="@string/password" |
||||
android:textColor="@color/c_727778" |
||||
android:textSize="@dimen/sw_11sp" /> |
||||
|
||||
<include |
||||
android:id="@+id/ilPwdOne" |
||||
layout="@layout/item_input_pwd" /> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="@dimen/sw_24dp" |
||||
android:text="@string/confirm_password" |
||||
android:textColor="@color/c_727778" |
||||
android:textSize="@dimen/sw_11sp" /> |
||||
|
||||
<include |
||||
android:id="@+id/ilPwdTwo" |
||||
layout="@layout/item_input_pwd" /> |
||||
|
||||
</LinearLayout> |
||||
|
||||
|
||||
</LinearLayout> |
@ -0,0 +1,31 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content"> |
||||
|
||||
<EditText |
||||
android:id="@+id/etPwd" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:inputType="textPassword" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_14sp" /> |
||||
|
||||
<FrameLayout |
||||
android:id="@+id/pwdShowHide" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_alignParentEnd="true" |
||||
android:layout_centerVertical="true" |
||||
android:padding="@dimen/sw_12dp"> |
||||
|
||||
<ImageView |
||||
android:id="@+id/ivPwdShowHide" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:background="@drawable/bg_pwd_sc" /> |
||||
|
||||
</FrameLayout> |
||||
|
||||
|
||||
</RelativeLayout> |
Loading…
Reference in new issue