diff --git a/app/src/main/java/com/ckkj/defense_device/login/ForgetPasswordActivity.kt b/app/src/main/java/com/ckkj/defense_device/login/ForgetPasswordActivity.kt
index 5733167..8562b0e 100644
--- a/app/src/main/java/com/ckkj/defense_device/login/ForgetPasswordActivity.kt
+++ b/app/src/main/java/com/ckkj/defense_device/login/ForgetPasswordActivity.kt
@@ -57,10 +57,10 @@ class ForgetPasswordActivity : AppCompatActivity() {
if (isPhoneNumberValid(phoneNumber)) {
sendVerificationCode(phoneNumber)
} else {
- Toast.makeText(this, "请输入有效的11位手机号", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, getString(R.string.phone_tip), Toast.LENGTH_SHORT).show()
}
} else {
- Toast.makeText(this, "请稍后再试", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, getString(R.string.please_try_later), Toast.LENGTH_SHORT).show()
}
}
@@ -86,7 +86,7 @@ class ForgetPasswordActivity : AppCompatActivity() {
val response = RetrofitNetwork.getNetworkService().getCode(phoneNumber)
withContext(Dispatchers.Main) {
if (response.code == 200) {
- Toast.makeText(this@ForgetPasswordActivity, "验证码已发送", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this@ForgetPasswordActivity, getString(R.string.code_sent_to), Toast.LENGTH_SHORT).show()
startCountDown()
} else {
Toast.makeText(this@ForgetPasswordActivity, response.msg, Toast.LENGTH_SHORT).show()
@@ -140,29 +140,30 @@ class ForgetPasswordActivity : AppCompatActivity() {
val confirmPassword = binding.etInviteCode.text.toString().trim()
if (!isPhoneNumberValid(phoneNumber)) {
- Toast.makeText(this, "手机号格式不正确", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, getString(R.string.invalid_phone), Toast.LENGTH_SHORT).show()
return
}
if (TextUtils.isEmpty(smsCode)) {
- Toast.makeText(this, "请输入验证码", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, getString(R.string.hint_code_zh), Toast.LENGTH_SHORT).show()
return
}
if (TextUtils.isEmpty(newPassword) || TextUtils.isEmpty(confirmPassword)) {
- Toast.makeText(this, "密码不能为空", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, getString(R.string.password_cannot_empty), Toast.LENGTH_SHORT).show()
return
}
if (newPassword.length < MIN_PASSWORD_LENGTH || newPassword.length > MAX_PASSWORD_LENGTH) {
- Toast.makeText(this, "密码长度需为${MIN_PASSWORD_LENGTH}-${MAX_PASSWORD_LENGTH}位", Toast.LENGTH_SHORT).show()
+ val tip = getString(R.string.pwd_length_tip, MIN_PASSWORD_LENGTH, MAX_PASSWORD_LENGTH)
+ Toast.makeText(this, tip, Toast.LENGTH_SHORT).show()
return
}
if (!newPassword.matches(Regex(".*[A-Za-z].*")) || !newPassword.matches(Regex(".*[0-9].*"))) {
- Toast.makeText(this, "密码需同时包含字母和数字", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, getString(R.string.password_letter_digit), Toast.LENGTH_SHORT).show()
return
}
if (newPassword != confirmPassword) {
- Toast.makeText(this, "两次输入的密码不一致", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, getString(R.string.password_mismatch), Toast.LENGTH_SHORT).show()
return
}
diff --git a/app/src/main/java/com/ckkj/defense_device/login/LoginActivity.kt b/app/src/main/java/com/ckkj/defense_device/login/LoginActivity.kt
index b52f782..e47c037 100644
--- a/app/src/main/java/com/ckkj/defense_device/login/LoginActivity.kt
+++ b/app/src/main/java/com/ckkj/defense_device/login/LoginActivity.kt
@@ -263,6 +263,7 @@ class LoginActivity : AppCompatActivity() {
UserinfoUtil.saveUserInfo(response.data)
Toast.makeText(this@LoginActivity, R.string.password_login_success_title, Toast.LENGTH_SHORT).show()
val intent = Intent(this@LoginActivity, HomeActivity::class.java)
+ //清除任务栈
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
startActivity(intent)
finish()
diff --git a/app/src/main/java/com/ckkj/defense_device/login/RegisterActivity.kt b/app/src/main/java/com/ckkj/defense_device/login/RegisterActivity.kt
index 522a0a7..8567b5e 100644
--- a/app/src/main/java/com/ckkj/defense_device/login/RegisterActivity.kt
+++ b/app/src/main/java/com/ckkj/defense_device/login/RegisterActivity.kt
@@ -181,7 +181,8 @@ class RegisterActivity : AppCompatActivity() {
if (response.code == 200) {
Toast.makeText(this@RegisterActivity, R.string.register_success, Toast.LENGTH_SHORT).show()
- val intent = Intent(this@RegisterActivity, LoginActivity::class.java)
+ val intent = Intent(this@RegisterActivity, RegisterSuccessActivity::class.java)
+ //清除任务栈
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
startActivity(intent)
finish()
diff --git a/app/src/main/res/drawable/shimmer_placeholder.xml b/app/src/main/res/drawable/shimmer_placeholder.xml
new file mode 100644
index 0000000..6f0c0d4
--- /dev/null
+++ b/app/src/main/res/drawable/shimmer_placeholder.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/res/mipmap-xhdpi/logo.png b/app/src/main/res/mipmap-xhdpi/logo.png
index 362c74c..39efd7e 100644
Binary files a/app/src/main/res/mipmap-xhdpi/logo.png and b/app/src/main/res/mipmap-xhdpi/logo.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/logo2.png b/app/src/main/res/mipmap-xhdpi/logo2.png
index da27509..7c20564 100644
Binary files a/app/src/main/res/mipmap-xhdpi/logo2.png and b/app/src/main/res/mipmap-xhdpi/logo2.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/logo.png b/app/src/main/res/mipmap-xxhdpi/logo.png
index 7c7c5f0..39c6a29 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/logo.png and b/app/src/main/res/mipmap-xxhdpi/logo.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/logo2.png b/app/src/main/res/mipmap-xxhdpi/logo2.png
index 44a1fdd..cd80ce6 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/logo2.png and b/app/src/main/res/mipmap-xxhdpi/logo2.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/logo.png b/app/src/main/res/mipmap-xxxhdpi/logo.png
index 05dbc42..9586a38 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/logo.png and b/app/src/main/res/mipmap-xxxhdpi/logo.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/logo2.png b/app/src/main/res/mipmap-xxxhdpi/logo2.png
index 4bf49f4..50cf156 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/logo2.png and b/app/src/main/res/mipmap-xxxhdpi/logo2.png differ
diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml
index cbc3f3e..2d5b10d 100644
--- a/app/src/main/res/values-zh/strings.xml
+++ b/app/src/main/res/values-zh/strings.xml
@@ -2,7 +2,7 @@
- 防御机
+ 驭鲲智防系统
确定
@@ -204,11 +204,11 @@
警告语音播放
警告语音内容
请输入警告语音内容,系统将自动生成语音
- 打击间隔
+ 驱离间隔
切换容器
- 打击位置
- 请点击下方人体模型,选择大致打击位置
- 确定修改为该打击位置?
+ 驱离位置
+ 请点击下方人体模型,选择大致驱离位置
+ 确定修改为该驱离位置?
提交成功
提交失败
容器1
@@ -382,6 +382,7 @@
验证码错误
密码不能为空
密码需同时包含字母和数字
+ 密码长度需为%1$d-%2$d位
两次输入的密码不一致
跳转到人脸页面
跳转到注册页面
@@ -395,8 +396,8 @@
去看一下
温馨提示
知道了
- 打击距离
- 请输入打击距离
+ 驱离距离
+ 请输入驱离距离
人脸检测失败
这里是我的昵称
设备已经运行\n%d天请及时维护
@@ -421,6 +422,7 @@
确定重设密码
获取验证码
请输入手机号
+ 请输入有效的11位手机号
请输入验证码
请输入新密码
请再次输入新密码
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index fbe81c2..02bce8f 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,7 +1,7 @@
- Defense Device
+ Yukun Intelligent Defense System
Save
@@ -33,6 +33,7 @@
I have read and agree to the
and
Registration Successful
+ Please enter a valid 11-digit mobile number
Registering...
Your account has been created successfully
Go to Login
@@ -378,6 +379,7 @@
Verification code error
Password cannot be empty
Password must contain both letters and digits
+ Password must be %1$d-%2$d characters long
Passwords do not match
Redirecting to face page
Redirecting to register page
@@ -392,13 +394,13 @@
Go check
Notice
Got it
- Strike Distance
- Enter strike distance
- Strike Interval
+ Expel Distance
+ Enter expel distance
+ Expel Interval
Switch Container
- Strike Position
- Please click the human model below to select the approximate strike position
- Confirm to modify to this strike position?
+ Expel Position
+ Please click the human model below to select the approximate expel position
+ Confirm to modify to this expel position?
Submitted successfully
Submission failed
Container 1