[Modify]登录页面功能修改
@@ -3,14 +3,23 @@ package com.yizhuan.erban.ui.login;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatEditText;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.coorchice.library.SuperTextView;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||
import com.yizhuan.erban.MainActivity;
|
||||
import com.yizhuan.erban.NimMiddleActivity;
|
||||
import com.yizhuan.erban.R;
|
||||
@@ -19,8 +28,10 @@ import com.yizhuan.erban.application.ReportManager;
|
||||
import com.yizhuan.erban.base.BaseActivity;
|
||||
import com.yizhuan.erban.ui.login.helper.LogoutHelper;
|
||||
import com.yizhuan.erban.ui.setting.ResetPasswordActivity;
|
||||
import com.yizhuan.xchat_android_core.DemoCache;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
|
||||
import com.yizhuan.xchat_android_core.code.CodeType;
|
||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -30,14 +41,28 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import java.util.HashMap;
|
||||
|
||||
import io.reactivex.SingleObserver;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
|
||||
public class LoginPasswordActivity extends BaseActivity {
|
||||
|
||||
private View btnNext;
|
||||
private AppCompatTextView tvAccountLogin;
|
||||
private AppCompatTextView tvCodeLogin;
|
||||
private View viewLoginType;
|
||||
private LinearLayout llAccountLogin;
|
||||
private LinearLayout llSmsLogin;
|
||||
private AppCompatTextView tvAreaCode;
|
||||
private SuperTextView tvRegain;
|
||||
private AppCompatEditText etAccount;
|
||||
private AppCompatEditText etCode;
|
||||
private EditText edtPhone;
|
||||
private EditText edtPassword;
|
||||
private Button btnSmsNext;
|
||||
|
||||
private CountDownTimer cdt = null;
|
||||
|
||||
private final TextWatcher textWatcher = new TextWatcherWrapper() {
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
@@ -45,6 +70,13 @@ public class LoginPasswordActivity extends BaseActivity {
|
||||
}
|
||||
};
|
||||
|
||||
private final TextWatcher textCodeWatcher = new TextWatcherWrapper() {
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
checkCodeInput();
|
||||
}
|
||||
};
|
||||
|
||||
public static void start(Context context) {
|
||||
Intent intent = new Intent(context, LoginPasswordActivity.class);
|
||||
context.startActivity(intent);
|
||||
@@ -64,17 +96,186 @@ public class LoginPasswordActivity extends BaseActivity {
|
||||
btnNext.setEnabled(enabled);
|
||||
}
|
||||
|
||||
private void checkCodeInput() {
|
||||
boolean enabled = !TextUtils.isEmpty(etAccount.getText().toString()) && etAccount.getText().toString().trim().length() >= 1
|
||||
&& !TextUtils.isEmpty(etCode.getText().toString()) && etCode.getText().toString().trim().length() >= 1;
|
||||
btnSmsNext.setEnabled(enabled);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
btnNext = findViewById(R.id.btn_next);
|
||||
tvAccountLogin = findViewById(R.id.tv_account_login);
|
||||
tvCodeLogin = findViewById(R.id.tv_code_login);
|
||||
viewLoginType = findViewById(R.id.view_login_type);
|
||||
llAccountLogin = findViewById(R.id.ll_account_login);
|
||||
llSmsLogin = findViewById(R.id.ll_sms_login);
|
||||
tvAreaCode = findViewById(R.id.tv_areaCode);
|
||||
tvRegain = findViewById(R.id.tv_regain);
|
||||
etAccount = findViewById(R.id.et_Account);
|
||||
etCode = findViewById(R.id.et_Code);
|
||||
etAccount.addTextChangedListener(textCodeWatcher);
|
||||
etCode.addTextChangedListener(textCodeWatcher);
|
||||
edtPhone = findViewById(R.id.et_account);
|
||||
edtPassword = findViewById(R.id.et_password);
|
||||
edtPhone.addTextChangedListener(textWatcher);
|
||||
edtPassword.addTextChangedListener(textWatcher);
|
||||
btnSmsNext = findViewById(R.id.btn_sms_next);
|
||||
findViewById(R.id.iv_back).setOnClickListener(v -> finish());
|
||||
btnNext.setOnClickListener(v -> login());
|
||||
findViewById(R.id.tv_forget_password).setOnClickListener(v ->
|
||||
ResetPasswordActivity.start(context, ResetPasswordActivity.FROM_NOT_LOGIN)
|
||||
);
|
||||
tvAccountLogin.setOnClickListener(v -> {
|
||||
viewLoginType.setBackground(ContextCompat.getDrawable(this, R.drawable.bg_account_login));
|
||||
tvAccountLogin.setTextColor(ContextCompat.getColor(this, R.color.text_title_color));
|
||||
tvCodeLogin.setTextColor(ContextCompat.getColor(this, R.color.color_6D6B89));
|
||||
llAccountLogin.setVisibility(View.VISIBLE);
|
||||
llSmsLogin.setVisibility(View.GONE);
|
||||
});
|
||||
tvCodeLogin.setOnClickListener(v -> {
|
||||
viewLoginType.setBackground(ContextCompat.getDrawable(this, R.drawable.bg_code_login));
|
||||
tvAccountLogin.setTextColor(ContextCompat.getColor(this, R.color.color_6D6B89));
|
||||
tvCodeLogin.setTextColor(ContextCompat.getColor(this, R.color.text_title_color));
|
||||
llAccountLogin.setVisibility(View.GONE);
|
||||
llSmsLogin.setVisibility(View.VISIBLE);
|
||||
});
|
||||
tvAreaCode.setOnClickListener(v -> {
|
||||
AreaCodeActivity.startForResult(this, 100);
|
||||
});
|
||||
tvRegain.setOnClickListener(v -> {
|
||||
if (TextUtils.isEmpty(etAccount.getText().toString().trim())) {
|
||||
toast(getString(R.string.ui_setting_resetpasswordactivity_04));
|
||||
return;
|
||||
}
|
||||
hideIME();
|
||||
getDialogManager().showProgressDialog(this);
|
||||
String areaCode = tvAreaCode.getText().toString().substring(1);
|
||||
String phone = tvAreaCode.getText().toString()
|
||||
.substring(1) + etAccount.getText().toString();
|
||||
AuthModel.get()
|
||||
.getSmsCode(
|
||||
areaCode,
|
||||
phone,
|
||||
CodeType.REGISTER
|
||||
)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.subscribe(new SingleObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String tip) {
|
||||
getDialogManager().dismissDialog();
|
||||
toast(tip);
|
||||
startCounter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (e.getMessage() != null) {
|
||||
toast(e.getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
btnSmsNext.setOnClickListener(v -> {
|
||||
//发起登录
|
||||
HashMap<String, Object> map = new HashMap<>(3);
|
||||
map.put(IReportConstants.LOGIN_TYPE, IReportConstants.FOUR);
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_LOGIN);
|
||||
ReportManager.get().reportEvent(IReportConstants.LOGIN_REQUEST, map);
|
||||
String smsCode = etCode.getText().toString();
|
||||
getDialogManager().showProgressDialog(
|
||||
this,
|
||||
getString(R.string.ui_login_logincodeactivity_02)
|
||||
);
|
||||
AuthModel.get().login(
|
||||
tvAreaCode.getText().toString(),
|
||||
etAccount.getText().toString(),
|
||||
"",
|
||||
smsCode,
|
||||
"",
|
||||
""
|
||||
)
|
||||
.subscribe(new SingleObserver<>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mCompositeDisposable.add(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
reportLoginResult(IReportConstants.ONE, "");
|
||||
DemoCache.saveBoundAuthCode(true);
|
||||
getDialogManager().dismissDialog();
|
||||
HashMap<String, Object> map = new HashMap<>(3);
|
||||
map.put(FirebaseAnalytics.Param.METHOD, getString(R.string.login_phone_code));
|
||||
ReportManager.get().reportEvent(FirebaseAnalytics.Event.LOGIN, map);
|
||||
ReportManager.get().reportAdjustEvent(IReportConstants.ADJUST_LOGIN);
|
||||
stopCounter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
reportLoginResult(
|
||||
IReportConstants.ZERO,
|
||||
e.getMessage()
|
||||
);
|
||||
getDialogManager().dismissDialog();
|
||||
dealWithLoginError(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private void startCounter() {
|
||||
stopCounter();
|
||||
//开始倒计时 60s 间隔1s
|
||||
tvRegain.setEnabled(false);
|
||||
cdt = new CountDownTimer(60 * 1000, 100) {
|
||||
@Override
|
||||
public void onTick(long text) {
|
||||
showTextDown(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
resetBtn();
|
||||
}
|
||||
};
|
||||
cdt.start();
|
||||
}
|
||||
|
||||
private void showTextDown(Long text) {
|
||||
String time = (text / 1000) + "s";
|
||||
tvRegain.setText(time);
|
||||
}
|
||||
|
||||
private void resetBtn() {
|
||||
stopCounter();
|
||||
tvRegain.setEnabled(true);
|
||||
tvRegain.setText(getString(R.string.text_login_code_regain));
|
||||
}
|
||||
|
||||
private void stopCounter() {
|
||||
if (cdt != null) {
|
||||
cdt.cancel();
|
||||
cdt = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 100 && resultCode == RESULT_OK) {
|
||||
String areaCode = data.getStringExtra(AreaCodeActivity.COUNTRY_NUMBER);
|
||||
if (areaCode != null) {
|
||||
tvAreaCode.setText(areaCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
BIN
app/src/main/res/drawable-xhdpi/bg_account_login.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/bg_code_login.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/bg_login_activity.png
Normal file
After Width: | Height: | Size: 160 KiB |
BIN
app/src/main/res/drawable-xhdpi/bg_login_password_code.png
Normal file
After Width: | Height: | Size: 154 KiB |
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 791 B |
Before Width: | Height: | Size: 858 B After Width: | Height: | Size: 554 B |
BIN
app/src/main/res/drawable-xhdpi/ic_logo.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
app/src/main/res/drawable-xhdpi/login_left.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
@@ -3,8 +3,6 @@
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/bg_disable_303043" />
|
||||
|
||||
|
||||
<corners android:radius="100dp" />
|
||||
|
||||
</shape>
|
13
app/src/main/res/drawable/bg_common_disable_enabled.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#D1F9FF"
|
||||
android:startColor="#EEDCFF"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
|
||||
</shape>
|
5
app/src/main/res/drawable/bg_common_enabled.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/bg_common_select_normal" android:state_enabled="true" />
|
||||
<item android:drawable="@drawable/bg_common_disable_enabled" android:state_enabled="false" />
|
||||
</selector>
|
@@ -4,10 +4,10 @@
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#19EBFF"
|
||||
android:startColor="#ED66FF"
|
||||
android:endColor="#5AECFA"
|
||||
android:startColor="#CF70FF"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<corners android:radius="@dimen/dp_30" />
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
|
||||
</shape>
|
@@ -1,10 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#F0F5F6" />
|
||||
<corners
|
||||
android:bottomLeftRadius="10dp"
|
||||
android:bottomRightRadius="10dp"
|
||||
android:topLeftRadius="10dp"
|
||||
android:topRightRadius="10dp" />
|
||||
<solid android:color="@color/color_F3F5FA" />
|
||||
<corners android:radius="@dimen/dp_26"/>
|
||||
</shape>
|
||||
|
@@ -10,41 +10,25 @@
|
||||
android:id="@+id/view_bg_top"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_login"
|
||||
android:background="@drawable/bg_login_activity"
|
||||
app:layout_constraintDimensionRatio="750:666"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_slogan"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:src="@drawable/ic_logo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="Welcome to"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_app_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="Piko!"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="64sp"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_slogan"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_slogan" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/view_bg_bottom"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/view_bg_bottom"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_white_top_25dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="-80dp"
|
||||
@@ -54,10 +38,32 @@
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<androidx.legacy.widget.Space
|
||||
android:id="@+id/space_google"
|
||||
android:layout_weight="1.4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_google"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="63dp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:layout_marginEnd="34dp"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:drawablePadding="35dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="25dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/login_google"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="16sp"
|
||||
app:drawableStartCompat="@drawable/ic_login_google" />
|
||||
|
||||
<androidx.legacy.widget.Space
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_facebook"
|
||||
android:layout_width="match_parent"
|
||||
@@ -95,28 +101,6 @@
|
||||
android:textSize="16sp"
|
||||
app:drawableStartCompat="@drawable/ic_login_line" />
|
||||
|
||||
<androidx.legacy.widget.Space
|
||||
android:id="@+id/space_google"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_google"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="63dp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:layout_marginEnd="34dp"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:drawablePadding="35dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="25dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/login_google"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="16sp"
|
||||
app:drawableStartCompat="@drawable/ic_login_google" />
|
||||
|
||||
<androidx.legacy.widget.Space
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -10,146 +10,281 @@
|
||||
android:id="@+id/view_bg_top"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_login"
|
||||
app:layout_constraintDimensionRatio="750:666"
|
||||
android:background="@drawable/bg_login_password_code"
|
||||
app:layout_constraintDimensionRatio="375:418"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/arrow_left"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_slogan"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_slogan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/layout_activity_login_password_01"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="40sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:src="@drawable/login_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_slogan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:layout_marginTop="48dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/Welcome_to_piko"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_back" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_top"
|
||||
android:id="@+id/view_login_type"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:background="@drawable/bg_account_login"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_slogan" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_account_login"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_top"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingTop="@dimen/dp_16"
|
||||
android:text="@string/account_login"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_login_type"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_code_login"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_login_type" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_code_login"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="65dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingTop="@dimen/dp_16"
|
||||
android:text="@string/code_login"
|
||||
android:textColor="@color/color_6D6B89"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_login_type"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_account_login"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_login_type" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/view_bg_bottom"
|
||||
android:id="@+id/ll_account_login"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_white_top_25dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_top">
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_login_type">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="63dp"
|
||||
android:layout_marginStart="33dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_36"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:baselineAligned="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:text="@string/layout_activity_login_password_02"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="33dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:background="@null"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/please_input_piko_account"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="123456" />
|
||||
android:textColorHint="@color/color_B3B3C3"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="63dp"
|
||||
android:layout_marginStart="33dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_36"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:baselineAligned="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:text="@string/layout_activity_login_password_03"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="33dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:background="@null"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/hint_login_password_2"
|
||||
android:inputType="textPassword"
|
||||
android:maxLength="16"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textColorHint="@color/color_B3B3C3"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_forget_password"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginEnd="52dp"
|
||||
android:text="@string/layout_activity_login_password_04"
|
||||
android:textColor="#B3B3C3"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
android:textColor="@color/color_B3B3C3"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="165dp"
|
||||
android:layout_height="63dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/ic_login_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_marginEnd="@dimen/dp_36"
|
||||
android:background="@drawable/bg_common_enabled"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white" />
|
||||
android:text="@string/text_login"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_sms_login"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_login_type">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_36"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_areaCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_22"
|
||||
android:text="+852"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:drawableEndCompat="@drawable/ic_down_arrow" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_Account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:digits="0123456789"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/hint_register_input_phone_number"
|
||||
android:inputType="number"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textColorHint="@color/color_B3B3C3"
|
||||
android:textSize="@dimen/dp_14"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_36"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_Code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/please_get_code"
|
||||
android:inputType="number"
|
||||
android:paddingStart="@dimen/dp_24"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textColorHint="@color/color_B3B3C3"
|
||||
android:textSize="@dimen/dp_14"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_regain"
|
||||
android:layout_width="102dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:text="@string/text_request_code"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:corner="@dimen/dp_20"
|
||||
app:solid="@color/color_9168FA"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_sms_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginTop="48dp"
|
||||
android:layout_marginEnd="@dimen/dp_36"
|
||||
android:background="@drawable/bg_common_enabled"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:text="@string/text_login"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -5100,9 +5100,14 @@
|
||||
<string name="Member_income">成員收入</string>
|
||||
<string name="Senior_management_setup">高管設置</string>
|
||||
<string name="contract_statement">簽約流水</string>
|
||||
<string name="Welcome_to_piko">Welcome to Piko!</string>
|
||||
|
||||
<string name="facebook_app_id">1266232494209868</string>
|
||||
<string name="fb_login_protocol_scheme">fb1266232494209868</string>
|
||||
<string name="facebook_client_token">189d1a90712cc61cedded4cf1372cb21</string>
|
||||
<string name="account_login">賬號登錄</string>
|
||||
<string name="code_login">短信登錄</string>
|
||||
<string name="please_input_piko_account">請輸入Piko賬號</string>
|
||||
<string name="please_get_code">請獲取驗證碼</string>
|
||||
|
||||
</resources>
|