个人碎片页面的注销账号和设置页面

This commit is contained in:
2026-07-07 09:15:33 +08:00
parent 07f634ae05
commit 96c8cca033
13 changed files with 739 additions and 5 deletions

View 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>

View 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>

View 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>

View File

@@ -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

View 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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -31,9 +31,7 @@
<string name="confirm_password">Confirm Password</string>
<string name="password_requirement">Password must be 620 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>