个人资料
This commit is contained in:
@@ -25,6 +25,24 @@
|
|||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.DefenseApplication">
|
android:theme="@style/Theme.DefenseApplication">
|
||||||
|
<activity
|
||||||
|
android:name=".personal.FaceManagementActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".personal.OperationPasswordActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".personal.RetrievePasswordActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".personal.LoginPasswordActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".personal.PasswordManagementActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".liveVideo.UserDetailsActivity"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".home.ConnectDeviceActivity"
|
android:name=".home.ConnectDeviceActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
@@ -57,12 +75,7 @@
|
|||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".liveVideo.SettingsActivity"
|
android:name=".liveVideo.SettingsActivity"
|
||||||
android:exported="true">
|
android:exported="false" />
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".liveVideo.LiveVideoActivity"
|
android:name=".liveVideo.LiveVideoActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
@@ -86,7 +99,13 @@
|
|||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".home.HomeActivity"
|
android:name=".home.HomeActivity"
|
||||||
android:exported="false"/>
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".login.RegisterSuccessActivity"
|
android:name=".login.RegisterSuccessActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import android.view.ViewGroup
|
|||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.example.defenseapplication.R
|
import com.example.defenseapplication.R
|
||||||
import com.example.defenseapplication.databinding.PersonalFragmentBinding
|
import com.example.defenseapplication.databinding.PersonalFragmentBinding
|
||||||
|
import com.example.defenseapplication.liveVideo.LinkedUserActivity
|
||||||
|
import com.example.defenseapplication.personal.PasswordManagementActivity
|
||||||
import com.example.defenseapplication.personal.PersonalProfileActivity
|
import com.example.defenseapplication.personal.PersonalProfileActivity
|
||||||
import com.example.defenseapplication.utils.LanguageUtil
|
import com.example.defenseapplication.utils.LanguageUtil
|
||||||
import com.example.defenseapplication.view.FamilySwitchDialog
|
import com.example.defenseapplication.view.FamilySwitchDialog
|
||||||
@@ -48,6 +50,14 @@ class PersonalFragment : Fragment() {
|
|||||||
binding.itemSwitchFamily.setOnClickListener {
|
binding.itemSwitchFamily.setOnClickListener {
|
||||||
showFamilySwitchDialog()
|
showFamilySwitchDialog()
|
||||||
}
|
}
|
||||||
|
binding.itemUserManage.setOnClickListener {
|
||||||
|
val intent= Intent(requireContext(), LinkedUserActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.itemPwdManage.setOnClickListener {
|
||||||
|
val intent= Intent(requireContext(), PasswordManagementActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,13 @@ class LinkedUserActivity : AppCompatActivity() {
|
|||||||
private fun initView() {
|
private fun initView() {
|
||||||
adapter = LinkedUserAdapter(
|
adapter = LinkedUserAdapter(
|
||||||
onItemClick = { user, position ->
|
onItemClick = { user, position ->
|
||||||
|
val intent = Intent(this, UserDetailsActivity::class.java).apply {
|
||||||
|
putExtra("name", user.name)
|
||||||
|
putExtra("phone", user.phone)
|
||||||
|
putExtra("idCard", user.idCard)
|
||||||
|
putExtra("time", user.time)
|
||||||
|
}
|
||||||
|
startActivity(intent)
|
||||||
},
|
},
|
||||||
onDeleteClick = { user, position ->
|
onDeleteClick = { user, position ->
|
||||||
showUnlinkDialog(user, position)
|
showUnlinkDialog(user, position)
|
||||||
|
|||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package com.example.defenseapplication.liveVideo
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.example.defenseapplication.R
|
||||||
|
import com.example.defenseapplication.databinding.UserDetailsActivityBinding
|
||||||
|
import com.example.defenseapplication.view.CustomDialogFragmentText
|
||||||
|
import com.gyf.immersionbar.ImmersionBar
|
||||||
|
|
||||||
|
//用户详情页面
|
||||||
|
class UserDetailsActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding: UserDetailsActivityBinding
|
||||||
|
|
||||||
|
private lateinit var userName: String
|
||||||
|
private lateinit var phone: String
|
||||||
|
private lateinit var idCard: String
|
||||||
|
private lateinit var time: String
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = UserDetailsActivityBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
ImmersionBar.with(this)
|
||||||
|
.statusBarDarkFont(true)
|
||||||
|
.titleBar(binding.topBar)
|
||||||
|
.init()
|
||||||
|
|
||||||
|
initData()
|
||||||
|
initView()
|
||||||
|
initListener()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initData() {
|
||||||
|
userName = intent.getStringExtra("name") ?: ""
|
||||||
|
phone = intent.getStringExtra("phone") ?: ""
|
||||||
|
idCard = intent.getStringExtra("idCard") ?: ""
|
||||||
|
time = intent.getStringExtra("time") ?: ""
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initView() {
|
||||||
|
binding.tvContactName.text = userName
|
||||||
|
binding.tvPhone.text = phone
|
||||||
|
binding.tvIdCard.text = idCard
|
||||||
|
binding.tvMacAddress.text = "AA:BB:CC:DD:EE:FF"
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initListener() {
|
||||||
|
binding.ivBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.swUserStatus.setOnCheckedChangeListener { _, isChecked ->
|
||||||
|
when (isChecked) {
|
||||||
|
true -> {
|
||||||
|
// 打开开关业务逻辑
|
||||||
|
}
|
||||||
|
false -> {
|
||||||
|
// 关闭开关业务逻辑
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.btnDelete.setOnClickListener {
|
||||||
|
showDeleteDialog()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun showDeleteDialog() {
|
||||||
|
val dialog = CustomDialogFragmentText()
|
||||||
|
dialog.setTitle(getString(R.string.tip))
|
||||||
|
dialog.setMessage(getString(R.string.confirm_delete_user))
|
||||||
|
dialog.setShowInput(false)
|
||||||
|
dialog.setPositiveText(getString(R.string.confirm))
|
||||||
|
dialog.setNegativeText(getString(R.string.cancel))
|
||||||
|
dialog.setOnConfirmListener {
|
||||||
|
finish()
|
||||||
|
// if(){
|
||||||
|
// ToastUtils.showSuccess(this, getString(R.string.wifi_connection_success)
|
||||||
|
// }else{
|
||||||
|
// ToastUtils.showError(this, getString(R.string.wifi_connection_failed))
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
dialog.show(supportFragmentManager, "DeleteUserDialog")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.example.defenseapplication.personal
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import com.example.defenseapplication.R
|
||||||
|
import com.example.defenseapplication.databinding.FaceManagementActivityBinding
|
||||||
|
import com.example.defenseapplication.databinding.LoginPasswordActivityBinding
|
||||||
|
import com.example.defenseapplication.login.FaceVerificationActivity
|
||||||
|
import com.gyf.immersionbar.ImmersionBar
|
||||||
|
|
||||||
|
//人脸管理页面
|
||||||
|
class FaceManagementActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding: FaceManagementActivityBinding
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = FaceManagementActivityBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
ImmersionBar.with(this)
|
||||||
|
.statusBarDarkFont(true)
|
||||||
|
.titleBar(binding.topBar)
|
||||||
|
.init()
|
||||||
|
|
||||||
|
binding.ivBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
binding.faceManagement.setOnClickListener {
|
||||||
|
startActivity(Intent(this, FaceVerificationActivity::class.java))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.example.defenseapplication.personal
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import com.example.defenseapplication.R
|
||||||
|
import com.example.defenseapplication.databinding.LoginPasswordActivityBinding
|
||||||
|
import com.example.defenseapplication.databinding.PasswordManagementActivityBinding
|
||||||
|
import com.gyf.immersionbar.ImmersionBar
|
||||||
|
|
||||||
|
//登录密码
|
||||||
|
class LoginPasswordActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding: LoginPasswordActivityBinding
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = LoginPasswordActivityBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
ImmersionBar.with(this)
|
||||||
|
.statusBarDarkFont(true)
|
||||||
|
.titleBar(binding.topBar)
|
||||||
|
.init()
|
||||||
|
|
||||||
|
binding.ivBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package com.example.defenseapplication.personal
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.blankj.utilcode.util.SPUtils
|
||||||
|
import com.example.defenseapplication.R
|
||||||
|
import com.example.defenseapplication.databinding.OperationPasswordActivityBinding
|
||||||
|
import com.gyf.immersionbar.ImmersionBar
|
||||||
|
|
||||||
|
//操作密码
|
||||||
|
class OperationPasswordActivity : AppCompatActivity() {
|
||||||
|
|
||||||
|
private lateinit var binding: OperationPasswordActivityBinding
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = OperationPasswordActivityBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
ImmersionBar.with(this)
|
||||||
|
.statusBarDarkFont(true)
|
||||||
|
.titleBar(binding.topBar)
|
||||||
|
.init()
|
||||||
|
|
||||||
|
initListener()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initListener() {
|
||||||
|
binding.ivBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.swOperationPassword.setOnCheckedChangeListener { _, isChecked ->
|
||||||
|
when (isChecked) {
|
||||||
|
true -> {
|
||||||
|
binding.etPassword.isEnabled = true
|
||||||
|
binding.etConfirmPassword.isEnabled = true
|
||||||
|
binding.btnConfirmReset.isEnabled = true
|
||||||
|
Toast.makeText(this, getString(R.string.operation_password_enabled), Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
false -> {
|
||||||
|
binding.etPassword.isEnabled = false
|
||||||
|
binding.etConfirmPassword.isEnabled = false
|
||||||
|
binding.btnConfirmReset.isEnabled = false
|
||||||
|
SPUtils.getInstance().remove("operation_password")
|
||||||
|
Toast.makeText(this, getString(R.string.operation_password_disabled), Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.btnConfirmReset.setOnClickListener {
|
||||||
|
val password = binding.etPassword.text.toString()
|
||||||
|
val confirmPassword = binding.etConfirmPassword.text.toString()
|
||||||
|
|
||||||
|
if (password.isEmpty()) {
|
||||||
|
Toast.makeText(this, getString(R.string.password_cannot_empty), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
if (password.length != 6) {
|
||||||
|
Toast.makeText(this, getString(R.string.password_must_be_6_digits), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
if (confirmPassword.isEmpty()) {
|
||||||
|
Toast.makeText(this, getString(R.string.please_confirm_password), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
if (password != confirmPassword) {
|
||||||
|
Toast.makeText(this, getString(R.string.password_mismatch), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
SPUtils.getInstance().put("operation_password", password)
|
||||||
|
Toast.makeText(this, getString(R.string.operation_success), Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.example.defenseapplication.personal
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.example.defenseapplication.R
|
||||||
|
import com.example.defenseapplication.databinding.PasswordManagementActivityBinding
|
||||||
|
import com.example.defenseapplication.view.PasswordInputDialog
|
||||||
|
import com.blankj.utilcode.util.SPUtils
|
||||||
|
import com.gyf.immersionbar.ImmersionBar
|
||||||
|
//密码管理
|
||||||
|
class PasswordManagementActivity : AppCompatActivity() {
|
||||||
|
|
||||||
|
private lateinit var binding: PasswordManagementActivityBinding
|
||||||
|
private lateinit var passwordDialog: PasswordInputDialog
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = PasswordManagementActivityBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
ImmersionBar.with(this)
|
||||||
|
.statusBarDarkFont(true)
|
||||||
|
.titleBar(binding.topBar)
|
||||||
|
.init()
|
||||||
|
|
||||||
|
binding.ivBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.loginPassword.setOnClickListener {
|
||||||
|
startActivity(Intent(this, LoginPasswordActivity::class.java))
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.retrievePassword.setOnClickListener {
|
||||||
|
startActivity(Intent(this, RetrievePasswordActivity::class.java))
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.operationPassword.setOnClickListener {
|
||||||
|
showPasswordDialog()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showPasswordDialog() {
|
||||||
|
passwordDialog = PasswordInputDialog(this).apply {
|
||||||
|
setOnConfirmListener { inputPassword ->
|
||||||
|
val savedPassword = SPUtils.getInstance().getString("operation_password", "111111")
|
||||||
|
if (savedPassword.isEmpty()) {
|
||||||
|
Toast.makeText(this@PasswordManagementActivity, getString(R.string.operation_password_not_set), Toast.LENGTH_SHORT).show()
|
||||||
|
dismiss()
|
||||||
|
return@setOnConfirmListener
|
||||||
|
}
|
||||||
|
if (inputPassword == savedPassword) {
|
||||||
|
startActivity(Intent(this@PasswordManagementActivity, OperationPasswordActivity::class.java))
|
||||||
|
dismiss()
|
||||||
|
} else {
|
||||||
|
showError(getString(R.string.password_error))
|
||||||
|
clearPassword()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setOnDismissListener {
|
||||||
|
// Dialog dismissed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
passwordDialog.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
if (::passwordDialog.isInitialized) {
|
||||||
|
passwordDialog.dismiss()
|
||||||
|
}
|
||||||
|
super.onDestroy()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
package com.example.defenseapplication.personal
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.os.CountDownTimer
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.example.defenseapplication.R
|
||||||
|
import com.example.defenseapplication.databinding.RetrievePasswordActivityBinding
|
||||||
|
import com.gyf.immersionbar.ImmersionBar
|
||||||
|
|
||||||
|
//找回密码页面
|
||||||
|
class RetrievePasswordActivity : AppCompatActivity() {
|
||||||
|
|
||||||
|
private lateinit var binding: RetrievePasswordActivityBinding
|
||||||
|
private var countDownTimer: CountDownTimer? = null
|
||||||
|
private var isCountingDown = false
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = RetrievePasswordActivityBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
ImmersionBar.with(this)
|
||||||
|
.statusBarDarkFont(true)
|
||||||
|
.titleBar(binding.topBar)
|
||||||
|
.init()
|
||||||
|
|
||||||
|
initListener()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initListener() {
|
||||||
|
binding.ivBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.btnGetCode.setOnClickListener {
|
||||||
|
val phoneNumber = binding.etPhoneNumber.text.toString()
|
||||||
|
|
||||||
|
if (phoneNumber.isEmpty()) {
|
||||||
|
Toast.makeText(this, getString(R.string.enter_phone_number), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
if (phoneNumber.length != 11) {
|
||||||
|
Toast.makeText(this, getString(R.string.phone_format_invalid), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
startCountdown()
|
||||||
|
Toast.makeText(this, String.format(getString(R.string.code_sent_to), phoneNumber), Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.btnConfirmReset.setOnClickListener {
|
||||||
|
val phoneNumber = binding.etPhoneNumber.text.toString()
|
||||||
|
val verificationCode = binding.etVerificationCode.text.toString()
|
||||||
|
val newPassword = binding.etNewPassword.text.toString()
|
||||||
|
val confirmPassword = binding.etConfirmPassword.text.toString()
|
||||||
|
|
||||||
|
if (phoneNumber.isEmpty()) {
|
||||||
|
Toast.makeText(this, getString(R.string.enter_phone_number), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
if (phoneNumber.length != 11) {
|
||||||
|
Toast.makeText(this, getString(R.string.phone_format_invalid), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
if (verificationCode.isEmpty()) {
|
||||||
|
Toast.makeText(this, getString(R.string.enter_verification_code_pls), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
if (verificationCode.length != 6) {
|
||||||
|
Toast.makeText(this, getString(R.string.verification_code_error), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newPassword.isEmpty()) {
|
||||||
|
Toast.makeText(this, getString(R.string.password_cannot_empty), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newPassword.length < 6 || newPassword.length > 20) {
|
||||||
|
Toast.makeText(this, getString(R.string.password_requirement), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
if (confirmPassword.isEmpty()) {
|
||||||
|
Toast.makeText(this, getString(R.string.enter_password_again), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newPassword != confirmPassword) {
|
||||||
|
Toast.makeText(this, getString(R.string.password_mismatch), Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
Toast.makeText(this, getString(R.string.reset_success), Toast.LENGTH_SHORT).show()
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun startCountdown() {
|
||||||
|
isCountingDown = true
|
||||||
|
binding.btnGetCode.isEnabled = false
|
||||||
|
|
||||||
|
countDownTimer = object : CountDownTimer(60000, 1000) {
|
||||||
|
override fun onTick(millisUntilFinished: Long) {
|
||||||
|
val seconds = millisUntilFinished / 1000
|
||||||
|
binding.btnGetCode.text = String.format(getString(R.string.countdown_retry), seconds)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFinish() {
|
||||||
|
isCountingDown = false
|
||||||
|
binding.btnGetCode.isEnabled = true
|
||||||
|
binding.btnGetCode.text = getString(R.string.get_verification_code)
|
||||||
|
}
|
||||||
|
}.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
countDownTimer?.cancel()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
package com.example.defenseapplication.view
|
||||||
|
|
||||||
|
import android.app.Dialog
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.graphics.drawable.ColorDrawable
|
||||||
|
import android.view.Gravity
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.WindowManager
|
||||||
|
import android.widget.EditText
|
||||||
|
import com.example.defenseapplication.R
|
||||||
|
import com.example.defenseapplication.databinding.DialogPasswordInputBinding
|
||||||
|
|
||||||
|
class PasswordInputDialog(context: Context) : Dialog(context) {
|
||||||
|
|
||||||
|
private lateinit var binding: DialogPasswordInputBinding
|
||||||
|
private var onConfirmListener: ((String) -> Unit)? = null
|
||||||
|
private var onDismissListener: (() -> Unit)? = null
|
||||||
|
|
||||||
|
init {
|
||||||
|
initView()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initView() {
|
||||||
|
binding = DialogPasswordInputBinding.inflate(LayoutInflater.from(context))
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
window?.apply {
|
||||||
|
setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||||
|
val params = attributes
|
||||||
|
params.gravity = Gravity.CENTER
|
||||||
|
params.width = WindowManager.LayoutParams.MATCH_PARENT
|
||||||
|
params.height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||||
|
params.horizontalMargin = 40f
|
||||||
|
attributes = params
|
||||||
|
}
|
||||||
|
|
||||||
|
setupPasswordInput()
|
||||||
|
|
||||||
|
binding.btnCancel.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.btnConfirm.setOnClickListener {
|
||||||
|
val password = getPassword()
|
||||||
|
if (password.length == 6) {
|
||||||
|
onConfirmListener?.invoke(password)
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupPasswordInput() {
|
||||||
|
val editTexts = listOf(
|
||||||
|
binding.etPassword1,
|
||||||
|
binding.etPassword2,
|
||||||
|
binding.etPassword3,
|
||||||
|
binding.etPassword4,
|
||||||
|
binding.etPassword5,
|
||||||
|
binding.etPassword6
|
||||||
|
)
|
||||||
|
|
||||||
|
editTexts.forEachIndexed { index, editText ->
|
||||||
|
editText.setOnKeyListener { _, _, _ ->
|
||||||
|
if (editText.text.isNotEmpty()) {
|
||||||
|
if (index < editTexts.size - 1) {
|
||||||
|
editTexts[index + 1].requestFocus()
|
||||||
|
} else {
|
||||||
|
editText.clearFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
editText.setOnFocusChangeListener { v, hasFocus ->
|
||||||
|
if (hasFocus) {
|
||||||
|
(v as EditText).setSelection((v.text?.length ?: 0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getPassword(): String {
|
||||||
|
return binding.etPassword1.text.toString() +
|
||||||
|
binding.etPassword2.text.toString() +
|
||||||
|
binding.etPassword3.text.toString() +
|
||||||
|
binding.etPassword4.text.toString() +
|
||||||
|
binding.etPassword5.text.toString() +
|
||||||
|
binding.etPassword6.text.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setOnConfirmListener(listener: (String) -> Unit): PasswordInputDialog {
|
||||||
|
this.onConfirmListener = listener
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setOnDismissListener(listener: () -> Unit): PasswordInputDialog {
|
||||||
|
this.onDismissListener = listener
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
fun showError(message: String) {
|
||||||
|
binding.tvError.text = message
|
||||||
|
binding.tvError.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
|
||||||
|
fun clearError() {
|
||||||
|
binding.tvError.visibility = View.GONE
|
||||||
|
binding.tvError.text = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
fun clearPassword() {
|
||||||
|
binding.etPassword1.text?.clear()
|
||||||
|
binding.etPassword2.text?.clear()
|
||||||
|
binding.etPassword3.text?.clear()
|
||||||
|
binding.etPassword4.text?.clear()
|
||||||
|
binding.etPassword5.text?.clear()
|
||||||
|
binding.etPassword6.text?.clear()
|
||||||
|
binding.etPassword1.requestFocus()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun dismiss() {
|
||||||
|
super.dismiss()
|
||||||
|
onDismissListener?.invoke()
|
||||||
|
}
|
||||||
|
}
|
||||||
15
app/src/main/res/drawable/btn_selector_cyan.xml
Normal file
15
app/src/main/res/drawable/btn_selector_cyan.xml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_pressed="true">
|
||||||
|
<shape>
|
||||||
|
<solid android:color="#00B39D" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<solid android:color="#00C4AA" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
9
app/src/main/res/drawable/password_input_bg.xml
Normal file
9
app/src/main/res/drawable/password_input_bg.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="@color/white" />
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="@color/gray" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
</shape>
|
||||||
169
app/src/main/res/layout/dialog_password_input.xml
Normal file
169
app/src/main/res/layout/dialog_password_input.xml
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/round_bg"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="24dp"
|
||||||
|
android:paddingTop="32dp"
|
||||||
|
android:paddingEnd="24dp"
|
||||||
|
android:paddingBottom="28dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/operation_password"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_password_input"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="6">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_password_1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginHorizontal="4dp"
|
||||||
|
android:background="@drawable/password_input_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:inputType="numberPassword"
|
||||||
|
android:maxLength="1"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_password_2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginHorizontal="4dp"
|
||||||
|
android:background="@drawable/password_input_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:inputType="numberPassword"
|
||||||
|
android:maxLength="1"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_password_3"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginHorizontal="4dp"
|
||||||
|
android:background="@drawable/password_input_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:inputType="numberPassword"
|
||||||
|
android:maxLength="1"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_password_4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginHorizontal="4dp"
|
||||||
|
android:background="@drawable/password_input_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:inputType="numberPassword"
|
||||||
|
android:maxLength="1"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_password_5"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginHorizontal="4dp"
|
||||||
|
android:background="@drawable/password_input_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:inputType="numberPassword"
|
||||||
|
android:maxLength="1"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_password_6"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginHorizontal="4dp"
|
||||||
|
android:background="@drawable/password_input_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:inputType="numberPassword"
|
||||||
|
android:maxLength="1"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_error"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:textColor="@color/red"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/dialog_view" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btn_cancel"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/cancel"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/dialog_view" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btn_confirm"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/confirm"
|
||||||
|
android:textColor="@color/green"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
61
app/src/main/res/layout/face_management_activity.xml
Normal file
61
app/src/main/res/layout/face_management_activity.xml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".personal.FaceManagementActivity">
|
||||||
|
<!-- 标题栏 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/topBar"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivBack"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/login_password"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/face_management"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="16dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/face_management"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp" />
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:src="@drawable/right_back" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
109
app/src/main/res/layout/login_password_activity.xml
Normal file
109
app/src/main/res/layout/login_password_activity.xml
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/message_bg"
|
||||||
|
android:padding="16dp"
|
||||||
|
tools:context=".personal.LoginPasswordActivity">
|
||||||
|
|
||||||
|
<!-- 标题栏 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/topBar"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivBack"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/login_password"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 旧密码输入框 -->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etOldPassword"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:background="@drawable/textinput_white_bg"
|
||||||
|
android:hint="@string/enter_old_password"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textColorHint="@color/gray"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/topBar" />
|
||||||
|
|
||||||
|
<!-- 新密码输入框 -->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etNewPassword"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/textinput_white_bg"
|
||||||
|
android:hint="@string/enter_new_password"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textColorHint="@color/gray"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/etOldPassword" />
|
||||||
|
|
||||||
|
<!-- 再次输入新密码输入框 -->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etConfirmPassword"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/textinput_white_bg"
|
||||||
|
android:hint="@string/enter_password_again"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textColorHint="@color/gray"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/etNewPassword" />
|
||||||
|
|
||||||
|
<!-- 确定重设密码按钮 -->
|
||||||
|
<android.widget.Button
|
||||||
|
android:id="@+id/btnConfirm"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:background="@drawable/rounded_blue_bg"
|
||||||
|
android:text="@string/confirm_reset_password"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/etConfirmPassword" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
121
app/src/main/res/layout/operation_password_activity.xml
Normal file
121
app/src/main/res/layout/operation_password_activity.xml
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@color/message_bg"
|
||||||
|
tools:context=".personal.OperationPasswordActivity">
|
||||||
|
|
||||||
|
<!-- 标题栏 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/topBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingHorizontal="16dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivBack"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/operation_password"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 操作密码开关 -->
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/operation_password_switch"
|
||||||
|
android:textSize="14dp"/>
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:id="@+id/swOperationPassword"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:thumb="@drawable/thumb_switch_white"
|
||||||
|
android:track="@drawable/track_selector" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- 分割线 -->
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1px"
|
||||||
|
android:background="@color/gray_divider"/>
|
||||||
|
|
||||||
|
<!-- 内容区域 -->
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- 密码输入框 -->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etPassword"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:background="@drawable/textinput_white_bg"
|
||||||
|
android:hint="@string/hint_operation_password"
|
||||||
|
android:inputType="numberPassword"
|
||||||
|
android:maxLength="6"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textColorHint="@color/gray"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<!-- 确认密码输入框 -->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etConfirmPassword"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/textinput_white_bg"
|
||||||
|
android:hint="@string/hint_confirm_password"
|
||||||
|
android:inputType="numberPassword"
|
||||||
|
android:maxLength="6"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textColorHint="@color/gray"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<!-- 确定重设密码按钮 -->
|
||||||
|
<android.widget.Button
|
||||||
|
android:id="@+id/btnConfirmReset"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:background="@drawable/rounded_blue_bg"
|
||||||
|
android:text="@string/confirm_reset_password_btn"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
104
app/src/main/res/layout/password_management_activity.xml
Normal file
104
app/src/main/res/layout/password_management_activity.xml
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@color/white"
|
||||||
|
tools:context=".personal.PasswordManagementActivity">
|
||||||
|
|
||||||
|
<!-- 标题栏 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/topBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingHorizontal="16dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivBack"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/password_management"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/login_password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="16dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/login_password"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp" />
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:src="@drawable/right_back" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/retrieve_password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="16dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/retrieve_password"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp" />
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:src="@drawable/right_back" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/operation_password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="16dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/operation_password"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp" />
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:src="@drawable/right_back" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
139
app/src/main/res/layout/retrieve_password_activity.xml
Normal file
139
app/src/main/res/layout/retrieve_password_activity.xml
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@color/message_bg"
|
||||||
|
tools:context=".personal.RetrievePasswordActivity">
|
||||||
|
|
||||||
|
<!-- 标题栏 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/topBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingHorizontal="16dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivBack"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/retrieve_password"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 内容区域 -->
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- 手机号输入框 -->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etPhoneNumber"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:background="@drawable/textinput_white_bg"
|
||||||
|
android:hint="@string/hint_phone_zh"
|
||||||
|
android:inputType="phone"
|
||||||
|
android:maxLength="11"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textColorHint="@color/gray"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<!-- 验证码输入框和获取按钮 -->
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/textinput_white_bg">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etVerificationCode"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_toLeftOf="@+id/btnGetCode"
|
||||||
|
android:hint="@string/hint_code_zh"
|
||||||
|
android:inputType="number"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:background="@null"
|
||||||
|
android:textColorHint="@color/gray"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<android.widget.Button
|
||||||
|
android:id="@+id/btnGetCode"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:background="@drawable/rounded_blue_bg"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:text="@string/get_verification_code"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- 新密码输入框 -->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etNewPassword"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/textinput_white_bg"
|
||||||
|
android:hint="@string/hint_new_password_zh"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textColorHint="@color/gray"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<!-- 确认密码输入框 -->
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etConfirmPassword"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/textinput_white_bg"
|
||||||
|
android:hint="@string/hint_confirm_password_zh"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textColorHint="@color/gray"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<!-- 确定重设密码按钮 -->
|
||||||
|
<android.widget.Button
|
||||||
|
android:id="@+id/btnConfirmReset"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:background="@drawable/rounded_blue_bg"
|
||||||
|
android:text="@string/confirm_reset_password_btn"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
188
app/src/main/res/layout/user_details_activity.xml
Normal file
188
app/src/main/res/layout/user_details_activity.xml
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@color/white"
|
||||||
|
tools:context=".liveVideo.UserDetailsActivity">
|
||||||
|
|
||||||
|
<!-- 标题栏 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/topBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingHorizontal="16dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivBack"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/user_details"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 用户状态 -->
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/user_status"
|
||||||
|
android:textSize="14dp"/>
|
||||||
|
<!-- 原生Switch开关 -->
|
||||||
|
<Switch
|
||||||
|
android:id="@+id/swUserStatus"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:thumb="@drawable/thumb_switch_white"
|
||||||
|
android:track="@drawable/track_selector" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- 分割线 -->
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1px"
|
||||||
|
android:background="@color/gray_divider"/>
|
||||||
|
|
||||||
|
<!-- 联系人姓名 -->
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/contact_name"
|
||||||
|
android:textSize="14dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvContactName"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:textColor="@color/black"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- 分割线 -->
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1px"
|
||||||
|
android:background="@color/gray_divider"/>
|
||||||
|
|
||||||
|
<!-- 打击距离(电话) -->
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/strike_distance"
|
||||||
|
android:textSize="14dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvPhone"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:textColor="@color/black"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- 分割线 -->
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1px"
|
||||||
|
android:background="@color/gray_divider"/>
|
||||||
|
|
||||||
|
<!-- 身份证号 -->
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/id_card"
|
||||||
|
android:textSize="14dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvIdCard"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:textColor="@color/black"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- 分割线 -->
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1px"
|
||||||
|
android:background="@color/gray_divider"/>
|
||||||
|
|
||||||
|
<!-- MAC地址 -->
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/mac_address"
|
||||||
|
android:textSize="14dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvMacAddress"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:textColor="@color/black"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- 删除按钮 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="bottom"
|
||||||
|
android:layout_marginBottom="40dp"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<android.widget.Button
|
||||||
|
android:id="@+id/btnDelete"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:text="@string/delete"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:background="@drawable/rounded_blue_bg"
|
||||||
|
android:padding="0dp"
|
||||||
|
android:layout_margin="0dp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -174,6 +174,7 @@
|
|||||||
<string name="chinese">中文</string>
|
<string name="chinese">中文</string>
|
||||||
<string name="english">English</string>
|
<string name="english">English</string>
|
||||||
<string name="linked_user">关联用户</string>
|
<string name="linked_user">关联用户</string>
|
||||||
|
<string name="user_details">用户详情</string>
|
||||||
<string name="search">搜索</string>
|
<string name="search">搜索</string>
|
||||||
<string name="search_preset_text">搜索预设文案</string>
|
<string name="search_preset_text">搜索预设文案</string>
|
||||||
<string name="add_linked_user">添加关联用户</string>
|
<string name="add_linked_user">添加关联用户</string>
|
||||||
@@ -249,6 +250,7 @@
|
|||||||
<string name="operation_failed">操作失败</string>
|
<string name="operation_failed">操作失败</string>
|
||||||
<string name="network_unavailable">网络不可用</string>
|
<string name="network_unavailable">网络不可用</string>
|
||||||
<string name="check_network">请检查网络连接</string>
|
<string name="check_network">请检查网络连接</string>
|
||||||
|
<string name="confirm_delete_user">确定删除该用户吗?</string>
|
||||||
|
|
||||||
<!-- Voice Recognition Mode -->
|
<!-- Voice Recognition Mode -->
|
||||||
<string name="recognition_mode">识别模式</string>
|
<string name="recognition_mode">识别模式</string>
|
||||||
@@ -305,7 +307,9 @@
|
|||||||
<string name="face_collection">人脸采集</string>
|
<string name="face_collection">人脸采集</string>
|
||||||
<string name="face_in_circle">请将人脸放入圆形区域内</string>
|
<string name="face_in_circle">请将人脸放入圆形区域内</string>
|
||||||
<string name="collect_face">采集人脸</string>
|
<string name="collect_face">采集人脸</string>
|
||||||
|
<string name="login_password">登录密码</string>
|
||||||
<string name="retrieve_password">找回密码</string>
|
<string name="retrieve_password">找回密码</string>
|
||||||
|
<string name="operation_password">操作密码</string>
|
||||||
<string name="enter_phone_number">请输入手机号</string>
|
<string name="enter_phone_number">请输入手机号</string>
|
||||||
<string name="enter_verification_code">请输入验证码</string>
|
<string name="enter_verification_code">请输入验证码</string>
|
||||||
<string name="send_code">发送验证码</string>
|
<string name="send_code">发送验证码</string>
|
||||||
@@ -375,4 +379,21 @@
|
|||||||
<string name="modify_phone">修改手机号</string>
|
<string name="modify_phone">修改手机号</string>
|
||||||
<string name="invalid_phone">手机号格式不正确</string>
|
<string name="invalid_phone">手机号格式不正确</string>
|
||||||
<string name="verify_and_bind">验证并绑定</string>
|
<string name="verify_and_bind">验证并绑定</string>
|
||||||
|
<string name="operation_password_switch">操作密码开关</string>
|
||||||
|
<string name="hint_operation_password">请输入6位数字密码</string>
|
||||||
|
<string name="hint_confirm_password">请确认密码</string>
|
||||||
|
<string name="operation_password_enabled">操作密码已开启</string>
|
||||||
|
<string name="operation_password_disabled">操作密码已关闭</string>
|
||||||
|
<string name="password_must_be_6_digits">密码必须为6位数字</string>
|
||||||
|
<string name="please_confirm_password">请确认密码</string>
|
||||||
|
<string name="confirm_reset_password">确定重设密码</string>
|
||||||
|
<string name="get_verification_code">获取验证码</string>
|
||||||
|
<string name="hint_phone_zh">请输入手机号</string>
|
||||||
|
<string name="hint_code_zh">请输入验证码</string>
|
||||||
|
<string name="hint_new_password_zh">请输入新密码</string>
|
||||||
|
<string name="hint_confirm_password_zh">请再次输入新密码</string>
|
||||||
|
<string name="enter_old_password">请输入旧密码</string>
|
||||||
|
<string name="password_error">密码错误</string>
|
||||||
|
<string name="operation_password_not_set">未设置操作密码</string>
|
||||||
|
<string name="confirm_reset_password_btn">确认重置</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -18,5 +18,6 @@
|
|||||||
<color name="setting_gray">#F3F3F3</color>
|
<color name="setting_gray">#F3F3F3</color>
|
||||||
<color name="ic_blake">#111111</color>
|
<color name="ic_blake">#111111</color>
|
||||||
<color name="green_light">#E8F7F7</color>
|
<color name="green_light">#E8F7F7</color>
|
||||||
|
<color name="gray_divider">#E5E5E5</color>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -166,6 +166,7 @@
|
|||||||
<string name="chinese">Chinese</string>
|
<string name="chinese">Chinese</string>
|
||||||
<string name="english">English</string>
|
<string name="english">English</string>
|
||||||
<string name="linked_user">Linked user</string>
|
<string name="linked_user">Linked user</string>
|
||||||
|
<string name="user_details">User Details</string>
|
||||||
<string name="search">search</string>
|
<string name="search">search</string>
|
||||||
<string name="search_preset_text">Search preset text</string>
|
<string name="search_preset_text">Search preset text</string>
|
||||||
<string name="add_linked_user">Add linked user</string>
|
<string name="add_linked_user">Add linked user</string>
|
||||||
@@ -224,6 +225,7 @@
|
|||||||
<string name="operation_failed">Operation failed</string>
|
<string name="operation_failed">Operation failed</string>
|
||||||
<string name="network_unavailable">Network unavailable</string>
|
<string name="network_unavailable">Network unavailable</string>
|
||||||
<string name="check_network">Please check your network connection</string>
|
<string name="check_network">Please check your network connection</string>
|
||||||
|
<string name="confirm_delete_user">Are you sure to delete this user?</string>
|
||||||
|
|
||||||
<!-- Voice Recognition Mode -->
|
<!-- Voice Recognition Mode -->
|
||||||
<string name="recognition_mode">Recognition Mode</string>
|
<string name="recognition_mode">Recognition Mode</string>
|
||||||
@@ -242,6 +244,10 @@
|
|||||||
|
|
||||||
<!-- Additional missing strings -->
|
<!-- Additional missing strings -->
|
||||||
<string name="scan_device_qr">Please scan the QR code on the device or manual</string>
|
<string name="scan_device_qr">Please scan the QR code on the device or manual</string>
|
||||||
|
<string name="user_status">用户状态</string>
|
||||||
|
<string name="contact_name">联系人姓名</string>
|
||||||
|
<string name="id_card">身份证号</string>
|
||||||
|
<string name="mac_address">MAC地址</string>
|
||||||
<string name="workshop">Workshop</string>
|
<string name="workshop">Workshop</string>
|
||||||
<string name="parents_home">Parents Home</string>
|
<string name="parents_home">Parents Home</string>
|
||||||
<string name="smart_hanging_defense">Smart Hanging Defense</string>
|
<string name="smart_hanging_defense">Smart Hanging Defense</string>
|
||||||
@@ -290,7 +296,12 @@
|
|||||||
<string name="face_collection">Face Collection</string>
|
<string name="face_collection">Face Collection</string>
|
||||||
<string name="face_in_circle">Please align your face within the circular area</string>
|
<string name="face_in_circle">Please align your face within the circular area</string>
|
||||||
<string name="collect_face">Collect Face</string>
|
<string name="collect_face">Collect Face</string>
|
||||||
|
<string name="login_password">Login Password</string>
|
||||||
|
<string name="enter_old_password">Enter old password</string>
|
||||||
|
<string name="confirm_reset_password">Confirm Reset Password</string>
|
||||||
<string name="retrieve_password">Retrieve Password</string>
|
<string name="retrieve_password">Retrieve Password</string>
|
||||||
|
<string name="operation_password">Operation Password</string>
|
||||||
|
|
||||||
<string name="enter_phone_number">Enter phone number</string>
|
<string name="enter_phone_number">Enter phone number</string>
|
||||||
<string name="enter_verification_code">Enter verification code</string>
|
<string name="enter_verification_code">Enter verification code</string>
|
||||||
<string name="send_code">Send Code</string>
|
<string name="send_code">Send Code</string>
|
||||||
@@ -380,4 +391,19 @@
|
|||||||
<string name="code_sent_to">Verification code sent to %s</string>
|
<string name="code_sent_to">Verification code sent to %s</string>
|
||||||
<string name="sms_login_success_title">Login successful</string>
|
<string name="sms_login_success_title">Login successful</string>
|
||||||
<string name="password_login_success_title">Login successful</string>
|
<string name="password_login_success_title">Login successful</string>
|
||||||
|
<string name="operation_password_switch">Operation Password Switch</string>
|
||||||
|
<string name="hint_operation_password">Please enter a 6-digit numeric password</string>
|
||||||
|
<string name="hint_confirm_password">Please confirm your password</string>
|
||||||
|
<string name="operation_password_enabled">Operation password enabled</string>
|
||||||
|
<string name="operation_password_disabled">Operation password disabled</string>
|
||||||
|
<string name="password_must_be_6_digits">Password must be 6 digits</string>
|
||||||
|
<string name="please_confirm_password">Please confirm your password</string>
|
||||||
|
<string name="password_error">Password error</string>
|
||||||
|
<string name="operation_password_not_set">Operation password not set</string>
|
||||||
|
<string name="get_verification_code">Get Verification Code</string>
|
||||||
|
<string name="hint_phone_zh">Please enter your phone number</string>
|
||||||
|
<string name="hint_code_zh">Please enter verification code</string>
|
||||||
|
<string name="hint_new_password_zh">Please enter new password</string>
|
||||||
|
<string name="hint_confirm_password_zh">Please re-enter new password</string>
|
||||||
|
<string name="confirm_reset_password_btn">Confirm Reset</string>
|
||||||
</resources>
|
</resources>
|
||||||
Reference in New Issue
Block a user