个人碎片页面的注销账号和设置页面
This commit is contained in:
@@ -28,6 +28,12 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.DefenseApplication">
|
||||
<activity
|
||||
android:name=".personal.CancelAccountActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".personal.SettingsMenusActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".home.StartActivity"
|
||||
android:exported="true">
|
||||
@@ -122,8 +128,7 @@
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".home.HomeActivity"
|
||||
android:exported="false">
|
||||
</activity>
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".login.RegisterSuccessActivity"
|
||||
android:exported="false" />
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.ckkj.defense_device.liveVideo.LinkedUserActivity
|
||||
import com.ckkj.defense_device.personal.FaceManagementActivity
|
||||
import com.ckkj.defense_device.personal.PasswordManagementActivity
|
||||
import com.ckkj.defense_device.personal.PersonalProfileActivity
|
||||
import com.ckkj.defense_device.personal.SettingsMenusActivity
|
||||
import com.ckkj.defense_device.utils.AppLanguage
|
||||
import com.ckkj.defense_device.utils.LanguageUtil
|
||||
import com.ckkj.defense_device.utils.RetrofitNetwork
|
||||
@@ -52,7 +53,7 @@ class PersonalFragment : Fragment() {
|
||||
.load("")
|
||||
.circleCrop()
|
||||
.into(binding.ivAvatar)
|
||||
binding.headerLayout.setOnClickListener {
|
||||
binding.ivAvatar.setOnClickListener {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
try {
|
||||
val response = RetrofitNetwork.getNetworkService().getUserInfo()
|
||||
@@ -132,6 +133,10 @@ class PersonalFragment : Fragment() {
|
||||
}
|
||||
dialog.show(childFragmentManager, "logout_dialog")
|
||||
}
|
||||
binding.ivMenu.setOnClickListener {
|
||||
val intent = Intent(requireContext(), SettingsMenusActivity::class.java)
|
||||
startActivity(intent)
|
||||
}
|
||||
fetchCurrentFamily()
|
||||
return binding.root
|
||||
}
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
package com.ckkj.defense_device.personal
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.os.CountDownTimer
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.ckkj.defense_device.R
|
||||
import com.ckkj.defense_device.databinding.CancelAccountActivityBinding
|
||||
import com.ckkj.defense_device.login.LoginActivity
|
||||
import com.ckkj.defense_device.utils.RetrofitNetwork
|
||||
import com.ckkj.defense_device.utils.UserinfoUtil
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class CancelAccountActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var binding: CancelAccountActivityBinding
|
||||
private var countDownTimer: CountDownTimer? = null
|
||||
private var phoneNumber: String = ""
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = CancelAccountActivityBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
ImmersionBar.with(this)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(binding.topBar)
|
||||
.init()
|
||||
|
||||
getUserInfo()
|
||||
initListener()
|
||||
}
|
||||
|
||||
private fun getUserInfo() {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
try {
|
||||
val response = RetrofitNetwork.getNetworkService().getUserInfo()
|
||||
withContext(Dispatchers.Main) {
|
||||
if (response.code == 200 && response.data != null) {
|
||||
phoneNumber = response.data?.phonenumber ?: ""
|
||||
binding.tvPhoneNumber.text = maskPhoneNumber(phoneNumber)
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
withContext(Dispatchers.Main) {
|
||||
Toast.makeText(this@CancelAccountActivity, R.string.network_error, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun maskPhoneNumber(phone: String): String {
|
||||
if (phone.length != 11) {
|
||||
return phone
|
||||
}
|
||||
return phone.substring(0, 3) + "****" + phone.substring(7)
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
binding.ivBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
|
||||
binding.btnSendCode.setOnClickListener {
|
||||
if (phoneNumber.isEmpty()) {
|
||||
Toast.makeText(this, R.string.get_user_info_fail, Toast.LENGTH_SHORT).show()
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
if (phoneNumber.length != 11) {
|
||||
Toast.makeText(this, R.string.phone_format_invalid, Toast.LENGTH_SHORT).show()
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
sendVerificationCode(phoneNumber)
|
||||
}
|
||||
|
||||
binding.btnCancelAccount.setOnClickListener {
|
||||
val verificationCode = binding.etVerificationCode.text.toString()
|
||||
|
||||
if (verificationCode.isEmpty()) {
|
||||
Toast.makeText(this, R.string.enter_verification_code_pls, Toast.LENGTH_SHORT).show()
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
if (verificationCode.length != 6) {
|
||||
Toast.makeText(this, R.string.verification_code_error, Toast.LENGTH_SHORT).show()
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
cancelAccount(verificationCode)
|
||||
}
|
||||
}
|
||||
|
||||
private fun sendVerificationCode(phone: String) {
|
||||
binding.btnSendCode.isEnabled = false
|
||||
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
try {
|
||||
val response = RetrofitNetwork.getNetworkService().getCode(phone)
|
||||
withContext(Dispatchers.Main) {
|
||||
if (response.code == 200) {
|
||||
Toast.makeText(this@CancelAccountActivity, getString(R.string.code_sent_to, phone), Toast.LENGTH_SHORT).show()
|
||||
startCountdown()
|
||||
} else {
|
||||
binding.btnSendCode.isEnabled = true
|
||||
Toast.makeText(this@CancelAccountActivity, response.msg, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
withContext(Dispatchers.Main) {
|
||||
binding.btnSendCode.isEnabled = true
|
||||
Toast.makeText(this@CancelAccountActivity, R.string.network_error, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun startCountdown() {
|
||||
countDownTimer = object : CountDownTimer(60000, 1000) {
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
binding.btnSendCode.text = getString(R.string.countdown_retry, millisUntilFinished / 1000)
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
binding.btnSendCode.text = getString(R.string.resend_code)
|
||||
binding.btnSendCode.isEnabled = true
|
||||
countDownTimer = null
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
private fun cancelAccount(verificationCode: String) {
|
||||
binding.btnCancelAccount.isEnabled = false
|
||||
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
try {
|
||||
val response = RetrofitNetwork.getNetworkService().logout()
|
||||
withContext(Dispatchers.Main) {
|
||||
binding.btnCancelAccount.isEnabled = true
|
||||
if (response.code == 200) {
|
||||
UserinfoUtil.clearUserInfo()
|
||||
Toast.makeText(this@CancelAccountActivity, getString(R.string.cancel_account), Toast.LENGTH_SHORT).show()
|
||||
val intent = Intent(this@CancelAccountActivity, LoginActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
startActivity(intent)
|
||||
finish()
|
||||
} else {
|
||||
Toast.makeText(this@CancelAccountActivity, response.msg, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
withContext(Dispatchers.Main) {
|
||||
binding.btnCancelAccount.isEnabled = true
|
||||
Toast.makeText(this@CancelAccountActivity, R.string.network_error, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
countDownTimer?.cancel()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ckkj.defense_device.personal
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.widget.Toast
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.ckkj.defense_device.databinding.SettingsMenusActivityBinding
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
|
||||
class SettingsMenusActivity : AppCompatActivity() {
|
||||
private lateinit var binding: SettingsMenusActivityBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
enableEdgeToEdge()
|
||||
binding = SettingsMenusActivityBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
ImmersionBar.with(this)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(binding.topBar)
|
||||
.init()
|
||||
|
||||
|
||||
val versionName = packageManager.getPackageInfo(packageName, 0).versionName
|
||||
binding.tvVersion.text = versionName
|
||||
|
||||
setupClickListeners()
|
||||
}
|
||||
|
||||
private fun setupClickListeners() {
|
||||
// 返回按钮
|
||||
binding.ivBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
|
||||
// 检查更新
|
||||
binding.itemCheckUpdate.setOnClickListener {
|
||||
Toast.makeText(this, "正在检查更新...", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
// 清除缓存
|
||||
binding.itemClearCache.setOnClickListener {
|
||||
Toast.makeText(this, "缓存已清除", Toast.LENGTH_SHORT).show()
|
||||
binding.tvCacheSize.text = "0 KB"
|
||||
}
|
||||
|
||||
// 用户协议
|
||||
binding.itemUserAgreement.setOnClickListener {
|
||||
|
||||
}
|
||||
|
||||
// 隐私政策
|
||||
binding.itemPrivacyPolicy.setOnClickListener {
|
||||
|
||||
}
|
||||
|
||||
// 注销账号
|
||||
binding.itemLogout.setOnClickListener {
|
||||
val intent = Intent(this, CancelAccountActivity::class.java)
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
}
|
||||
15
app/src/main/res/drawable/btn_selector_red.xml
Normal file
15
app/src/main/res/drawable/btn_selector_red.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="#CC3D49" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="#E34D59" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
10
app/src/main/res/drawable/ic_warning.xml
Normal file
10
app/src/main/res/drawable/ic_warning.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#E34D59"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z"/>
|
||||
</vector>
|
||||
151
app/src/main/res/layout/cancel_account_activity.xml
Normal file
151
app/src/main/res/layout/cancel_account_activity.xml
Normal file
@@ -0,0 +1,151 @@
|
||||
<?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.CancelAccountActivity">
|
||||
|
||||
<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="@mipmap/back"
|
||||
android:contentDescription="@string/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancel_account"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp" />
|
||||
</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">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel_account_warning_text"
|
||||
android:textColor="@color/gray"
|
||||
android:textSize="14sp"
|
||||
android:lineSpacingMultiplier="1.5" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/gray_divider"
|
||||
android:layout_marginVertical="16dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/current_account"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPhoneNumber"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="8dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/gray_divider"
|
||||
android:layout_marginVertical="16dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/verification_code"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="8dp"
|
||||
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/btnSendCode"
|
||||
android:hint="@string/enter_verification_code"
|
||||
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/btnSendCode"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="36dp"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@drawable/send_code_btn_selector"
|
||||
android:text="@string/send_sms_code"
|
||||
android:textColor="@color/send_code_text_color"
|
||||
android:elevation="0dp"
|
||||
android:stateListAnimator="@null"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<android.widget.Button
|
||||
android:id="@+id/btnCancelAccount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/btn_selector_red"
|
||||
android:text="@string/cancel_account_btn"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -70,6 +70,15 @@
|
||||
android:textColor="#666666"
|
||||
android:textSize="16dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_marginLeft="5dp"
|
||||
android:id="@+id/ivMenu"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical|top"
|
||||
android:src="@mipmap/settings"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
227
app/src/main/res/layout/settings_menus_activity.xml
Normal file
227
app/src/main/res/layout/settings_menus_activity.xml
Normal file
@@ -0,0 +1,227 @@
|
||||
<?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.SettingsMenusActivity">
|
||||
|
||||
<!-- Top Toolbar -->
|
||||
<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="@mipmap/back"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/settings_title"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Menu List Container -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<!-- 检查更新 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/item_check_update"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/check_update"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textColor="#999999"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@mipmap/right_back"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<!-- 清除缓存 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/item_clear_cache"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/clear_cache"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cache_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="11Kb"
|
||||
android:textColor="#999999"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@mipmap/right_back"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<!-- 用户协议 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/item_user_agreement"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/user_agreement"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@mipmap/right_back"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<!-- 隐私政策 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/item_privacy_policy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/privacy_policy"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@mipmap/right_back" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<!-- 注销账号 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/item_logout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/cancel_account"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@mipmap/right_back"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Bottom Contact Text -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tip_contact_us"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="19927623@qq.com"
|
||||
android:textColor="#4A90D9"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -501,4 +501,14 @@
|
||||
<string name="password_update_success">密码修改成功</string>
|
||||
<string name="password_update_failed">密码修改失败</string>
|
||||
<string name="update_failed">更新失败</string>
|
||||
|
||||
<string name="check_update">检查更新</string>
|
||||
<string name="clear_cache">清除缓存</string>
|
||||
<string name="cancel_account">注销账号</string>
|
||||
<string name="tip_contact_us">如有问题,请联系我们:</string>
|
||||
|
||||
<string name="cancel_account_warning_text">注销后无法恢复,请谨慎操作</string>
|
||||
<string name="current_account">当前账号</string>
|
||||
<string name="cancel_account_btn">注销</string>
|
||||
|
||||
</resources>
|
||||
@@ -23,4 +23,12 @@
|
||||
<color name="gradientLayout1">#EBDCED</color>
|
||||
<color name="gradientLayout2">#CAF4FF</color>
|
||||
|
||||
<!-- Common Colors -->
|
||||
<color name="primary">#09C2BD</color>
|
||||
<color name="text_primary">#333333</color>
|
||||
<color name="text_secondary">#666666</color>
|
||||
<color name="card_background">#F8F8F8</color>
|
||||
<color name="button_disabled">#CCCCCC</color>
|
||||
<color name="warning_red">#E34D59</color>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -31,9 +31,7 @@
|
||||
<string name="confirm_password">Confirm Password</string>
|
||||
<string name="password_requirement">Password must be 6–20 characters</string>
|
||||
<string name="agreement_prefix">I have read and agree to the</string>
|
||||
<string name="user_agreement">User Agreement</string>
|
||||
<string name="and">and</string>
|
||||
<string name="privacy_policy">Privacy Policy</string>
|
||||
<string name="register_success">Registration Successful</string>
|
||||
<string name="registering">Registering...</string>
|
||||
<string name="register_success_message">Your account has been created successfully</string>
|
||||
@@ -507,4 +505,17 @@
|
||||
<string name="password_update_success">Password updated successfully</string>
|
||||
<string name="password_update_failed">Failed to update password</string>
|
||||
<string name="update_failed">Update failed</string>
|
||||
|
||||
<!-- Settings Menus -->
|
||||
<string name="check_update">Check for Updates</string>
|
||||
<string name="clear_cache">Clear Cache</string>
|
||||
<string name="cancel_account">Cancel Account</string>
|
||||
<string name="tip_contact_us">If you have any questions, please contact us:</string>
|
||||
<string name="user_agreement">User Agreement</string>
|
||||
<string name="privacy_policy">Privacy Policy</string>
|
||||
|
||||
<!-- Cancel Account -->
|
||||
<string name="cancel_account_warning_text">Account data cannot be restored after cancellation, please proceed with caution</string>
|
||||
<string name="current_account">Current Account</string>
|
||||
<string name="cancel_account_btn">Cancel</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user