登录页部分UI
This commit is contained in:
@@ -126,6 +126,7 @@ android {
|
|||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
// buildConfigField "String", "BASE_URL", "\"https://www.erbanyy.com/\""
|
// buildConfigField "String", "BASE_URL", "\"https://www.erbanyy.com/\""
|
||||||
|
|
||||||
buildConfigField "String", "BASE_URL", "\"https://api.qxjiaoyou.com/\""
|
buildConfigField "String", "BASE_URL", "\"https://api.qxjiaoyou.com/\""
|
||||||
buildConfigField "String", "BASE_URL_DEBUG", "BASE_URL"
|
buildConfigField "String", "BASE_URL_DEBUG", "BASE_URL"
|
||||||
buildConfigField "String", "BASE_URL_STAGING", "BASE_URL"
|
buildConfigField "String", "BASE_URL_STAGING", "BASE_URL"
|
||||||
@@ -282,6 +283,7 @@ dependencies {
|
|||||||
implementation(name: 'Ui-factory_oauth_mobile_3.8.3.1', ext: 'aar')
|
implementation(name: 'Ui-factory_oauth_mobile_3.8.3.1', ext: 'aar')
|
||||||
implementation(name: 'CTAccount_sdk_api_v3.7.0_all', ext: 'aar')
|
implementation(name: 'CTAccount_sdk_api_v3.7.0_all', ext: 'aar')
|
||||||
|
|
||||||
|
implementation 'com.github.fodroid:XRadioGroup:v1.5'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@@ -440,7 +440,7 @@
|
|||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.login.LoginVertificationActivity"
|
android:name=".ui.login.LoginCodeActivity"
|
||||||
android:label="输入验证码界面"
|
android:label="输入验证码界面"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
@@ -52,6 +52,8 @@ import com.yizhuan.erban.ui.login.AddUserInfoActivity;
|
|||||||
import com.yizhuan.erban.ui.login.ErbanQQMemberBindAndLoginActivity;
|
import com.yizhuan.erban.ui.login.ErbanQQMemberBindAndLoginActivity;
|
||||||
import com.yizhuan.erban.ui.login.ForgetPswActivity;
|
import com.yizhuan.erban.ui.login.ForgetPswActivity;
|
||||||
import com.yizhuan.erban.ui.login.LoginActivity;
|
import com.yizhuan.erban.ui.login.LoginActivity;
|
||||||
|
import com.yizhuan.erban.ui.login.LoginCodeActivity;
|
||||||
|
import com.yizhuan.erban.ui.login.LoginPhoneActivity;
|
||||||
import com.yizhuan.erban.ui.login.RegisterActivity;
|
import com.yizhuan.erban.ui.login.RegisterActivity;
|
||||||
import com.yizhuan.erban.ui.pay.ChargeActivity;
|
import com.yizhuan.erban.ui.pay.ChargeActivity;
|
||||||
import com.yizhuan.erban.ui.widget.DefaultToolBar;
|
import com.yizhuan.erban.ui.widget.DefaultToolBar;
|
||||||
@@ -1061,6 +1063,8 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
|||||||
private boolean isNeedToHandleBroadcastMessageActivity() {
|
private boolean isNeedToHandleBroadcastMessageActivity() {
|
||||||
List<Class> acts = new ArrayList<>();
|
List<Class> acts = new ArrayList<>();
|
||||||
acts.add(LoginActivity.class);
|
acts.add(LoginActivity.class);
|
||||||
|
acts.add(LoginPhoneActivity.class);
|
||||||
|
acts.add(LoginCodeActivity.class);
|
||||||
acts.add(ForgetPswActivity.class);
|
acts.add(ForgetPswActivity.class);
|
||||||
acts.add(RegisterActivity.class);
|
acts.add(RegisterActivity.class);
|
||||||
acts.add(AddUserInfoActivity.class);
|
acts.add(AddUserInfoActivity.class);
|
||||||
|
@@ -27,6 +27,7 @@ public class AddUserInfoActivity extends BaseActivity {
|
|||||||
|
|
||||||
addUserInfoFragment = new AddUserInfoFragment();
|
addUserInfoFragment = new AddUserInfoFragment();
|
||||||
showAddUserInfo();
|
showAddUserInfo();
|
||||||
|
initTitleBar("",true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showAddUserInfo() {
|
public void showAddUserInfo() {
|
||||||
|
@@ -0,0 +1,53 @@
|
|||||||
|
package com.yizhuan.erban.ui.login;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.CountDownTimer;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.text.Spannable;
|
||||||
|
import android.text.SpannableString;
|
||||||
|
import android.text.style.ForegroundColorSpan;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.yizhuan.erban.R;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by zhouxiangfeng on 2017/5/2.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class CodeDownDescTimer extends CountDownTimer {
|
||||||
|
private TextView mTvSecond;
|
||||||
|
private TextView mTvDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tv_second 秒数
|
||||||
|
* @param tv_desc 秒数后面的字
|
||||||
|
* @param millisInFuture The number of millis in the future from the call
|
||||||
|
* to {@link #start()} until the countdown is done and {@link #onFinish()}
|
||||||
|
* is called.
|
||||||
|
* @param countDownInterval The interval along the way to receiver
|
||||||
|
* {@link #onTick(long)} callbacks.
|
||||||
|
*/
|
||||||
|
public CodeDownDescTimer(TextView tv_second, TextView tv_desc, long millisInFuture, long countDownInterval) {
|
||||||
|
super(millisInFuture, countDownInterval);
|
||||||
|
this.mTvSecond = tv_second;
|
||||||
|
this.mTvDesc = tv_desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTick(long millisUntilFinished) {
|
||||||
|
mTvSecond.setVisibility(View.VISIBLE);
|
||||||
|
mTvSecond.setText(millisUntilFinished / 1000 + ""); //设置倒计时时间
|
||||||
|
mTvDesc.setClickable(false); //设置不可点击
|
||||||
|
mTvDesc.setText(Html.fromHtml("<font color=#F770FF font-size=10dp>s </font>" + "后可重新获取验证码"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFinish() {
|
||||||
|
mTvSecond.setVisibility(View.GONE);
|
||||||
|
mTvDesc.setText(Html.fromHtml("<font color=#F770FF font-size=11dp>重新获取验证码</font>"));
|
||||||
|
mTvDesc.setClickable(true);//重新获得点击
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,306 @@
|
|||||||
|
package com.yizhuan.erban.ui.login;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.text.Spannable;
|
||||||
|
import android.text.SpannableString;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.text.style.ForegroundColorSpan;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.coorchice.library.utils.LogUtils;
|
||||||
|
import com.ishumei.smantifraud.SmAntiFraud;
|
||||||
|
import com.netease.mobsec.rjsb.watchman;
|
||||||
|
import com.orhanobut.logger.Logger;
|
||||||
|
import com.trello.rxlifecycle2.android.ActivityEvent;
|
||||||
|
import com.yizhuan.erban.R;
|
||||||
|
import com.yizhuan.erban.base.BaseActivity;
|
||||||
|
import com.yizhuan.erban.base.BaseLoginAct;
|
||||||
|
import com.yizhuan.erban.ui.login.ui.CodeEditText;
|
||||||
|
import com.yizhuan.erban.utils.KeyBoardUtils;
|
||||||
|
import com.yizhuan.xchat_android_constants.XChatConstants;
|
||||||
|
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||||
|
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
|
||||||
|
import com.yizhuan.xchat_android_core.auth.exception.BanAccountException;
|
||||||
|
import com.yizhuan.xchat_android_core.auth.exception.IsSuperAdminException;
|
||||||
|
import com.yizhuan.xchat_android_core.auth.exception.ShowPhoneCodeException;
|
||||||
|
import com.yizhuan.xchat_android_core.code.CodeModel;
|
||||||
|
import com.yizhuan.xchat_android_core.code.CodeType;
|
||||||
|
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||||
|
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||||
|
import com.yizhuan.xchat_android_library.utils.DeviceUuidFactory;
|
||||||
|
import com.yizhuan.xchat_android_library.utils.LogUtil;
|
||||||
|
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import io.reactivex.SingleObserver;
|
||||||
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
|
import io.reactivex.disposables.Disposable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhouxiangfeng
|
||||||
|
* @date 17/2/26
|
||||||
|
*/
|
||||||
|
public class LoginCodeActivity extends BaseLoginAct {
|
||||||
|
|
||||||
|
private static final String TAG = "LoginVertificationActivity";
|
||||||
|
|
||||||
|
private com.yizhuan.erban.ui.login.ui.CodeEditText codeEt;
|
||||||
|
private TextView tvGetCode,tvDesc,tvSecond;
|
||||||
|
private String mPhone;
|
||||||
|
private boolean isSuperAdmin = false;
|
||||||
|
private CodeDownDescTimer timer;
|
||||||
|
|
||||||
|
public static void start(Context context,String phone) {
|
||||||
|
Intent intent = new Intent(context, LoginCodeActivity.class);
|
||||||
|
intent.putExtra("phone",phone);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void startForResult(Activity context, int requestCode) {
|
||||||
|
Intent intent = new Intent(context, LoginCodeActivity.class);
|
||||||
|
context.startActivityForResult(intent, requestCode); // startActivityForResult会导致singletop,singletask失效
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_login_code);
|
||||||
|
EventBus.getDefault().register(this);
|
||||||
|
initTitleBar("",true);
|
||||||
|
onFindViews();
|
||||||
|
initData();
|
||||||
|
onSetListener();
|
||||||
|
getSmsCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
private void initData() {
|
||||||
|
mPhone = getIntent().getStringExtra("phone");
|
||||||
|
tvDesc.setText(getString(R.string.str_send_code_success)+mPhone);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setStatusBar() {
|
||||||
|
StatusBarLightModes(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onFindViews() {
|
||||||
|
codeEt = findViewById(R.id.et_code);
|
||||||
|
tvGetCode = findViewById(R.id.tv_get_code);
|
||||||
|
tvDesc = findViewById(R.id.tv_desc);
|
||||||
|
tvSecond = findViewById(R.id.tv_second);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onSetListener() {
|
||||||
|
codeEt.setOnTextFinishListener(new CodeEditText.OnTextFinishListener() {
|
||||||
|
@Override
|
||||||
|
public void onTextFinish(CharSequence text, int length) {
|
||||||
|
// login();
|
||||||
|
// LogUtils.e(text.toString());
|
||||||
|
Intent intent = new Intent(LoginCodeActivity.this,AddUserInfoActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean needSteepStateBar() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
codeEt = null;
|
||||||
|
super.onDestroy();
|
||||||
|
stopCountDownTimer();
|
||||||
|
EventBus.getDefault().unregister(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTouchEvent(MotionEvent event) {
|
||||||
|
View view = getCurrentFocus();
|
||||||
|
boolean isPressEdit = false;
|
||||||
|
if (view instanceof EditText) {
|
||||||
|
if (event.getRawX() >= view.getX() && event.getRawX() <= view.getX() + view.getWidth() && event.getRawY() >= view.getY() && event.getRawY() <= view.getY() + view.getHeight()) {
|
||||||
|
isPressEdit = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isPressEdit) {
|
||||||
|
hideIME();
|
||||||
|
}
|
||||||
|
return super.onTouchEvent(event);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取验证码
|
||||||
|
*/
|
||||||
|
@SuppressLint("CheckResult")
|
||||||
|
private void getSmsCode() {
|
||||||
|
String deviceId = DeviceUuidFactory.getDeviceId(this);
|
||||||
|
if (isSuperAdmin) {
|
||||||
|
CodeModel.get()
|
||||||
|
.sendCode(mPhone, CodeType.SUPER_ADMIN)
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||||
|
.subscribe(new SingleObserver<String>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String s) {
|
||||||
|
startCountDownTimer();
|
||||||
|
toast(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Throwable e) {
|
||||||
|
toast(e.getMessage());
|
||||||
|
Logger.e(TAG, "获取短信失败!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
AuthModel.get()
|
||||||
|
.sendLoginCode(mPhone, deviceId)
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||||
|
.subscribe(new SingleObserver<String>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String s) {
|
||||||
|
startCountDownTimer();
|
||||||
|
toast(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Throwable e) {
|
||||||
|
toast(e.getMessage());
|
||||||
|
Logger.e(TAG, "获取短信失败!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void login(){
|
||||||
|
String smsCode = codeEt.getText().toString();
|
||||||
|
getDialogManager().showProgressDialog(this, "正在登录...");
|
||||||
|
// 易盾保护 token 登录
|
||||||
|
String yiDunLoginToken = watchman.getToken(XChatConstants.YI_DUN_LOGIN_BUSINESS_ID);
|
||||||
|
// 数美天网 deviceId
|
||||||
|
String shuMeiDeviceId = SmAntiFraud.getDeviceId();
|
||||||
|
AuthModel.get().login(
|
||||||
|
mPhone,
|
||||||
|
smsCode,
|
||||||
|
yiDunLoginToken,
|
||||||
|
shuMeiDeviceId)
|
||||||
|
.subscribe(new SingleObserver<String>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(Disposable d) {
|
||||||
|
mCompositeDisposable.add(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String s) {
|
||||||
|
getDialogManager().dismissDialog();
|
||||||
|
stopCountDownTimer();
|
||||||
|
setResult(RESULT_OK);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Throwable e) {
|
||||||
|
getDialogManager().dismissDialog();
|
||||||
|
dealWithLoginError(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
StatisticManager.Instance().onEvent(this,
|
||||||
|
StatisticsProtocol.Event.EVENT_LOGIN_PHONE_CLICK, "点击手机号登录", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dealWithLoginError(Throwable e) {
|
||||||
|
if (!(e instanceof IsSuperAdminException)) {
|
||||||
|
String msg = e.getMessage();
|
||||||
|
StringBuilder eventLabel = new StringBuilder("登录注册页-登录失败");
|
||||||
|
if (!TextUtils.isEmpty(msg)) {
|
||||||
|
eventLabel.append(msg);
|
||||||
|
}
|
||||||
|
// 2004可以完整写入
|
||||||
|
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_LOGIN_FAILED_CLICK, eventLabel.toString());
|
||||||
|
}
|
||||||
|
if (e instanceof BanAccountException) {
|
||||||
|
isSuperAdmin = false;
|
||||||
|
BanAccountException exception = (BanAccountException) e;
|
||||||
|
String text = "您的账号因" + exception.getMessage() + "被封禁\n解封时间:";
|
||||||
|
int start = text.length();
|
||||||
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日", Locale.getDefault());
|
||||||
|
text += simpleDateFormat.format(new Date(exception.getDate()));
|
||||||
|
SpannableString spannableString = new SpannableString(text);
|
||||||
|
spannableString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(LoginCodeActivity.this, R.color.appColor)),
|
||||||
|
start, text.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||||
|
getDialogManager().showOkCancelWithTitleDialog("您被封号了",
|
||||||
|
spannableString, "确定", "取消", null);
|
||||||
|
} else if (e instanceof ShowPhoneCodeException) {
|
||||||
|
isSuperAdmin = false;
|
||||||
|
ShowPhoneCodeException showPhoneCodeException = (ShowPhoneCodeException) e;
|
||||||
|
toast(e.getMessage());
|
||||||
|
} else {
|
||||||
|
isSuperAdmin = false;
|
||||||
|
toast(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startCountDownTimer() {
|
||||||
|
stopCountDownTimer();
|
||||||
|
timer = new CodeDownDescTimer(tvSecond, tvGetCode,60000, 1000);
|
||||||
|
timer.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void stopCountDownTimer() {
|
||||||
|
if (timer != null) {
|
||||||
|
timer.cancel();
|
||||||
|
timer = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册成功后发送过来的事件
|
||||||
|
*/
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void onLoginEvent(LoginEvent event) {
|
||||||
|
getDialogManager().dismissDialog();
|
||||||
|
setResult(RESULT_OK);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
@@ -88,7 +88,7 @@ public class LoginPhoneActivity extends BaseActivity implements View.OnClickList
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_login_phone);
|
setContentView(R.layout.activity_login_phone);
|
||||||
initTitleBar("");
|
initTitleBar("",true);
|
||||||
onFindViews();
|
onFindViews();
|
||||||
onSetListener();
|
onSetListener();
|
||||||
// permission();
|
// permission();
|
||||||
@@ -129,7 +129,7 @@ public class LoginPhoneActivity extends BaseActivity implements View.OnClickList
|
|||||||
toast(accountValidator.getErrorMessage());
|
toast(accountValidator.getErrorMessage());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LoginVertificationActivity.start(LoginPhoneActivity.this,accountEt.getText().toString());
|
LoginCodeActivity.start(LoginPhoneActivity.this,accountEt.getText().toString());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@@ -1,115 +0,0 @@
|
|||||||
package com.yizhuan.erban.ui.login;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.text.Editable;
|
|
||||||
import android.text.Html;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.text.TextWatcher;
|
|
||||||
import android.view.MotionEvent;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.yizhuan.erban.R;
|
|
||||||
import com.yizhuan.erban.base.BaseActivity;
|
|
||||||
import com.yizhuan.erban.ui.login.ui.CodeEditText;
|
|
||||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhouxiangfeng
|
|
||||||
* @date 17/2/26
|
|
||||||
*/
|
|
||||||
public class LoginVertificationActivity extends BaseActivity {
|
|
||||||
|
|
||||||
private static final String TAG = "LoginVertificationActivity";
|
|
||||||
|
|
||||||
private com.yizhuan.erban.ui.login.ui.CodeEditText codeEt;
|
|
||||||
private TextView tvGetCode,tvDesc,tvSecond;
|
|
||||||
private String mPhone;
|
|
||||||
|
|
||||||
public static void start(Context context,String phone) {
|
|
||||||
Intent intent = new Intent(context, LoginVertificationActivity.class);
|
|
||||||
intent.putExtra("phone",phone);
|
|
||||||
context.startActivity(intent);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void startForResult(Activity context, int requestCode) {
|
|
||||||
Intent intent = new Intent(context, LoginVertificationActivity.class);
|
|
||||||
context.startActivityForResult(intent, requestCode); // startActivityForResult会导致singletop,singletask失效
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_login_vertification);
|
|
||||||
initTitleBar("");
|
|
||||||
onFindViews();
|
|
||||||
initData();
|
|
||||||
onSetListener();
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
|
||||||
private void initData() {
|
|
||||||
mPhone = getIntent().getStringExtra("phone");
|
|
||||||
tvDesc.setText(getString(R.string.str_send_code_success)+mPhone);
|
|
||||||
|
|
||||||
|
|
||||||
tvSecond.setText("60");
|
|
||||||
tvGetCode.setText(Html.fromHtml("<font color=#F770FF font-size=10dp>s </font>" + "后可重新获取验证码"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void setStatusBar() {
|
|
||||||
StatusBarLightModes(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onFindViews() {
|
|
||||||
codeEt = findViewById(R.id.et_code);
|
|
||||||
tvGetCode = findViewById(R.id.tv_get_code);
|
|
||||||
tvDesc = findViewById(R.id.tv_desc);
|
|
||||||
tvSecond = findViewById(R.id.tv_second);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onSetListener() {
|
|
||||||
codeEt.setOnTextFinishListener(new CodeEditText.OnTextFinishListener() {
|
|
||||||
@Override
|
|
||||||
public void onTextFinish(CharSequence text, int length) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean needSteepStateBar() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
codeEt = null;
|
|
||||||
super.onDestroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onTouchEvent(MotionEvent event) {
|
|
||||||
View view = getCurrentFocus();
|
|
||||||
boolean isPressEdit = false;
|
|
||||||
if (view instanceof EditText) {
|
|
||||||
if (event.getRawX() >= view.getX() && event.getRawX() <= view.getX() + view.getWidth() && event.getRawY() >= view.getY() && event.getRawY() <= view.getY() + view.getHeight()) {
|
|
||||||
isPressEdit = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!isPressEdit) {
|
|
||||||
hideIME();
|
|
||||||
}
|
|
||||||
return super.onTouchEvent(event);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@@ -11,8 +11,11 @@ import android.view.View;
|
|||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.coorchice.library.utils.LogUtils;
|
||||||
import com.fourmob.datetimepicker.date.DatePickerDialog;
|
import com.fourmob.datetimepicker.date.DatePickerDialog;
|
||||||
import com.jph.takephoto.model.TResult;
|
import com.jph.takephoto.model.TResult;
|
||||||
import com.netease.nim.uikit.common.util.string.StringUtil;
|
import com.netease.nim.uikit.common.util.string.StringUtil;
|
||||||
@@ -52,6 +55,7 @@ import java.util.Map;
|
|||||||
import io.reactivex.SingleObserver;
|
import io.reactivex.SingleObserver;
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
import io.reactivex.functions.Consumer;
|
import io.reactivex.functions.Consumer;
|
||||||
|
import me.shihao.library.XRadioGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jack
|
* @author jack
|
||||||
@@ -67,7 +71,7 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
private CircleImageView civAvatar;
|
private CircleImageView civAvatar;
|
||||||
private TextInputEditText tvNick;
|
private TextInputEditText tvNick;
|
||||||
private TextInputEditText tvGender;
|
private TextInputEditText tvGender;
|
||||||
private TextInputEditText tvBirthday;
|
// private TextInputEditText tvBirthday;
|
||||||
private Button okBtn;
|
private Button okBtn;
|
||||||
// private TextView tvGenderMen;
|
// private TextView tvGenderMen;
|
||||||
// private TextView tvGenderWomen;
|
// private TextView tvGenderWomen;
|
||||||
@@ -76,13 +80,16 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
|
|
||||||
private TextView tvRandomNick;
|
private TextView tvRandomNick;
|
||||||
|
|
||||||
private DatePickerDialog datePickerDialog;
|
// private DatePickerDialog datePickerDialog;
|
||||||
|
|
||||||
private String avatarUrl;
|
private String avatarUrl;
|
||||||
private String avatarUrlWX;
|
private String avatarUrlWX;
|
||||||
private File photoFile;
|
private File photoFile;
|
||||||
|
|
||||||
private int gender = -1;
|
private int gender = -1;
|
||||||
|
private XRadioGroup rgGender;
|
||||||
|
private RadioButton rbMale;
|
||||||
|
private RadioButton rbFemale;
|
||||||
|
|
||||||
AddUserInfoActivity addUserInfoActivity;
|
AddUserInfoActivity addUserInfoActivity;
|
||||||
|
|
||||||
@@ -103,13 +110,16 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
civAvatar = view.findViewById(R.id.civ_avatar);
|
civAvatar = view.findViewById(R.id.civ_avatar);
|
||||||
tvNick = view.findViewById(R.id.tv_nick);
|
tvNick = view.findViewById(R.id.tv_nick);
|
||||||
tvGender = view.findViewById(R.id.tv_gender);
|
tvGender = view.findViewById(R.id.tv_gender);
|
||||||
tvBirthday = view.findViewById(R.id.tv_birthday);
|
// tvBirthday = view.findViewById(R.id.tv_birthday);
|
||||||
okBtn = view.findViewById(R.id.ok_btn);
|
okBtn = view.findViewById(R.id.ok_btn);
|
||||||
// tvGenderMen = view.findViewById(R.id.tv_gender_men);
|
// tvGenderMen = view.findViewById(R.id.tv_gender_men);
|
||||||
// tvGenderWomen = view.findViewById(R.id.tv_gender_women);
|
// tvGenderWomen = view.findViewById(R.id.tv_gender_women);
|
||||||
ivRandomAvatar = view.findViewById(R.id.iv_random_avatar);
|
ivRandomAvatar = view.findViewById(R.id.iv_random_avatar);
|
||||||
tvRandomNick = view.findViewById(R.id.tv_random_nick);
|
tvRandomNick = view.findViewById(R.id.tv_random_nick);
|
||||||
ivRandomAvatar.setVisibility(View.GONE);
|
ivRandomAvatar.setVisibility(View.GONE);
|
||||||
|
rgGender = view.findViewById(R.id.rg_gender);
|
||||||
|
rbMale = view.findViewById(R.id.rb_male);
|
||||||
|
rbFemale = view.findViewById(R.id.rb_female);
|
||||||
tvRandomNick.setVisibility(View.GONE);
|
tvRandomNick.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +128,7 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
gender = -1;
|
gender = -1;
|
||||||
civAvatar.setOnClickListener(this);
|
civAvatar.setOnClickListener(this);
|
||||||
tvGender.setOnClickListener(this);
|
tvGender.setOnClickListener(this);
|
||||||
tvBirthday.setOnClickListener(this);
|
// tvBirthday.setOnClickListener(this);
|
||||||
okBtn.setOnClickListener(this);
|
okBtn.setOnClickListener(this);
|
||||||
// tvGenderMen.setOnClickListener(this);
|
// tvGenderMen.setOnClickListener(this);
|
||||||
// tvGenderWomen.setOnClickListener(this);
|
// tvGenderWomen.setOnClickListener(this);
|
||||||
@@ -134,7 +144,7 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
if (thirdUserInfo != null) {
|
if (thirdUserInfo != null) {
|
||||||
avatarUrlWX = thirdUserInfo.getUserIcon();
|
avatarUrlWX = thirdUserInfo.getUserIcon();
|
||||||
if (thirdUserInfo.getBirth() > 0) {
|
if (thirdUserInfo.getBirth() > 0) {
|
||||||
tvBirthday.setText(TimeUtils.getDateTimeString(thirdUserInfo.getBirth(), "yyyy-MM-dd"));
|
// tvBirthday.setText(TimeUtils.getDateTimeString(thirdUserInfo.getBirth(), "yyyy-MM-dd"));
|
||||||
}
|
}
|
||||||
String nick = thirdUserInfo.getUserName();
|
String nick = thirdUserInfo.getUserName();
|
||||||
if (!StringUtil.isEmpty(nick)) {
|
if (!StringUtil.isEmpty(nick)) {
|
||||||
@@ -152,12 +162,12 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
tvNick.setFilters(new InputFilter[]{new InputFilter.LengthFilter(15)});
|
tvNick.setFilters(new InputFilter[]{new InputFilter.LengthFilter(15)});
|
||||||
Calendar calendar = Calendar.getInstance();
|
// Calendar calendar = Calendar.getInstance();
|
||||||
int year = calendar.get(Calendar.YEAR) - 18;
|
// int year = calendar.get(Calendar.YEAR) - 18;
|
||||||
datePickerDialog = DatePickerDialog.newInstance(this, year, 0, 1, true);
|
// datePickerDialog = DatePickerDialog.newInstance(this, year, 0, 1, true);
|
||||||
// 给一个默认的生日值
|
// 给一个默认的生日值
|
||||||
// 默认给够 18 岁
|
// 默认给够 18 岁
|
||||||
tvBirthday.setText(String.format(Locale.getDefault(), "%d-01-01", year));
|
// tvBirthday.setText(String.format(Locale.getDefault(), "%d-01-01", year));
|
||||||
// 设置默认昵称
|
// 设置默认昵称
|
||||||
tvNick.setText(R.string.text_default_nick);
|
tvNick.setText(R.string.text_default_nick);
|
||||||
|
|
||||||
@@ -172,6 +182,21 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.subscribe();
|
.subscribe();
|
||||||
|
|
||||||
|
rgGender.setOnCheckedChangeListener(new XRadioGroup.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(XRadioGroup radioGroup, int i) {
|
||||||
|
|
||||||
|
if (i == rbMale.getId()){
|
||||||
|
gender = UserInfo.GENDER_MALE;
|
||||||
|
}else {
|
||||||
|
gender = UserInfo.GENDER_FEMALE;
|
||||||
|
|
||||||
|
}
|
||||||
|
LogUtils.e(gender+"");
|
||||||
|
// LogUtils.e(i == rbMale.getId()?gender = UserInfo.GENDER_MALE:gender = UserInfo.GENDER_FEMALE);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -200,16 +225,16 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
getDialogManager().showCommonPopupDialog(genderList, "取消", false);
|
getDialogManager().showCommonPopupDialog(genderList, "取消", false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.tv_birthday:
|
// case R.id.tv_birthday:
|
||||||
if (datePickerDialog.isAdded()) {
|
// if (datePickerDialog.isAdded()) {
|
||||||
datePickerDialog.dismiss();
|
// datePickerDialog.dismiss();
|
||||||
} else {
|
// } else {
|
||||||
Calendar calendar = Calendar.getInstance();
|
// Calendar calendar = Calendar.getInstance();
|
||||||
datePickerDialog.setVibrate(true);
|
// datePickerDialog.setVibrate(true);
|
||||||
datePickerDialog.setYearRange(1945, calendar.get(Calendar.YEAR) - 18);
|
// datePickerDialog.setYearRange(1945, calendar.get(Calendar.YEAR) - 18);
|
||||||
datePickerDialog.show(getChildFragmentManager(), "DATEPICKER_TAG");
|
// datePickerDialog.show(getChildFragmentManager(), "DATEPICKER_TAG");
|
||||||
}
|
// }
|
||||||
break;
|
// break;
|
||||||
|
|
||||||
case R.id.ok_btn:
|
case R.id.ok_btn:
|
||||||
String nick = tvNick.getText().toString();
|
String nick = tvNick.getText().toString();
|
||||||
@@ -218,11 +243,11 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String birth = tvBirthday.getText().toString();
|
// String birth = tvBirthday.getText().toString();
|
||||||
if (TextUtils.isEmpty(birth)) {
|
// if (TextUtils.isEmpty(birth)) {
|
||||||
toast("生日不能为空!");
|
// toast("生日不能为空!");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (gender == -1) {
|
if (gender == -1) {
|
||||||
toast("必须要选性别哦");
|
toast("必须要选性别哦");
|
||||||
@@ -328,11 +353,11 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
|
|
||||||
private void commit() {
|
private void commit() {
|
||||||
String nick = tvNick.getText().toString();
|
String nick = tvNick.getText().toString();
|
||||||
String birth = tvBirthday.getText().toString();
|
// String birth = tvBirthday.getText().toString();
|
||||||
|
|
||||||
UserInfo userInfo = new UserInfo();
|
UserInfo userInfo = new UserInfo();
|
||||||
userInfo.setUid(AuthModel.get().getCurrentUid());
|
userInfo.setUid(AuthModel.get().getCurrentUid());
|
||||||
userInfo.setBirthStr(birth);
|
// userInfo.setBirthStr(birth);
|
||||||
userInfo.setNick(nick);
|
userInfo.setNick(nick);
|
||||||
userInfo.setAvatar(avatarUrl);
|
userInfo.setAvatar(avatarUrl);
|
||||||
|
|
||||||
@@ -401,7 +426,7 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
} else {
|
} else {
|
||||||
daystr = String.valueOf(day);
|
daystr = String.valueOf(day);
|
||||||
}
|
}
|
||||||
tvBirthday.setText(String.valueOf(year) + "-" + monthstr + "-" + daystr);
|
// tvBirthday.setText(String.valueOf(year) + "-" + monthstr + "-" + daystr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -0,0 +1,443 @@
|
|||||||
|
package com.yizhuan.erban.ui.login.fragment;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.design.widget.TextInputEditText;
|
||||||
|
import android.text.InputFilter;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.fourmob.datetimepicker.date.DatePickerDialog;
|
||||||
|
import com.jph.takephoto.model.TResult;
|
||||||
|
import com.netease.nim.uikit.common.util.string.StringUtil;
|
||||||
|
import com.sleepbot.datetimepicker.time.RadialPickerLayout;
|
||||||
|
import com.sleepbot.datetimepicker.time.TimePickerDialog;
|
||||||
|
import com.trello.rxlifecycle2.android.FragmentEvent;
|
||||||
|
import com.yizhuan.erban.ErbanTakePhotoActivity;
|
||||||
|
import com.yizhuan.erban.R;
|
||||||
|
import com.yizhuan.erban.base.BaseFragment;
|
||||||
|
import com.yizhuan.erban.common.widget.CircleImageView;
|
||||||
|
import com.yizhuan.erban.ui.login.AddUserInfoActivity;
|
||||||
|
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||||
|
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2;
|
||||||
|
import com.yizhuan.erban.ui.widget.ButtonItem;
|
||||||
|
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||||
|
import com.yizhuan.xchat_android_core.auth.entity.ThirdUserInfo;
|
||||||
|
import com.yizhuan.xchat_android_core.file.FileModel;
|
||||||
|
import com.yizhuan.xchat_android_core.linked.LinkedModel;
|
||||||
|
import com.yizhuan.xchat_android_core.linked.bean.LinkedInfo;
|
||||||
|
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||||
|
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||||
|
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||||
|
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||||
|
import com.yizhuan.xchat_android_core.utils.net.DontWarnObserver;
|
||||||
|
import com.yizhuan.xchat_android_library.utils.StringUtils;
|
||||||
|
import com.yizhuan.xchat_android_library.utils.TimeUtils;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import io.reactivex.SingleObserver;
|
||||||
|
import io.reactivex.disposables.Disposable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author jack
|
||||||
|
* @Description
|
||||||
|
* @Date 2018/11/23
|
||||||
|
*/
|
||||||
|
public class AddUserInfoOldFragment extends BaseFragment
|
||||||
|
implements View.OnClickListener, DatePickerDialog.OnDateSetListener,
|
||||||
|
TimePickerDialog.OnTimeSetListener, ErbanTakePhotoActivity.TakePhotoCallBack {
|
||||||
|
|
||||||
|
private static final String TAG = "AddUserInfoFragment";
|
||||||
|
|
||||||
|
private CircleImageView civAvatar;
|
||||||
|
private TextInputEditText tvNick;
|
||||||
|
private TextInputEditText tvGender;
|
||||||
|
private TextInputEditText tvBirthday;
|
||||||
|
private Button okBtn;
|
||||||
|
// private TextView tvGenderMen;
|
||||||
|
// private TextView tvGenderWomen;
|
||||||
|
|
||||||
|
private ImageView ivRandomAvatar;
|
||||||
|
|
||||||
|
private TextView tvRandomNick;
|
||||||
|
|
||||||
|
private DatePickerDialog datePickerDialog;
|
||||||
|
|
||||||
|
private String avatarUrl;
|
||||||
|
private String avatarUrlWX;
|
||||||
|
private File photoFile;
|
||||||
|
|
||||||
|
private int gender = -1;
|
||||||
|
|
||||||
|
AddUserInfoActivity addUserInfoActivity;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttach(Activity activity) {
|
||||||
|
super.onAttach(activity);
|
||||||
|
addUserInfoActivity = (AddUserInfoActivity) activity;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRootLayoutId() {
|
||||||
|
return R.layout.fragment_add_user_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
civAvatar = view.findViewById(R.id.civ_avatar);
|
||||||
|
tvNick = view.findViewById(R.id.tv_nick);
|
||||||
|
tvGender = view.findViewById(R.id.tv_gender);
|
||||||
|
tvBirthday = view.findViewById(R.id.tv_birthday);
|
||||||
|
okBtn = view.findViewById(R.id.ok_btn);
|
||||||
|
// tvGenderMen = view.findViewById(R.id.tv_gender_men);
|
||||||
|
// tvGenderWomen = view.findViewById(R.id.tv_gender_women);
|
||||||
|
ivRandomAvatar = view.findViewById(R.id.iv_random_avatar);
|
||||||
|
tvRandomNick = view.findViewById(R.id.tv_random_nick);
|
||||||
|
ivRandomAvatar.setVisibility(View.GONE);
|
||||||
|
tvRandomNick.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initiate() {
|
||||||
|
gender = -1;
|
||||||
|
civAvatar.setOnClickListener(this);
|
||||||
|
tvGender.setOnClickListener(this);
|
||||||
|
tvBirthday.setOnClickListener(this);
|
||||||
|
okBtn.setOnClickListener(this);
|
||||||
|
// tvGenderMen.setOnClickListener(this);
|
||||||
|
// tvGenderWomen.setOnClickListener(this);
|
||||||
|
ivRandomAvatar.setOnClickListener(this);
|
||||||
|
tvRandomNick.setOnClickListener(this);
|
||||||
|
init();
|
||||||
|
addWXUserInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void addWXUserInfo() {
|
||||||
|
ThirdUserInfo thirdUserInfo = AuthModel.get().getThirdUserInfo();
|
||||||
|
if (thirdUserInfo != null) {
|
||||||
|
avatarUrlWX = thirdUserInfo.getUserIcon();
|
||||||
|
if (thirdUserInfo.getBirth() > 0) {
|
||||||
|
tvBirthday.setText(TimeUtils.getDateTimeString(thirdUserInfo.getBirth(), "yyyy-MM-dd"));
|
||||||
|
}
|
||||||
|
String nick = thirdUserInfo.getUserName();
|
||||||
|
if (!StringUtil.isEmpty(nick)) {
|
||||||
|
if (nick.length() > 15) {
|
||||||
|
tvNick.setText(nick.substring(0, 15));
|
||||||
|
} else {
|
||||||
|
tvNick.setText(nick);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!TextUtils.isEmpty(avatarUrlWX)) {
|
||||||
|
ImageLoadUtils.loadAvatar(getContext(), avatarUrlWX, civAvatar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
tvNick.setFilters(new InputFilter[]{new InputFilter.LengthFilter(15)});
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
int year = calendar.get(Calendar.YEAR) - 18;
|
||||||
|
datePickerDialog = DatePickerDialog.newInstance(this, year, 0, 1, true);
|
||||||
|
// 给一个默认的生日值
|
||||||
|
// 默认给够 18 岁
|
||||||
|
tvBirthday.setText(String.format(Locale.getDefault(), "%d-01-01", year));
|
||||||
|
// 设置默认昵称
|
||||||
|
tvNick.setText(R.string.text_default_nick);
|
||||||
|
|
||||||
|
UserModel.get().getRandomConfig()
|
||||||
|
.compose(bindUntilEvent(FragmentEvent.DESTROY_VIEW))
|
||||||
|
.doOnSuccess(userRandomConfig -> {
|
||||||
|
if (userRandomConfig.isAvatar()) {
|
||||||
|
ivRandomAvatar.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
if (userRandomConfig.isNick()) {
|
||||||
|
tvRandomNick.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.subscribe();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
switch (v.getId()) {
|
||||||
|
case R.id.tv_gender:
|
||||||
|
ButtonItem maleItem = new ButtonItem("男", new ButtonItem.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick() {
|
||||||
|
gender = UserInfo.GENDER_MALE;
|
||||||
|
tvGender.setText("男");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
ButtonItem femaleItem = new ButtonItem("女", new ButtonItem.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick() {
|
||||||
|
gender = UserInfo.GENDER_FEMALE;
|
||||||
|
tvGender.setText("女");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
List<ButtonItem> genderList = new ArrayList<>();
|
||||||
|
genderList.add(maleItem);
|
||||||
|
genderList.add(femaleItem);
|
||||||
|
getDialogManager().showCommonPopupDialog(genderList, "取消", false);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case R.id.tv_birthday:
|
||||||
|
if (datePickerDialog.isAdded()) {
|
||||||
|
datePickerDialog.dismiss();
|
||||||
|
} else {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
datePickerDialog.setVibrate(true);
|
||||||
|
datePickerDialog.setYearRange(1945, calendar.get(Calendar.YEAR) - 18);
|
||||||
|
datePickerDialog.show(getChildFragmentManager(), "DATEPICKER_TAG");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case R.id.ok_btn:
|
||||||
|
String nick = tvNick.getText().toString();
|
||||||
|
if (TextUtils.isEmpty(nick)) {
|
||||||
|
toast("昵称不能为空!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String birth = tvBirthday.getText().toString();
|
||||||
|
if (TextUtils.isEmpty(birth)) {
|
||||||
|
toast("生日不能为空!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gender == -1) {
|
||||||
|
toast("必须要选性别哦");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (photoFile != null) {
|
||||||
|
getDialogManager().showProgressDialog(getContext(), "正在上传请稍后...");
|
||||||
|
FileModel.get()
|
||||||
|
.uploadFile(photoFile.getAbsolutePath())
|
||||||
|
.compose(bindToLifecycle())
|
||||||
|
.subscribe((url, throwable) -> {
|
||||||
|
if (throwable != null) {
|
||||||
|
onUploadFail();
|
||||||
|
} else {
|
||||||
|
onUpload(url);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//用户如果自己拍照作为头像就上传,如果为空就代表没拍照,直接拿微信头像上传
|
||||||
|
// avatarUrl = avatarUrlWX;
|
||||||
|
if (avatarUrlWX != null) {
|
||||||
|
avatarUrl = avatarUrlWX;
|
||||||
|
}
|
||||||
|
if (StringUtils.isEmpty(avatarUrl)) {
|
||||||
|
avatarUrl = "https://img.erbanyy.com/qingxun_default_avatar.png";
|
||||||
|
}
|
||||||
|
commit();
|
||||||
|
break;
|
||||||
|
case R.id.civ_avatar:
|
||||||
|
ButtonItem upItem = new ButtonItem("拍照上传", new ButtonItem.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick() {
|
||||||
|
ErbanTakePhotoActivity.startToTakePhoto(getContext(), AddUserInfoOldFragment.this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
ButtonItem localItem = new ButtonItem("本地相册", new ButtonItem.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick() {
|
||||||
|
ErbanTakePhotoActivity.startToSelectPhoto(getContext(), AddUserInfoOldFragment.this);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
List<ButtonItem> buttonItemList = new ArrayList<>();
|
||||||
|
buttonItemList.add(upItem);
|
||||||
|
buttonItemList.add(localItem);
|
||||||
|
getDialogManager().showCommonPopupDialog(buttonItemList, "取消", false);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case R.id.iv_random_avatar:
|
||||||
|
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_INFORMATION_RANDOM_AVATAR,
|
||||||
|
"随机头像");
|
||||||
|
ivRandomAvatar.setEnabled(false);
|
||||||
|
UserModel.get().getRandomAvatar()
|
||||||
|
.compose(bindUntilEvent(FragmentEvent.DESTROY_VIEW))
|
||||||
|
.subscribe(new DontWarnObserver<String>() {
|
||||||
|
@Override
|
||||||
|
public void accept(String avatar, String error) {
|
||||||
|
super.accept(avatar, error);
|
||||||
|
ivRandomAvatar.setEnabled(true);
|
||||||
|
if (error != null) {
|
||||||
|
toast(error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!TextUtils.isEmpty(avatar)) {
|
||||||
|
avatarUrl = avatar;
|
||||||
|
ImageLoadUtilsV2.loadAvatar(civAvatar, avatar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
case R.id.tv_random_nick:
|
||||||
|
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_INFORMATION_RANDOM_NAME,
|
||||||
|
"随机昵称");
|
||||||
|
tvRandomNick.setEnabled(false);
|
||||||
|
UserModel.get().getRandomNick()
|
||||||
|
.compose(bindUntilEvent(FragmentEvent.DESTROY_VIEW))
|
||||||
|
.subscribe(new DontWarnObserver<String>() {
|
||||||
|
@Override
|
||||||
|
public void accept(String nick, String error) {
|
||||||
|
super.accept(nick, error);
|
||||||
|
tvRandomNick.setEnabled(true);
|
||||||
|
if (error != null) {
|
||||||
|
toast(error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!TextUtils.isEmpty(nick)) {
|
||||||
|
tvNick.setText(nick);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void commit() {
|
||||||
|
String nick = tvNick.getText().toString();
|
||||||
|
String birth = tvBirthday.getText().toString();
|
||||||
|
|
||||||
|
UserInfo userInfo = new UserInfo();
|
||||||
|
userInfo.setUid(AuthModel.get().getCurrentUid());
|
||||||
|
userInfo.setBirthStr(birth);
|
||||||
|
userInfo.setNick(nick);
|
||||||
|
userInfo.setAvatar(avatarUrl);
|
||||||
|
|
||||||
|
if (gender == UserInfo.GENDER_MALE || gender == UserInfo.GENDER_FEMALE) {
|
||||||
|
userInfo.setGender(gender);
|
||||||
|
}else {
|
||||||
|
toast("必须要选性别哦");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
getDialogManager().showProgressDialog(getContext(), "请稍后...");
|
||||||
|
LinkedInfo linkedInfo = LinkedModel.get().getLinkedInfo();
|
||||||
|
|
||||||
|
String channel = "";
|
||||||
|
String roomUid = "";
|
||||||
|
String uid = "";
|
||||||
|
if (linkedInfo != null) {
|
||||||
|
channel = linkedInfo.getChannel();
|
||||||
|
roomUid = linkedInfo.getRoomUid();
|
||||||
|
uid = linkedInfo.getUid();
|
||||||
|
}
|
||||||
|
UserModel.get().requestCompleteUserInfo(userInfo, channel, uid, roomUid, null)
|
||||||
|
.compose(bindUntilEvent(FragmentEvent.DESTROY))
|
||||||
|
.subscribe(new SingleObserver<UserInfo>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(UserInfo userInfo) {
|
||||||
|
getDialogManager().dismissDialog();
|
||||||
|
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_COMPLETE,"注册完成(提交个人资料)");
|
||||||
|
AuthModel.get().setThirdUserInfo(null);
|
||||||
|
getActivity().finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Throwable e) {
|
||||||
|
getDialogManager().dismissDialog();
|
||||||
|
toast(e.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Map<String, String> attributes = new HashMap<>(4);
|
||||||
|
attributes.put("userUid", userInfo.getUid() + "");
|
||||||
|
attributes.put("shareChannel", channel);
|
||||||
|
attributes.put("shareUid", uid);
|
||||||
|
attributes.put("roomUid", roomUid);
|
||||||
|
StatisticManager.Instance().onEvent(getContext(),
|
||||||
|
StatisticsProtocol.Event.EVENT_LOGIN_REPARI_SUCCESS_CLICK, "补全", attributes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDateSet(DatePickerDialog datePickerDialog, int year, int month, int day) {
|
||||||
|
String monthstr;
|
||||||
|
if ((month + 1) < 10) {
|
||||||
|
monthstr = "0" + (month + 1);
|
||||||
|
} else {
|
||||||
|
monthstr = String.valueOf(month + 1);
|
||||||
|
}
|
||||||
|
String daystr;
|
||||||
|
if (day < 10) {
|
||||||
|
daystr = "0" + day;
|
||||||
|
} else {
|
||||||
|
daystr = String.valueOf(day);
|
||||||
|
}
|
||||||
|
tvBirthday.setText(String.valueOf(year) + "-" + monthstr + "-" + daystr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTimeSet(RadialPickerLayout view, int hourOfDay, int minute) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void onUpload(String url) {
|
||||||
|
Log.d(TAG, "onUpload: 这是添加用户更改上传");
|
||||||
|
avatarUrl = url;
|
||||||
|
getDialogManager().dismissDialog();
|
||||||
|
ImageLoadUtils.loadAvatar(getContext(), url, civAvatar);
|
||||||
|
commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onUploadFail() {
|
||||||
|
toast("上传失败");
|
||||||
|
getDialogManager().dismissDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void takeSuccess(TResult result) {
|
||||||
|
photoFile = new File(result.getImage().getCompressPath());
|
||||||
|
if (getContext() != null) {
|
||||||
|
ImageLoadUtils.loadImage(getContext(), photoFile, civAvatar, R.drawable.tutu_default_avatar_purple);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void takeFail(TResult result, String msg) {
|
||||||
|
toast(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void takeCancel() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
BIN
app/src/main/res/drawable-xhdpi/ic_female_normal.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_female_normal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_female_press.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_female_press.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_male_normal.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_male_normal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_male_press.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_male_press.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item android:state_checked="true" android:drawable="@drawable/ic_male_press"/>
|
||||||
|
<item android:state_checked="false" android:drawable="@drawable/ic_male_normal"/>
|
||||||
|
|
||||||
|
</selector>
|
@@ -2,8 +2,8 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/white"
|
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
|
android:background="@mipmap/bg_login"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5,32 +5,23 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
|
android:background="@mipmap/bg_login"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_label_add_user_info"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/text_complete_user_info"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:layout_marginTop="26dp"
|
|
||||||
android:layout_marginStart="26dp"
|
|
||||||
android:textSize="25dp"/>
|
|
||||||
|
|
||||||
<com.yizhuan.erban.common.widget.CircleImageView
|
<com.yizhuan.erban.common.widget.CircleImageView
|
||||||
android:id="@+id/civ_avatar"
|
android:id="@+id/civ_avatar"
|
||||||
android:layout_width="87dp"
|
android:layout_width="87dp"
|
||||||
android:layout_height="87dp"
|
android:layout_height="87dp"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="40dp"
|
android:layout_marginTop="110dp"
|
||||||
android:src="@drawable/tutu_default_avatar_purple"
|
android:src="@drawable/tutu_default_avatar_purple"
|
||||||
app:cborder_color="@color/transparent"
|
app:cborder_color="@color/transparent"
|
||||||
app:cborder_width="0dp"
|
app:cborder_width="0dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_label_add_user_info" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_random_avatar"
|
android:id="@+id/iv_random_avatar"
|
||||||
@@ -43,47 +34,64 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<android.support.design.widget.TextInputEditText
|
<LinearLayout
|
||||||
android:id="@+id/tv_nick"
|
android:id="@+id/ll_nick"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="26dp"
|
android:orientation="horizontal"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginStart="@dimen/login_btn_padding"
|
||||||
android:layout_marginEnd="26dp"
|
android:layout_marginEnd="@dimen/login_btn_padding"
|
||||||
android:paddingEnd="@dimen/dp_50"
|
android:layout_marginTop="@dimen/dp_30"
|
||||||
android:paddingStart="0dp"
|
android:background="@drawable/shape_trans_radius_10"
|
||||||
android:gravity="start|center_vertical"
|
|
||||||
android:hint="@string/hint_input_nick"
|
|
||||||
android:paddingBottom="15dp"
|
|
||||||
android:textColor="@color/color_1A1A1A"
|
|
||||||
android:textColorHint="@color/color_C7C7C7"
|
|
||||||
android:textSize="@dimen/dp_14"
|
|
||||||
android:theme="@style/common_edittext_style"
|
|
||||||
android:lines="1"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:text="@string/text_default_nick"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/civ_avatar"
|
app:layout_constraintTop_toBottomOf="@+id/civ_avatar"
|
||||||
tools:ignore="SpUsage" />
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
>
|
||||||
|
|
||||||
<com.coorchice.library.SuperTextView
|
<TextView
|
||||||
app:layout_constraintEnd_toEndOf="@id/tv_nick"
|
android:layout_width="wrap_content"
|
||||||
app:layout_constraintTop_toTopOf="@id/tv_nick"
|
android:layout_height="wrap_content"
|
||||||
android:text="随机"
|
android:textColor="@color/white"
|
||||||
android:gravity="center"
|
android:textSize="@dimen/sp_15"
|
||||||
android:paddingStart="@dimen/dp_9"
|
android:text="@string/str_nick_title"
|
||||||
android:paddingEnd="@dimen/dp_9"
|
/>
|
||||||
android:id="@+id/tv_random_nick"
|
|
||||||
android:textColor="@color/color_666666"
|
|
||||||
app:solid="@color/color_E6E6E6"
|
<android.support.design.widget.TextInputEditText
|
||||||
android:layout_marginTop="@dimen/dp_5"
|
android:id="@+id/tv_nick"
|
||||||
tools:visibility="visible"
|
android:layout_width="wrap_content"
|
||||||
android:visibility="gone"
|
android:layout_height="wrap_content"
|
||||||
app:corner="@dimen/dp_5"
|
android:paddingEnd="@dimen/dp_50"
|
||||||
android:textSize="@dimen/dp_11"
|
android:paddingStart="0dp"
|
||||||
android:layout_width="wrap_content"
|
android:gravity="start|center_vertical"
|
||||||
android:layout_height="@dimen/dp_20" />
|
android:hint="@string/hint_input_nick"
|
||||||
|
android:paddingTop="@dimen/dp_15"
|
||||||
|
android:paddingBottom="@dimen/dp_15"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/dp_14"
|
||||||
|
android:theme="@style/common_edittext_style"
|
||||||
|
android:lines="1"
|
||||||
|
android:background="@null"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/text_default_nick"
|
||||||
|
tools:ignore="SpUsage" />
|
||||||
|
|
||||||
|
<com.coorchice.library.SuperTextView
|
||||||
|
android:id="@+id/tv_random_nick"
|
||||||
|
android:text="随机"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="@dimen/dp_9"
|
||||||
|
android:paddingEnd="@dimen/dp_9"
|
||||||
|
android:textColor="@color/color_666666"
|
||||||
|
app:solid="@color/color_E6E6E6"
|
||||||
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:corner="@dimen/dp_5"
|
||||||
|
android:textSize="@dimen/dp_11"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_20" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<android.support.design.widget.TextInputEditText
|
<android.support.design.widget.TextInputEditText
|
||||||
android:id="@+id/tv_gender"
|
android:id="@+id/tv_gender"
|
||||||
@@ -99,6 +107,7 @@
|
|||||||
android:textSize="@dimen/dp_14"
|
android:textSize="@dimen/dp_14"
|
||||||
android:theme="@style/common_edittext_style"
|
android:theme="@style/common_edittext_style"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
|
android:visibility="gone"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:hint="请选择性别(选择后不可更改)"
|
android:hint="请选择性别(选择后不可更改)"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
@@ -106,55 +115,70 @@
|
|||||||
android:drawableEnd="@drawable/arrow_right"
|
android:drawableEnd="@drawable/arrow_right"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_nick"
|
app:layout_constraintTop_toBottomOf="@+id/ll_nick"
|
||||||
tools:ignore="SpUsage" />
|
tools:ignore="SpUsage" />
|
||||||
|
|
||||||
<android.support.design.widget.TextInputEditText
|
<me.shihao.library.XRadioGroup
|
||||||
android:id="@+id/tv_birthday"
|
android:id="@+id/rg_gender"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="26dp"
|
android:orientation="horizontal"
|
||||||
android:layout_marginTop="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_60"
|
||||||
android:layout_marginEnd="26dp"
|
android:layout_marginStart="@dimen/login_btn_padding"
|
||||||
android:gravity="start|center_vertical"
|
android:layout_marginEnd="@dimen/login_btn_padding"
|
||||||
android:inputType="number"
|
|
||||||
android:paddingBottom="15dp"
|
|
||||||
android:textColor="@color/color_1A1A1A"
|
|
||||||
android:textColorHint="@color/color_C7C7C7"
|
|
||||||
android:textSize="@dimen/dp_14"
|
|
||||||
android:theme="@style/common_edittext_style"
|
|
||||||
android:lines="1"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:hint="@string/hint_input_your_birthday"
|
|
||||||
android:focusable="false"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_gender"
|
app:layout_constraintTop_toBottomOf="@+id/ll_nick"
|
||||||
tools:ignore="SpUsage" />
|
tools:ignore="SpUsage"
|
||||||
|
>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_male"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:button="@null"
|
||||||
|
android:background="@drawable/selector_radiobutton_gender_male"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="end"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_female"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:button="@null"
|
||||||
|
android:background="@drawable/selector_radiobutton_gender_female"
|
||||||
|
/>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</me.shihao.library.XRadioGroup>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_warning"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/tips_can_not_register_below_18"
|
|
||||||
android:textColor="@color/text_tertiary"
|
|
||||||
android:layout_marginStart="26dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_birthday"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/ok_btn"
|
android:id="@+id/ok_btn"
|
||||||
android:layout_width="260dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="43dp"
|
android:layout_height="45dp"
|
||||||
android:layout_marginTop="@dimen/common_item_view_height"
|
android:layout_marginTop="@dimen/common_item_view_height"
|
||||||
android:layout_marginBottom="@dimen/dp_16"
|
android:layout_marginBottom="@dimen/dp_16"
|
||||||
android:background="@drawable/shape_semi_round_gray_solid"
|
android:layout_marginStart="@dimen/login_btn_padding"
|
||||||
android:text="@string/save"
|
android:layout_marginEnd="@dimen/login_btn_padding"
|
||||||
android:textColor="@color/color_333333"
|
android:background="@drawable/shape_trans_radius_10"
|
||||||
android:textSize="15dp"
|
android:text="@string/done"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_warning"
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_15"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/rg_gender"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:ignore="SpUsage" />
|
tools:ignore="SpUsage" />
|
||||||
|
@@ -210,5 +210,6 @@
|
|||||||
<dimen name="dp_setting_sys_notice_item_height">70.5dp</dimen>
|
<dimen name="dp_setting_sys_notice_item_height">70.5dp</dimen>
|
||||||
|
|
||||||
<dimen name="dp_height_setting_bind_info_item">50dp</dimen>
|
<dimen name="dp_height_setting_bind_info_item">50dp</dimen>
|
||||||
|
<dimen name="login_btn_padding">75dp</dimen>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -869,6 +869,7 @@
|
|||||||
<string name="collect_room">收藏房间</string>
|
<string name="collect_room">收藏房间</string>
|
||||||
<string name="ranking">榜单</string>
|
<string name="ranking">榜单</string>
|
||||||
<string name="str_send_code_success">验证码已发送至</string>
|
<string name="str_send_code_success">验证码已发送至</string>
|
||||||
|
<string name="str_nick_title">昵称:</string>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -76,6 +76,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/color_F770FF"
|
android:textColor="@color/color_F770FF"
|
||||||
|
android:visibility="gone"
|
||||||
android:textSize="@dimen/sp_15"
|
android:textSize="@dimen/sp_15"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -85,7 +86,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/sp_11"
|
android:textSize="@dimen/sp_11"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:text="s 后可重新获取"
|
android:paddingBottom="@dimen/dp_10"
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
@@ -63,7 +63,7 @@
|
|||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:textSize="@dimen/dp_15"
|
android:textSize="@dimen/dp_15"
|
||||||
android:text="15692013142"
|
android:text="1569201314"
|
||||||
tools:ignore="SpUsage" />
|
tools:ignore="SpUsage" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@@ -12,7 +12,6 @@ import android.text.style.ForegroundColorSpan;
|
|||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.ishumei.smantifraud.SmAntiFraud;
|
import com.ishumei.smantifraud.SmAntiFraud;
|
||||||
@@ -24,20 +23,15 @@ import com.netease.nis.quicklogin.listener.QuickLoginTokenListener;
|
|||||||
import com.tongdaxing.erban.upgrade.AppUpgradeHelper;
|
import com.tongdaxing.erban.upgrade.AppUpgradeHelper;
|
||||||
import com.yizhuan.erban.R;
|
import com.yizhuan.erban.R;
|
||||||
import com.yizhuan.erban.base.BaseLoginAct;
|
import com.yizhuan.erban.base.BaseLoginAct;
|
||||||
import com.yizhuan.erban.ui.login.LoginActivity;
|
|
||||||
import com.yizhuan.erban.ui.login.LoginPhoneActivity;
|
import com.yizhuan.erban.ui.login.LoginPhoneActivity;
|
||||||
import com.yizhuan.xchat_android_constants.XChatConstants;
|
import com.yizhuan.xchat_android_constants.XChatConstants;
|
||||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||||
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
|
|
||||||
import com.yizhuan.xchat_android_core.auth.exception.BanAccountException;
|
import com.yizhuan.xchat_android_core.auth.exception.BanAccountException;
|
||||||
import com.yizhuan.xchat_android_core.auth.exception.IsSuperAdminException;
|
import com.yizhuan.xchat_android_core.auth.exception.IsSuperAdminException;
|
||||||
import com.yizhuan.xchat_android_core.initial.InitialModel;
|
import com.yizhuan.xchat_android_core.initial.InitialModel;
|
||||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
@@ -0,0 +1,213 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.constraint.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"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_label_add_user_info"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/text_complete_user_info"
|
||||||
|
android:textColor="@color/color_333333"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:layout_marginTop="26dp"
|
||||||
|
android:layout_marginStart="26dp"
|
||||||
|
android:textSize="25dp"/>
|
||||||
|
|
||||||
|
<com.yizhuan.erban.common.widget.CircleImageView
|
||||||
|
android:id="@+id/civ_avatar"
|
||||||
|
android:layout_width="87dp"
|
||||||
|
android:layout_height="87dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:src="@drawable/tutu_default_avatar_purple"
|
||||||
|
app:cborder_color="@color/transparent"
|
||||||
|
app:cborder_width="0dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_label_add_user_info" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_random_avatar"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/civ_avatar"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/civ_avatar"
|
||||||
|
android:src="@drawable/switch_random_avatar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<android.support.design.widget.TextInputEditText
|
||||||
|
android:id="@+id/tv_nick"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="26dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginEnd="26dp"
|
||||||
|
android:paddingEnd="@dimen/dp_50"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
|
android:hint="@string/hint_input_nick"
|
||||||
|
android:paddingBottom="15dp"
|
||||||
|
android:textColor="@color/color_1A1A1A"
|
||||||
|
android:textColorHint="@color/color_C7C7C7"
|
||||||
|
android:textSize="@dimen/dp_14"
|
||||||
|
android:theme="@style/common_edittext_style"
|
||||||
|
android:lines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/text_default_nick"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/civ_avatar"
|
||||||
|
tools:ignore="SpUsage" />
|
||||||
|
|
||||||
|
<com.coorchice.library.SuperTextView
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/tv_nick"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_nick"
|
||||||
|
android:text="随机"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="@dimen/dp_9"
|
||||||
|
android:paddingEnd="@dimen/dp_9"
|
||||||
|
android:id="@+id/tv_random_nick"
|
||||||
|
android:textColor="@color/color_666666"
|
||||||
|
app:solid="@color/color_E6E6E6"
|
||||||
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:corner="@dimen/dp_5"
|
||||||
|
android:textSize="@dimen/dp_11"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_20" />
|
||||||
|
|
||||||
|
<android.support.design.widget.TextInputEditText
|
||||||
|
android:id="@+id/tv_gender"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="26dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:layout_marginEnd="26dp"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
|
android:paddingBottom="15dp"
|
||||||
|
android:textColor="@color/color_1A1A1A"
|
||||||
|
android:textColorHint="@color/color_C7C7C7"
|
||||||
|
android:textSize="@dimen/dp_14"
|
||||||
|
android:theme="@style/common_edittext_style"
|
||||||
|
android:lines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:hint="请选择性别(选择后不可更改)"
|
||||||
|
android:focusable="false"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:drawableEnd="@drawable/arrow_right"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_nick"
|
||||||
|
tools:ignore="SpUsage" />
|
||||||
|
|
||||||
|
<android.support.design.widget.TextInputEditText
|
||||||
|
android:id="@+id/tv_birthday"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="26dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:layout_marginEnd="26dp"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
|
android:inputType="number"
|
||||||
|
android:paddingBottom="15dp"
|
||||||
|
android:textColor="@color/color_1A1A1A"
|
||||||
|
android:textColorHint="@color/color_C7C7C7"
|
||||||
|
android:textSize="@dimen/dp_14"
|
||||||
|
android:theme="@style/common_edittext_style"
|
||||||
|
android:lines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:hint="@string/hint_input_your_birthday"
|
||||||
|
android:focusable="false"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_gender"
|
||||||
|
tools:ignore="SpUsage" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_warning"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/tips_can_not_register_below_18"
|
||||||
|
android:textColor="@color/text_tertiary"
|
||||||
|
android:layout_marginStart="26dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_birthday"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/ok_btn"
|
||||||
|
android:layout_width="260dp"
|
||||||
|
android:layout_height="43dp"
|
||||||
|
android:layout_marginTop="@dimen/common_item_view_height"
|
||||||
|
android:layout_marginBottom="@dimen/dp_16"
|
||||||
|
android:background="@drawable/shape_semi_round_gray_solid"
|
||||||
|
android:text="@string/save"
|
||||||
|
android:textColor="@color/color_333333"
|
||||||
|
android:textSize="15dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_warning"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
tools:ignore="SpUsage" />
|
||||||
|
|
||||||
|
<!--<TextView-->
|
||||||
|
<!--android:id="@+id/tv_gender_men"-->
|
||||||
|
<!--android:layout_width="125dp"-->
|
||||||
|
<!--android:layout_height="43dp"-->
|
||||||
|
<!--android:layout_marginTop="@dimen/dp_20"-->
|
||||||
|
<!--android:layout_marginEnd="@dimen/dp_15"-->
|
||||||
|
<!--android:background="@drawable/selector_gender_select_men"-->
|
||||||
|
<!--android:drawableStart="@drawable/selector_gender_select_men_padding_drawable"-->
|
||||||
|
<!--android:drawablePadding="@dimen/dp_3"-->
|
||||||
|
<!--android:gravity="center"-->
|
||||||
|
<!--android:paddingStart="@dimen/dp_40"-->
|
||||||
|
<!--android:paddingEnd="@dimen/dp_40"-->
|
||||||
|
<!--android:text="@string/text_gender_men"-->
|
||||||
|
<!--android:textColor="@color/gender_select_text_color"-->
|
||||||
|
<!--android:textSize="@dimen/dp_14"-->
|
||||||
|
<!--app:layout_constraintStart_toStartOf="@+id/tv_birthday"-->
|
||||||
|
<!--app:layout_constraintTop_toBottomOf="@+id/tv_birthday"-->
|
||||||
|
<!--tools:ignore="SpUsage" />-->
|
||||||
|
|
||||||
|
<!--<TextView-->
|
||||||
|
<!--android:id="@+id/tv_gender_women"-->
|
||||||
|
<!--android:layout_width="125dp"-->
|
||||||
|
<!--android:layout_height="43dp"-->
|
||||||
|
<!--android:layout_marginStart="@dimen/dp_15"-->
|
||||||
|
<!--android:layout_marginTop="@dimen/dp_20"-->
|
||||||
|
<!--android:background="@drawable/selector_gender_select_women"-->
|
||||||
|
<!--android:drawableStart="@drawable/selector_gender_select_women_padding_drawable"-->
|
||||||
|
<!--android:drawablePadding="@dimen/dp_3"-->
|
||||||
|
<!--android:gravity="center"-->
|
||||||
|
<!--android:paddingStart="@dimen/dp_40"-->
|
||||||
|
<!--android:paddingEnd="@dimen/dp_40"-->
|
||||||
|
<!--android:text="@string/text_gender_women"-->
|
||||||
|
<!--android:textColor="@color/gender_select_text_color"-->
|
||||||
|
<!--android:textSize="@dimen/dp_14"-->
|
||||||
|
<!--app:layout_constraintEnd_toEndOf="@+id/tv_birthday"-->
|
||||||
|
<!--app:layout_constraintTop_toBottomOf="@+id/tv_birthday"-->
|
||||||
|
<!--tools:ignore="SpUsage" />-->
|
||||||
|
|
||||||
|
<!--<TextView-->
|
||||||
|
<!--android:id="@+id/tv_tips"-->
|
||||||
|
<!--android:layout_width="wrap_content"-->
|
||||||
|
<!--android:layout_height="wrap_content"-->
|
||||||
|
<!--android:layout_marginTop="@dimen/dp_13"-->
|
||||||
|
<!--android:text="性别选择后不可更改"-->
|
||||||
|
<!--android:textColor="@color/color_999999"-->
|
||||||
|
<!--android:textSize="@dimen/dp_12"-->
|
||||||
|
<!--android:visibility="gone"-->
|
||||||
|
<!--app:layout_constraintEnd_toEndOf="@+id/tv_gender_women"-->
|
||||||
|
<!--app:layout_constraintStart_toStartOf="@+id/tv_gender_men"-->
|
||||||
|
<!--app:layout_constraintTop_toBottomOf="@+id/tv_gender_men"-->
|
||||||
|
<!--tools:ignore="SpUsage" />-->
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item android:state_checked="true" android:drawable="@drawable/ic_female_press"/>
|
||||||
|
<item android:state_checked="false" android:drawable="@drawable/ic_female_normal"/>
|
||||||
|
|
||||||
|
</selector>
|
@@ -18,6 +18,7 @@ buildscript {
|
|||||||
classpath "io.realm:realm-gradle-plugin:5.3.0"
|
classpath "io.realm:realm-gradle-plugin:5.3.0"
|
||||||
// android 资源混淆插件
|
// android 资源混淆插件
|
||||||
classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.15'
|
classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.15'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
<string name="forward_to_team">转发到群组</string>
|
<string name="forward_to_team">转发到群组</string>
|
||||||
<string name="withdrawn_msg">撤 回</string>
|
<string name="withdrawn_msg">撤 回</string>
|
||||||
<string name="save">保存</string>
|
<string name="save">保存</string>
|
||||||
|
<string name="done">完成</string>
|
||||||
<string name="main_msg_list_delete_chatting">删除该聊天</string>
|
<string name="main_msg_list_delete_chatting">删除该聊天</string>
|
||||||
<string name="main_msg_list_sticky_on_top">置顶该聊天</string>
|
<string name="main_msg_list_sticky_on_top">置顶该聊天</string>
|
||||||
<string name="main_msg_list_clear_sticky_on_top">取消置顶</string>
|
<string name="main_msg_list_clear_sticky_on_top">取消置顶</string>
|
||||||
|
Reference in New Issue
Block a user