用户登录、注册、重置密码接口逻辑完善

封装自定义响应提示逻辑
0515
panqihua 5 years ago
parent c6b093e822
commit 9183754134
  1. 24
      app/src/main/java/com/community/pocket/data/login/LoginRequest.java
  2. 2
      app/src/main/java/com/community/pocket/data/main/garbage/GarbageSortingRequest.java
  3. 21
      app/src/main/java/com/community/pocket/data/register/RegisterRequest.java
  4. 48
      app/src/main/java/com/community/pocket/data/resetpwd/ResetPwdRequest.java
  5. 14
      app/src/main/java/com/community/pocket/ui/login/LoginActivity.java
  6. 40
      app/src/main/java/com/community/pocket/ui/login/LoginResponse.java
  7. 3
      app/src/main/java/com/community/pocket/ui/login/LoginViewModel.java
  8. 3
      app/src/main/java/com/community/pocket/ui/main/ui/garbage/sorting/GarbageSortingFragment.java
  9. 13
      app/src/main/java/com/community/pocket/ui/main/ui/garbage/waste/GarbageWasteFragment.java
  10. 48
      app/src/main/java/com/community/pocket/ui/main/ui/share/Response.java
  11. 24
      app/src/main/java/com/community/pocket/ui/main/ui/share/ToastResponse.java
  12. 13
      app/src/main/java/com/community/pocket/ui/register/RegisterActivity.java
  13. 48
      app/src/main/java/com/community/pocket/ui/register/RegisterResponse.java
  14. 10
      app/src/main/java/com/community/pocket/ui/register/RegisterViewModel.java
  15. 49
      app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdResponse.java
  16. 10
      app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep1.java
  17. 34
      app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep2.java
  18. 11
      app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep3.java
  19. 27
      app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdViewModel.java
  20. 14
      app/src/main/java/com/community/pocket/util/CustomMessage.java
  21. 16
      app/src/main/java/com/community/pocket/util/SimpleHttpParse.java
  22. 4
      app/src/main/res/layout/activity_login.xml
  23. 10
      app/src/main/res/layout/activity_register.xml
  24. 4
      app/src/main/res/layout/resetpwd/layout/step1.xml
  25. 8
      app/src/main/res/layout/resetpwd/layout/step2.xml
  26. 4
      app/src/main/res/layout/resetpwd/layout/step3.xml
  27. 7
      app/src/main/res/values-en-rUS/strings.xml
  28. 7
      app/src/main/res/values-zh-rCN/strings.xml
  29. 7
      app/src/main/res/values/strings.xml

@ -1,13 +1,18 @@
package com.community.pocket.data.login; package com.community.pocket.data.login;
import androidx.lifecycle.MutableLiveData;
import com.community.pocket.R; import com.community.pocket.R;
import com.community.pocket.data.model.Token;
import com.community.pocket.ui.login.LoginResponse; import com.community.pocket.ui.login.LoginResponse;
import com.community.pocket.util.HttpRequest;
import com.community.pocket.util.HttpUtil;
import com.community.pocket.util.SimpleHttpParse;
import okhttp3.FormBody;
/** /**
* 登陆请求接口 * 登陆请求接口
* TODO 完善逻辑
*/ */
public class LoginRequest { public class LoginRequest {
private static volatile LoginRequest instance; private static volatile LoginRequest instance;
@ -22,14 +27,13 @@ public class LoginRequest {
return instance; return instance;
} }
public LoginResponse login(String username, String password) { @HttpRequest("/login")
Token token = new Token(); public void login(MutableLiveData<LoginResponse> liveData, String username, String password) {
token.setTime(System.currentTimeMillis());
token.setToken("123");
LoginResponse loginResponse = new LoginResponse(); HttpUtil.getRequest(HttpUtil.Method.POST, new SimpleHttpParse<LoginResponse>(liveData, R.string.register_ok, null).getInterface(LoginResponse.class),
loginResponse.setSuccess(R.string.login_ok, username); new FormBody.Builder()
loginResponse.setBody(token); .add("username", username)
return loginResponse; .add("password", password)
.build());
} }
} }

@ -31,7 +31,7 @@ public class GarbageSortingRequest {
@HttpRequest("/garbage/sorting") @HttpRequest("/garbage/sorting")
public void search(MutableLiveData<GarbageSortingResponse> liveData, String name) { public void search(MutableLiveData<GarbageSortingResponse> liveData, String name) {
HttpUtil.getRequest(HttpUtil.Method.GET, HttpUtil.getRequest(HttpUtil.Method.GET,
new SimpleHttpParse<GarbageSortingResponse>(liveData, R.string.garbage_search_ok, R.string.garbage_search_ok).getInterface(GarbageSortingResponse.class), new SimpleHttpParse<GarbageSortingResponse>(liveData, R.string.garbage_search_ok, null).getInterface(GarbageSortingResponse.class),
new FormBody.Builder().add("name", name).build()); new FormBody.Builder().add("name", name).build());
} }
} }

@ -1,6 +1,13 @@
package com.community.pocket.data.register; package com.community.pocket.data.register;
import com.community.pocket.util.Valid; import androidx.lifecycle.MutableLiveData;
import com.community.pocket.ui.register.RegisterResponse;
import com.community.pocket.util.HttpRequest;
import com.community.pocket.util.HttpUtil;
import com.community.pocket.util.SimpleHttpParse;
import okhttp3.FormBody;
/** /**
* 该类请求注册接口完成注册操作 * 该类请求注册接口完成注册操作
@ -18,8 +25,14 @@ public class RegisterRequest {
return instance; return instance;
} }
//TODO 接口请求逻辑 @HttpRequest("/register")
public Valid register(String username, String password, String confirmPassword, String mobilePhone, String email) { public void register(MutableLiveData<RegisterResponse> liveData, String username, String password, String mobilePhone, String email) {
return Valid.ok; HttpUtil.getRequest(HttpUtil.Method.POST, new SimpleHttpParse<RegisterResponse>(liveData).getInterface(RegisterResponse.class),
new FormBody.Builder()
.add("username", username)
.add("password", password)
.add("mobilePhone", mobilePhone)
.add("email", email)
.build());
} }
} }

@ -1,10 +1,16 @@
package com.community.pocket.data.resetpwd; package com.community.pocket.data.resetpwd;
import androidx.lifecycle.MutableLiveData;
import com.community.pocket.ui.resetpwd.ResetPwdResponse; import com.community.pocket.ui.resetpwd.ResetPwdResponse;
import com.community.pocket.util.HttpRequest;
import com.community.pocket.util.HttpUtil;
import com.community.pocket.util.SimpleHttpParse;
import okhttp3.FormBody;
/** /**
* 重置密码请求 * 重置密码请求
* TODO 接口请求逻辑完善
*/ */
public class ResetPwdRequest { public class ResetPwdRequest {
private static volatile ResetPwdRequest instance; private static volatile ResetPwdRequest instance;
@ -21,34 +27,50 @@ public class ResetPwdRequest {
/** /**
* 检查用户邮箱 * 检查用户邮箱
* TODO R.string.resetpwd_step1_ok
*/ */
public ResetPwdResponse checkUser(String username, String email) { @HttpRequest("/resetpwd/checkUser")
return new ResetPwdResponse(); public void checkUser(MutableLiveData<ResetPwdResponse> liveData, String username, String email) {
HttpUtil.getRequest(HttpUtil.Method.POST, new SimpleHttpParse<ResetPwdResponse>(liveData).getInterface(ResetPwdResponse.class),
new FormBody.Builder()
.add("username", username)
.add("email", email)
.build());
} }
/** /**
* 发送验证码 * 发送验证码
* TODO R.string.resetpwd_step2_ok
*/ */
public ResetPwdResponse sendCode(String username, String email) { @HttpRequest("/resetpwd/sendCode")
return new ResetPwdResponse(); public void sendCode(MutableLiveData<ResetPwdResponse> liveData, String username, String email) {
HttpUtil.getRequest(HttpUtil.Method.POST, new SimpleHttpParse<ResetPwdResponse>(liveData).getInterface(ResetPwdResponse.class),
new FormBody.Builder()
.add("username", username)
.add("email", email)
.build());
} }
/** /**
* 检查验证码 * 检查验证码
* TODO R.string.resetpwd_step2_valid_ok
*/ */
public ResetPwdResponse checkCode(String username, String email, String code) { @HttpRequest("/resetpwd/checkCode")
return new ResetPwdResponse(); public void checkCode(MutableLiveData<ResetPwdResponse> liveData, String username, String code) {
HttpUtil.getRequest(HttpUtil.Method.POST, new SimpleHttpParse<ResetPwdResponse>(liveData).getInterface(ResetPwdResponse.class),
new FormBody.Builder()
.add("username", username)
.add("code", code)
.build());
} }
/** /**
* 重置密码 * 重置密码
* TODO R.string.resetpwd_step3_ok
*/ */
public ResetPwdResponse resetPwd(String username, String password) { @HttpRequest("/resetpwd/resetPwd")
return new ResetPwdResponse(); public void resetPwd(MutableLiveData<ResetPwdResponse> liveData, String username, String password) {
HttpUtil.getRequest(HttpUtil.Method.POST, new SimpleHttpParse<ResetPwdResponse>(liveData).getInterface(ResetPwdResponse.class),
new FormBody.Builder()
.add("username", username)
.add("password", password)
.build());
} }
} }

@ -10,7 +10,6 @@ import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.Toast;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi; import androidx.annotation.RequiresApi;
@ -21,6 +20,7 @@ import com.community.pocket.R;
import com.community.pocket.ui.BaseActivity; import com.community.pocket.ui.BaseActivity;
import com.community.pocket.ui.listener.MyTextChange; import com.community.pocket.ui.listener.MyTextChange;
import com.community.pocket.ui.main.MainMenu; import com.community.pocket.ui.main.MainMenu;
import com.community.pocket.ui.main.ui.share.Response;
import com.community.pocket.ui.register.RegisterActivity; import com.community.pocket.ui.register.RegisterActivity;
import com.community.pocket.ui.resetpwd.ResetPwdActivity; import com.community.pocket.ui.resetpwd.ResetPwdActivity;
import com.community.pocket.util.PropertiesUtil; import com.community.pocket.util.PropertiesUtil;
@ -85,19 +85,15 @@ public class LoginActivity extends BaseActivity {
return; return;
} }
loadingProgressBar.setVisibility(View.GONE); loadingProgressBar.setVisibility(View.GONE);
if (loginResponse.getError() != null) {
Toast.makeText(getApplicationContext(), loginResponse.fail(getApplicationContext()), Toast.LENGTH_SHORT).show();
}
if (loginResponse.getSuccess() != null) {
Toast.makeText(getApplicationContext(), loginResponse.ok(getApplicationContext()), Toast.LENGTH_SHORT).show();
}
setResult(Activity.RESULT_OK); setResult(Activity.RESULT_OK);
startActivity(new Intent(getApplicationContext(), MainMenu.class)); loginResponse.toast(getBaseContext());
if (loginResponse.getResult() == Response.Result.OK) {
startActivity(new Intent(getBaseContext(), MainMenu.class));
//Complete and destroy login activity once successful //Complete and destroy login activity once successful
finish(); finish();
} }
}
}); });

@ -1,11 +1,47 @@
package com.community.pocket.ui.login; package com.community.pocket.ui.login;
import androidx.annotation.StringRes;
import com.community.pocket.R;
import com.community.pocket.data.model.Token; import com.community.pocket.data.model.Token;
import com.community.pocket.ui.main.ui.share.Response; import com.community.pocket.ui.main.ui.share.ToastResponse;
import com.community.pocket.util.CustomMessage;
import org.jetbrains.annotations.NotNull;
/** /**
* 登陆响应结果 * 登陆响应结果
*/ */
public class LoginResponse extends Response<Token> { public class LoginResponse extends ToastResponse<LoginResponse.Msg> {
private Token token;
public Token getToken() {
return token;
}
public void setToken(Token token) {
this.token = token;
}
enum Msg implements CustomMessage {
ok(R.string.login_ok),
fail(R.string.login_fail);
private Integer msg;
Msg(@StringRes Integer msg) {
this.msg = msg;
}
@NotNull
@Override
public Integer getMsg() {
return msg;
}
public void setMsg(Integer msg) {
this.msg = msg;
}
}
} }

@ -28,8 +28,7 @@ public class LoginViewModel extends BaseViewModel<LoginRequest> {
//登陆 //登陆
public void login(String username, String password) { public void login(String username, String password) {
LoginResponse response = getRequest().login(username, password); getRequest().login(loginResult, username, password);
loginResult.setValue(response);
} }
//登陆表单数据变化触发数据校验 //登陆表单数据变化触发数据校验

@ -6,7 +6,6 @@ import android.view.View;
import android.widget.AutoCompleteTextView; import android.widget.AutoCompleteTextView;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
@ -68,7 +67,7 @@ public class GarbageSortingFragment extends BaseFragment {
} }
if (garbageSortingResponse.getError() != null) { if (garbageSortingResponse.getError() != null) {
Toast.makeText(getContext(), garbageSortingResponse.ok(getContext()), Toast.LENGTH_SHORT).show(); garbageSortingResponse.fail(getContext());
} }
} }
}); });

@ -7,7 +7,6 @@ import android.view.Gravity;
import android.view.View; import android.view.View;
import android.widget.AutoCompleteTextView; import android.widget.AutoCompleteTextView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
@ -23,6 +22,7 @@ import com.community.pocket.data.model.GarbageWastePrice;
import com.community.pocket.ui.BaseFragment; import com.community.pocket.ui.BaseFragment;
import com.community.pocket.ui.listener.MyTextChange; import com.community.pocket.ui.listener.MyTextChange;
import com.community.pocket.ui.main.ui.share.MyAutoCompleteTextView; import com.community.pocket.ui.main.ui.share.MyAutoCompleteTextView;
import com.community.pocket.ui.main.ui.share.Response;
import org.xutils.view.annotation.ContentView; import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject; import org.xutils.view.annotation.ViewInject;
@ -73,7 +73,7 @@ public class GarbageWasteFragment extends BaseFragment {
} }
if (garbageWasteResponse.getError() != null) { if (garbageWasteResponse.getError() != null) {
Toast.makeText(getContext(), garbageWasteResponse.fail(getContext()), Toast.LENGTH_SHORT).show(); garbageWasteResponse.fail(getContext());
} }
} }
}); });
@ -86,12 +86,11 @@ public class GarbageWasteFragment extends BaseFragment {
return; return;
} }
if (garbageWasteResponse.getSuccess() != null) {
initSearch(garbageWasteResponse.getBody());
}
if (garbageWasteResponse.getError() != null) { if (garbageWasteResponse.getResult() == Response.Result.OK) {
Toast.makeText(getContext(), garbageWasteResponse.fail(getContext()), Toast.LENGTH_SHORT).show(); initSearch(garbageWasteResponse.getBody());
} else {
garbageWasteResponse.fail(getContext());
} }
} }
}); });

@ -1,10 +1,13 @@
package com.community.pocket.ui.main.ui.share; package com.community.pocket.ui.main.ui.share;
import android.content.Context; import android.content.Context;
import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import com.community.pocket.R;
import com.google.gson.Gson; import com.google.gson.Gson;
/** /**
@ -15,11 +18,13 @@ import com.google.gson.Gson;
public abstract class Response<T> { public abstract class Response<T> {
//成功描述 //成功描述
@Nullable @Nullable
@Deprecated
private Integer success; private Integer success;
//失败描述 //失败描述
@Nullable @Nullable
@Deprecated
private Integer error; private Integer error;
//描述参数
private Object[] args; private Object[] args;
//响应体 //响应体
private T body; private T body;
@ -46,23 +51,29 @@ public abstract class Response<T> {
} }
@Nullable @Nullable
@Deprecated
// TODO 废弃
public Integer getSuccess() { public Integer getSuccess() {
return success; return success;
} }
public void setSuccess(@Nullable Integer success, Object... args) { @Deprecated
// TODO 废弃
public void setSuccess(@Nullable @StringRes Integer success) {
this.success = success; this.success = success;
this.args = args;
} }
@Nullable @Nullable
@Deprecated
// TODO 废弃
public Integer getError() { public Integer getError() {
return error; return error;
} }
public void setError(@Nullable Integer error, Object... args) { @Deprecated
// TODO 废弃
public void setError(@Nullable @StringRes Integer error) {
this.error = error; this.error = error;
this.args = args;
} }
public T getBody() { public T getBody() {
@ -73,29 +84,28 @@ public abstract class Response<T> {
this.body = body; this.body = body;
} }
public String ok(Context context) { Object[] getArgs() {
if (success != null) { return args;
return context.getString(success, args);
} }
return null;
public void setArgs(Object[] args) {
this.args = args;
} }
public String fail(Context context) { public void ok(Context context) {
if (error != null) { if (success != null) {
return context.getString(error, args); Toast.makeText(context, context.getString(success, args), Toast.LENGTH_SHORT).show();
} }
return null;
} }
public Object[] getArgs() { public void fail(Context context) {
return args; if (error != null) {
Toast.makeText(context, context.getString(error, args), Toast.LENGTH_LONG).show();
} else {
Toast.makeText(context, context.getString(R.string.unknow_error), Toast.LENGTH_LONG).show();
} }
public void setArgs(Object[] args) {
this.args = args;
} }
public enum Result { public enum Result {
OK, OK,
FAIL FAIL

@ -0,0 +1,24 @@
package com.community.pocket.ui.main.ui.share;
import android.content.Context;
import android.widget.Toast;
import com.community.pocket.R;
import com.community.pocket.util.CustomMessage;
/**
* 弹窗响应
*
* @param <T>
*/
public abstract class ToastResponse<T extends CustomMessage> extends Response<T> {
public void toast(Context context) {
if (getBody() != null) {
Toast.makeText(context, context.getString(getBody().getMsg(), getArgs()), Toast.LENGTH_LONG).show();
} else {
Toast.makeText(context, R.string.unknow_error, Toast.LENGTH_LONG).show();
}
}
}

@ -8,7 +8,6 @@ import android.text.TextWatcher;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.Toast;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
@ -114,16 +113,14 @@ public class RegisterActivity extends BaseActivity {
return; return;
} }
if (registerResponse.getError() != null) { registerResponse.toast(getBaseContext());
Toast.makeText(getApplicationContext(), R.string.register_fail, Toast.LENGTH_SHORT).show(); if (registerResponse.getBody() == RegisterResponse.Msg.ok) {
}
if (registerResponse.getSuccess() != null) {
Toast.makeText(getApplicationContext(), R.string.register_ok, Toast.LENGTH_SHORT).show();
startActivity(new Intent(getApplicationContext(), LoginActivity.class)); startActivity(new Intent(getApplicationContext(), LoginActivity.class));
//Complete and destroy login activity once successful //Complete and destroy login activity once successful
finish(); finish();
}
}
setResult(Activity.RESULT_OK); setResult(Activity.RESULT_OK);
} }
@ -133,7 +130,7 @@ public class RegisterActivity extends BaseActivity {
@Event(value = R.id.register) @Event(value = R.id.register)
private void register(View v) { private void register(View v) {
registerViewModel.register(username.getText().toString(), password.getText().toString(), confirmPassword.getText().toString(), mobiePhone.getText().toString(), email.getText().toString()); registerViewModel.register(username.getText().toString(), password.getText().toString(), mobiePhone.getText().toString(), email.getText().toString());
} }
@Event(value = R.id.back) @Event(value = R.id.back)

@ -1,33 +1,41 @@
package com.community.pocket.ui.register; package com.community.pocket.ui.register;
import androidx.annotation.Nullable; import androidx.annotation.StringRes;
import com.community.pocket.R;
import com.community.pocket.ui.main.ui.share.ToastResponse;
import com.community.pocket.util.CustomMessage;
import org.jetbrains.annotations.NotNull;
/** /**
* 注册结果 * 注册结果
*/ */
class RegisterResponse { public class RegisterResponse extends ToastResponse<RegisterResponse.Msg> {
@Nullable
private Integer success; /**
@Nullable * 响应类型
private Integer error; */
enum Msg implements CustomMessage {
@Nullable ok(R.string.register_ok),
Integer getSuccess() { name(R.string.register_fail_name_repeat),
return success; mobie(R.string.register_fail_mobie_repeat),
} email(R.string.register_fail_email_repeat);
RegisterResponse setSuccess(@Nullable Integer success) { private Integer msg;
this.success = success;
return this; Msg(@StringRes Integer msg) {
this.msg = msg;
} }
@Nullable @NotNull
Integer getError() { public @StringRes
return error; Integer getMsg() {
return msg;
} }
RegisterResponse setError(@Nullable Integer error) { public void setMsg(Integer msg) {
this.error = error; this.msg = msg;
return this; }
} }
} }

@ -5,7 +5,6 @@ import androidx.lifecycle.ViewModel;
import com.community.pocket.R; import com.community.pocket.R;
import com.community.pocket.data.register.RegisterRequest; import com.community.pocket.data.register.RegisterRequest;
import com.community.pocket.util.Valid;
import com.community.pocket.util.ValidUtil; import com.community.pocket.util.ValidUtil;
/** /**
@ -34,13 +33,8 @@ class RegisterViewModel extends ViewModel {
} }
//注册 //注册
void register(String username, String password, String confirmPassword, String mobilePhone, String email) { void register(String username, String password, String mobilePhone, String email) {
Valid valid = registerRequest.register(username, password, confirmPassword, mobilePhone, email); registerRequest.register(registerResult, username, password, mobilePhone, email);
if (Valid.ok == valid) {
registerResult.setValue(new RegisterResponse().setSuccess(R.string.register_ok));
} else {
registerResult.setValue(new RegisterResponse().setError(R.string.register_fail));
}
} }
//监听注册表单数据变化触发数据校验 //监听注册表单数据变化触发数据校验

@ -1,33 +1,42 @@
package com.community.pocket.ui.resetpwd; package com.community.pocket.ui.resetpwd;
import androidx.annotation.Nullable; import androidx.annotation.StringRes;
import com.community.pocket.R;
import com.community.pocket.ui.main.ui.share.ToastResponse;
import com.community.pocket.util.CustomMessage;
import org.jetbrains.annotations.NotNull;
/** /**
* 重置密码结果 * 重置密码结果
*/ */
public class ResetPwdResponse { public class ResetPwdResponse extends ToastResponse<ResetPwdResponse.Msg> {
@Nullable
private Integer success;
@Nullable
private Integer error;
@Nullable
Integer getSuccess() {
return success;
}
ResetPwdResponse setSuccess(@Nullable Integer success) { enum Msg implements CustomMessage {
this.success = success; step1_ok(R.string.resetpwd_step1_ok),
return this; step1_fail(R.string.resetpwd_step1_fail),
step2_ok(R.string.resetpwd_step2_ok),
step2_fail(R.string.resetpwd_step2_fail),
step2_valid_ok(R.string.resetpwd_step2_valid_ok),
step2_valid_fail(R.string.resetpwd_step2_valid_fail),
step3_ok(R.string.resetpwd_step3_ok),
step3_fail(R.string.resetpwd_step3_fail);
private Integer msg;
Msg(@StringRes Integer msg) {
this.msg = msg;
} }
@Nullable public void setMsg(Integer msg) {
Integer getError() { this.msg = msg;
return error;
} }
ResetPwdResponse setError(@Nullable Integer error) { @NotNull
this.error = error; @Override
return this; public Integer getMsg() {
return msg;
}
} }
} }

@ -9,7 +9,6 @@ import android.text.TextWatcher;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
@ -22,6 +21,7 @@ import com.community.pocket.R;
import com.community.pocket.ui.BaseFragment; import com.community.pocket.ui.BaseFragment;
import com.community.pocket.ui.listener.MyTextChange; import com.community.pocket.ui.listener.MyTextChange;
import com.community.pocket.ui.login.LoginActivity; import com.community.pocket.ui.login.LoginActivity;
import com.community.pocket.ui.main.ui.share.Response;
import com.community.pocket.util.Param; import com.community.pocket.util.Param;
import com.community.pocket.util.PropertiesUtil; import com.community.pocket.util.PropertiesUtil;
@ -92,13 +92,9 @@ public class ResetPwdStep1 extends BaseFragment {
return; return;
} }
if (step1.getError() != null) { step1.toast(getContext());
Toast.makeText(getContext(), step1.getError(), Toast.LENGTH_LONG).show();
}
if (step1.getSuccess() != null) {
Toast.makeText(getContext(), step1.getSuccess(), Toast.LENGTH_LONG).show();
if (step1.getResult() == Response.Result.OK) {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString(Param.username.name(), username.getText().toString()); bundle.putString(Param.username.name(), username.getText().toString());
bundle.putString(Param.email.name(), email.getText().toString()); bundle.putString(Param.email.name(), email.getText().toString());

@ -7,7 +7,6 @@ import android.text.TextWatcher;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
@ -19,6 +18,7 @@ import androidx.navigation.fragment.NavHostFragment;
import com.community.pocket.R; import com.community.pocket.R;
import com.community.pocket.ui.BaseFragment; import com.community.pocket.ui.BaseFragment;
import com.community.pocket.ui.listener.MyTextChange; import com.community.pocket.ui.listener.MyTextChange;
import com.community.pocket.ui.main.ui.share.Response;
import com.community.pocket.util.Param; import com.community.pocket.util.Param;
import org.xutils.view.annotation.ContentView; import org.xutils.view.annotation.ContentView;
@ -98,31 +98,35 @@ public class ResetPwdStep2 extends BaseFragment {
}; };
code.addTextChangedListener(afterTextChangedListener); code.addTextChangedListener(afterTextChangedListener);
resetPwdViewModel.getResetPwdResultStep2().observe(getViewLifecycleOwner(), new Observer<ResetPwdResponse>() { //监听发送验证码状态
resetPwdViewModel.getSendCodeResponse().observe(getViewLifecycleOwner(), new Observer<ResetPwdResponse>() {
@Override @Override
public void onChanged(ResetPwdResponse resetPwdResponse) { public void onChanged(ResetPwdResponse resetPwdResponse) {
if (resetPwdResponse == null) { if (resetPwdResponse == null) {
return; return;
} }
if (resetPwdResponse.getSuccess() != null) { code.setEnabled(resetPwdResponse.getResult() == Response.Result.OK);
Toast.makeText(getContext(), resetPwdResponse.getSuccess(), Toast.LENGTH_LONG).show(); resetPwdResponse.toast(getContext());
if (resetPwdResponse.getSuccess() == R.string.resetpwd_step2_ok) { }
code.setEnabled(true); });
} else {
//监听校验验证码状态
resetPwdViewModel.getCheckCodeResponse().observe(getViewLifecycleOwner(), new Observer<ResetPwdResponse>() {
@Override
public void onChanged(ResetPwdResponse resetPwdResponse) {
if (resetPwdResponse == null) {
return;
}
resetPwdResponse.toast(getContext());
if (resetPwdResponse.getResult() == Response.Result.OK) {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString(Param.username.name(), username.getText().toString()); bundle.putString(Param.username.name(), username.getText().toString());
NavHostFragment.findNavController(ResetPwdStep2.this) NavHostFragment.findNavController(ResetPwdStep2.this)
.navigate(R.id.action_Second2Fragment_to_threeFragment, bundle); .navigate(R.id.action_Second2Fragment_to_threeFragment, bundle);
} }
}
if (resetPwdResponse.getError() != null) {
Toast.makeText(getContext(), resetPwdResponse.getError(), Toast.LENGTH_LONG).show();
if (resetPwdResponse.getError() == R.string.resetpwd_step2_fail) {
code.setEnabled(false);
}
}
} }
}); });
} }
@ -132,7 +136,7 @@ public class ResetPwdStep2 extends BaseFragment {
*/ */
@Event(value = R.id.next) @Event(value = R.id.next)
private void next(View view) { private void next(View view) {
resetPwdViewModel.checkCode(username.getText().toString(), email.getText().toString(), code.getText().toString()); resetPwdViewModel.checkCode(username.getText().toString(), code.getText().toString());
} }
/** /**

@ -8,7 +8,6 @@ import android.text.TextWatcher;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
@ -20,6 +19,7 @@ import com.community.pocket.R;
import com.community.pocket.ui.BaseFragment; import com.community.pocket.ui.BaseFragment;
import com.community.pocket.ui.listener.MyTextChange; import com.community.pocket.ui.listener.MyTextChange;
import com.community.pocket.ui.login.LoginActivity; import com.community.pocket.ui.login.LoginActivity;
import com.community.pocket.ui.main.ui.share.Response;
import com.community.pocket.util.Param; import com.community.pocket.util.Param;
import com.community.pocket.util.PropertiesUtil; import com.community.pocket.util.PropertiesUtil;
@ -94,13 +94,10 @@ public class ResetPwdStep3 extends BaseFragment {
return; return;
} }
if (resetPwdResponse.getSuccess() != null) { resetPwdResponse.toast(getContext());
Toast.makeText(getContext(), getString(R.string.resetpwd_step3_ok), Toast.LENGTH_LONG).show();
startActivity(new Intent(getContext(), LoginActivity.class));
} if (resetPwdResponse.getResult() == Response.Result.OK) {
if (resetPwdResponse.getError() != null) { startActivity(new Intent(getContext(), LoginActivity.class));
Toast.makeText(getContext(), getString(R.string.resetpwd_step3_fail), Toast.LENGTH_LONG).show();
} }
} }
}); });

@ -19,7 +19,10 @@ class ResetPwdViewModel extends ViewModel {
//重置密码第二步校验状态 //重置密码第二步校验状态
private MutableLiveData<ResetPwdFormState.Step2> resetPwdFormStep2 = new MutableLiveData<>(); private MutableLiveData<ResetPwdFormState.Step2> resetPwdFormStep2 = new MutableLiveData<>();
//重置密码第二步发送验证码结果 //重置密码第二步发送验证码结果
private MutableLiveData<ResetPwdResponse> resetPwdResultStep2 = new MutableLiveData<>(); private MutableLiveData<ResetPwdResponse> sendCodeResponse = new MutableLiveData<>();
//重置密码验证码校验结果
private MutableLiveData<ResetPwdResponse> checkCodeResponse = new MutableLiveData<>();
//重置密码第三步校验状态 //重置密码第三步校验状态
private MutableLiveData<ResetPwdFormState.Step3> resetPwdFormStep3 = new MutableLiveData<>(); private MutableLiveData<ResetPwdFormState.Step3> resetPwdFormStep3 = new MutableLiveData<>();
//重置密码第三部重置结果 //重置密码第三部重置结果
@ -44,8 +47,12 @@ class ResetPwdViewModel extends ViewModel {
return resetPwdFormStep2; return resetPwdFormStep2;
} }
MutableLiveData<ResetPwdResponse> getResetPwdResultStep2() { MutableLiveData<ResetPwdResponse> getSendCodeResponse() {
return resetPwdResultStep2; return sendCodeResponse;
}
MutableLiveData<ResetPwdResponse> getCheckCodeResponse() {
return checkCodeResponse;
} }
MutableLiveData<ResetPwdFormState.Step3> getResetPwdFormStep3() { MutableLiveData<ResetPwdFormState.Step3> getResetPwdFormStep3() {
@ -58,26 +65,22 @@ class ResetPwdViewModel extends ViewModel {
//重置密码第一步 //重置密码第一步
void checkUser(String username, String email) { void checkUser(String username, String email) {
ResetPwdResponse response = resetPwdRequest.checkUser(username, email); resetPwdRequest.checkUser(resetPwdResultStep1, username, email);
resetPwdResultStep1.setValue(response);
} }
//重置密码第二步 //重置密码第二步
void sendCode(String username, String email) { void sendCode(String username, String email) {
ResetPwdResponse response = resetPwdRequest.sendCode(username, email); resetPwdRequest.sendCode(sendCodeResponse, username, email);
resetPwdResultStep2.setValue(response);
} }
//重置密码第二步 //重置密码第二步
void checkCode(String username, String email, String code) { void checkCode(String username, String code) {
ResetPwdResponse response = resetPwdRequest.checkCode(username, email, code); resetPwdRequest.checkCode(checkCodeResponse, username, code);
resetPwdResultStep2.setValue(response);
} }
//重置密码第三步 //重置密码第三步
void resetPwd(String username, String password) { void resetPwd(String username, String password) {
ResetPwdResponse response = resetPwdRequest.resetPwd(username, password); resetPwdRequest.resetPwd(resetPwdResultStep3, username, password);
resetPwdResultStep3.setValue(response);
} }
//监听重置密码第一步表单触发校验 //监听重置密码第一步表单触发校验

@ -0,0 +1,14 @@
package com.community.pocket.util;
import androidx.annotation.StringRes;
import org.jetbrains.annotations.NotNull;
/**
* 自定义响应信息
*/
public interface CustomMessage {
@StringRes
@NotNull
Integer getMsg();
}

@ -8,20 +8,36 @@ import org.jetbrains.annotations.NotNull;
import okhttp3.Call; import okhttp3.Call;
import okhttp3.Response; import okhttp3.Response;
/**
* HTTP响应实体
*
* @param <T>
*/
public class SimpleHttpParse<T extends com.community.pocket.ui.main.ui.share.Response> implements HttpParse<T> { public class SimpleHttpParse<T extends com.community.pocket.ui.main.ui.share.Response> implements HttpParse<T> {
private MutableLiveData liveData; private MutableLiveData liveData;
//TODO 废弃
@Deprecated
private Integer success; private Integer success;
//TODO 废弃
@Deprecated
private Integer error; private Integer error;
//TODO 废弃
@Deprecated
public SimpleHttpParse(MutableLiveData liveData, @StringRes Integer success, @StringRes Integer error) { public SimpleHttpParse(MutableLiveData liveData, @StringRes Integer success, @StringRes Integer error) {
this.liveData = liveData; this.liveData = liveData;
this.success = success; this.success = success;
this.error = error; this.error = error;
} }
public SimpleHttpParse(MutableLiveData liveData) {
this.liveData = liveData;
}
public HttpResponse<T> getInterface(Class<T> tClass) { public HttpResponse<T> getInterface(Class<T> tClass) {
return new HttpResponse<>(tClass, this); return new HttpResponse<>(tClass, this);
} }

@ -28,7 +28,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME" android:importantForAutofill="no"
android:hint="@string/prompt_user" android:hint="@string/prompt_user"
android:inputType="text" android:inputType="text"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
@ -43,7 +43,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:autofillHints="@string/AUTOFILL_HINT_PASSWORD" android:importantForAutofill="no"
android:hint="@string/prompt_password" android:hint="@string/prompt_password"
android:imeActionLabel="@string/action_sign_in_short" android:imeActionLabel="@string/action_sign_in_short"
android:inputType="textPassword" android:inputType="textPassword"

@ -27,7 +27,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME" android:importantForAutofill="no"
android:hint="@string/prompt_user" android:hint="@string/prompt_user"
android:inputType="text" android:inputType="text"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
@ -41,7 +41,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME" android:importantForAutofill="no"
android:hint="@string/prompt_password" android:hint="@string/prompt_password"
android:inputType="text|textPassword" android:inputType="text|textPassword"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
@ -55,7 +55,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME" android:importantForAutofill="no"
android:hint="@string/prompt_confirm_password" android:hint="@string/prompt_confirm_password"
android:inputType="text|textPassword" android:inputType="text|textPassword"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
@ -69,7 +69,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME" android:importantForAutofill="no"
android:hint="@string/prompt_phone" android:hint="@string/prompt_phone"
android:inputType="text|phone" android:inputType="text|phone"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
@ -83,7 +83,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME" android:importantForAutofill="no"
android:hint="@string/prompt_email" android:hint="@string/prompt_email"
android:inputType="none|textEmailAddress" android:inputType="none|textEmailAddress"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"

@ -11,7 +11,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME" android:importantForAutofill="no"
android:hint="@string/prompt_user" android:hint="@string/prompt_user"
android:inputType="text" android:inputType="text"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
@ -25,7 +25,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME" android:importantForAutofill="no"
android:hint="@string/prompt_email" android:hint="@string/prompt_email"
android:inputType="text|textEmailAddress" android:inputType="text|textEmailAddress"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"

@ -11,14 +11,14 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME"
android:enabled="false" android:enabled="false"
android:hint="@string/prompt_user" android:hint="@string/prompt_user"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:ignore="TextFields" /> tools:ignore="TextFields"
android:importantForAutofill="no" />
<EditText <EditText
android:id="@+id/email" android:id="@+id/email"
@ -26,7 +26,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME"
android:enabled="false" android:enabled="false"
android:hint="@string/prompt_email" android:hint="@string/prompt_email"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
@ -34,7 +33,8 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/username" app:layout_constraintTop_toBottomOf="@+id/username"
tools:layout_constraintTop_toBottomOf="@id/username" tools:layout_constraintTop_toBottomOf="@id/username"
tools:ignore="TextFields" /> tools:ignore="TextFields"
android:importantForAutofill="no" />
<EditText <EditText
android:id="@+id/code" android:id="@+id/code"

@ -9,7 +9,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME" android:importantForAutofill="no"
android:hint="@string/prompt_password" android:hint="@string/prompt_password"
android:inputType="text|textPassword" android:inputType="text|textPassword"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
@ -23,7 +23,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:autofillHints="@string/AUTOFILL_HINT_USERNAME" android:importantForAutofill="no"
android:hint="@string/prompt_confirm_password" android:hint="@string/prompt_confirm_password"
android:inputType="text|textPassword" android:inputType="text|textPassword"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"

@ -8,7 +8,6 @@
<string name="welcome">"Welcome !"</string> <string name="welcome">"Welcome !"</string>
<string name="invalid_username">Username must be >%1$s characters</string> <string name="invalid_username">Username must be >%1$s characters</string>
<string name="invalid_password">Password must be >%1$s characters</string> <string name="invalid_password">Password must be >%1$s characters</string>
<string name="login_failed">"Login failed"</string>
<string name="language_auto">system language</string> <string name="language_auto">system language</string>
<string name="language_chs">chs</string> <string name="language_chs">chs</string>
<string name="language_en">en</string> <string name="language_en">en</string>
@ -95,7 +94,6 @@
<string name="invalid_mobiephone">Cell phone Numbers are illegal</string> <string name="invalid_mobiephone">Cell phone Numbers are illegal</string>
<string name="invalid_email">Invalid mailbox</string> <string name="invalid_email">Invalid mailbox</string>
<string name="register_ok">register OK</string> <string name="register_ok">register OK</string>
<string name="register_fail">register fail</string>
<string name="resetpwd_step1_fail">username or email error</string> <string name="resetpwd_step1_fail">username or email error</string>
<string name="resetpwd_step1_ok">Check success</string> <string name="resetpwd_step1_ok">Check success</string>
<string name="prompt_code">please input code</string> <string name="prompt_code">please input code</string>
@ -163,4 +161,9 @@
<string name="garbage_waste_search_ok">search success</string> <string name="garbage_waste_search_ok">search success</string>
<string name="garbage_table_name">name</string> <string name="garbage_table_name">name</string>
<string name="garbage_table_price">price</string> <string name="garbage_table_price">price</string>
<string name="register_fail_name_repeat">username repeat</string>
<string name="register_fail_mobie_repeat">mobie repeat</string>
<string name="register_fail_email_repeat">email repeat</string>
<string name="unknow_error">unknow error</string>
<string name="login_fail">login fail</string>
</resources> </resources>

@ -7,7 +7,6 @@
<string name="action_sign_in_short">登陆</string> <string name="action_sign_in_short">登陆</string>
<string name="welcome">"欢迎 !"</string> <string name="welcome">"欢迎 !"</string>
<string name="invalid_password">密码必须大于%1$s个字符</string> <string name="invalid_password">密码必须大于%1$s个字符</string>
<string name="login_failed">"登陆失败"</string>
<string name="language_auto">系统语言</string> <string name="language_auto">系统语言</string>
<string name="language_chs">简体中文</string> <string name="language_chs">简体中文</string>
<string name="language_en">英文</string> <string name="language_en">英文</string>
@ -94,7 +93,6 @@
<string name="invalid_mobiephone">手机号码不合法</string> <string name="invalid_mobiephone">手机号码不合法</string>
<string name="invalid_email">邮箱不合法</string> <string name="invalid_email">邮箱不合法</string>
<string name="register_ok">注册成功</string> <string name="register_ok">注册成功</string>
<string name="register_fail">注册失败</string>
<string name="invalid_username">用户名必须大于%1$s个字符</string> <string name="invalid_username">用户名必须大于%1$s个字符</string>
<string name="resetpwd_step1_fail">用户名或邮箱错误</string> <string name="resetpwd_step1_fail">用户名或邮箱错误</string>
<string name="resetpwd_step1_ok">校验成功</string> <string name="resetpwd_step1_ok">校验成功</string>
@ -163,4 +161,9 @@
<string name="garbage_waste_search_ok">检索废品成功</string> <string name="garbage_waste_search_ok">检索废品成功</string>
<string name="garbage_table_name">废品</string> <string name="garbage_table_name">废品</string>
<string name="garbage_table_price">价格</string> <string name="garbage_table_price">价格</string>
<string name="register_fail_name_repeat">用户名%1s已注册</string>
<string name="register_fail_mobie_repeat">手机号%1s已绑定</string>
<string name="register_fail_email_repeat">邮箱%1s已绑定</string>
<string name="unknow_error">未知错误,请联系管理员</string>
<string name="login_fail">登陆失败,账号或密码错误</string>
</resources> </resources>

@ -8,7 +8,6 @@
<string name="welcome">"Welcome !"</string> <string name="welcome">"Welcome !"</string>
<string name="invalid_username">Username must be >%1$s characters</string> <string name="invalid_username">Username must be >%1$s characters</string>
<string name="invalid_password">Password must be >%1$s characters</string> <string name="invalid_password">Password must be >%1$s characters</string>
<string name="login_failed">"Login failed"</string>
<string name="language_auto">system language</string> <string name="language_auto">system language</string>
<string name="language_chs">chs</string> <string name="language_chs">chs</string>
<string name="language_en">en</string> <string name="language_en">en</string>
@ -96,7 +95,6 @@
<string name="invalid_mobiephone">Cell phone Numbers are illegal</string> <string name="invalid_mobiephone">Cell phone Numbers are illegal</string>
<string name="invalid_email">Invalid mailbox</string> <string name="invalid_email">Invalid mailbox</string>
<string name="register_ok">register OK</string> <string name="register_ok">register OK</string>
<string name="register_fail">register fail</string>
<string name="resetpwd_step1_fail">username or email error</string> <string name="resetpwd_step1_fail">username or email error</string>
<string name="resetpwd_step1_ok">Check success</string> <string name="resetpwd_step1_ok">Check success</string>
<string name="prompt_code">please input code</string> <string name="prompt_code">please input code</string>
@ -164,6 +162,11 @@
<string name="garbage_waste_search_ok">search success</string> <string name="garbage_waste_search_ok">search success</string>
<string name="garbage_table_name">name</string> <string name="garbage_table_name">name</string>
<string name="garbage_table_price">price</string> <string name="garbage_table_price">price</string>
<string name="register_fail_name_repeat">username repeat</string>
<string name="register_fail_mobie_repeat">mobie repeat</string>
<string name="register_fail_email_repeat">email repeat</string>
<string name="unknow_error">unknow error</string>
<string name="login_fail">login fail</string>
<!-- Strings used for fragments for navigation --> <!-- Strings used for fragments for navigation -->
<!-- Strings used for fragments for navigation --> <!-- Strings used for fragments for navigation -->

Loading…
Cancel
Save