From f278edbd3f0f809e4a3b59bf16d24c624a43f98d Mon Sep 17 00:00:00 2001
From: 张钢 <floatgang@163.com>
Date: 星期四, 12 九月 2024 14:38:08 +0800
Subject: [PATCH] 修改了国籍和民族字段反转的问题

---
 app/src/main/res/layout/fragment_personal_center.xml |  320 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 315 insertions(+), 5 deletions(-)

diff --git a/app/src/main/res/layout/fragment_personal_center.xml b/app/src/main/res/layout/fragment_personal_center.xml
index 768f701..20de192 100644
--- a/app/src/main/res/layout/fragment_personal_center.xml
+++ b/app/src/main/res/layout/fragment_personal_center.xml
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android">
+<layout 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">
 
     <data>
         <variable
@@ -7,9 +9,317 @@
             type="com.application.zhangshi_app_android.ui.personal_center.PersonalCenterFragmentViewModel" />
     </data>
 
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
 
-    </androidx.constraintlayout.widget.ConstraintLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:background="?attr/pageBackgroundColor"
+        >
+        <com.android.app_base.widget.ExtendTitleBar
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            app:title="鎴戠殑"
+            app:titleGravity="left"
+            android:elevation="5dp"
+            >
+            <FrameLayout
+                android:layout_width="24dp"
+                android:layout_height="24dp"
+                android:layout_marginHorizontal="16dp"
+                android:layout_gravity="center_vertical|end"
+                >
+                <ImageView
+                    android:id="@+id/iv_operate"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:background="@drawable/ic_operate"
+                    />
+            </FrameLayout>
+        </com.android.app_base.widget.ExtendTitleBar>
+        <ScrollView
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            >
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical"
+                android:paddingBottom="20dp"
+                >
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="涓汉淇℃伅"
+                    android:textSize="20sp"
+                    android:textColor="@color/black"
+                    android:layout_marginStart="20dp"
+                    android:layout_marginTop="16dp"
+                    />
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="2dp"
+                    android:background="#33000000"
+                    android:layout_marginTop="24dp"
+                    />
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    >
+
+                    <androidx.constraintlayout.utils.widget.ImageFilterView
+                        android:id="@+id/iv_head"
+                        android:layout_width="0dp"
+                        android:layout_height="0dp"
+                        android:layout_marginVertical="25dp"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintDimensionRatio="1"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintWidth_percent="0.3"
+                        app:roundPercent="1"
+                        app:imageUrl="@{viewModel.infoLiveData.img}"
+                        android:scaleType="centerCrop"
+                        />
+                    <ImageView
+                        android:id="@+id/iv_take_photo"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:background="@drawable/ic_camera"
+                        app:layout_constraintStart_toStartOf="@id/iv_head"
+                        app:layout_constraintEnd_toEndOf="@id/iv_head"
+                        app:layout_constraintBottom_toBottomOf="@id/iv_head"
+                        android:layout_marginBottom="-15dp"
+                        />
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:background="#33000000"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        android:layout_marginHorizontal="15dp"
+                        />
+                </androidx.constraintlayout.widget.ConstraintLayout>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginHorizontal="15dp"
+                    android:orientation="vertical"
+                    >
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:paddingVertical="12dp"
+                        android:paddingHorizontal="10dp"
+                        >
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="鐢ㄦ埛鍚嶇О"
+                            />
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_weight="1"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="@{viewModel.infoLiveData.nickName}"
+                            android:gravity="end"
+                            tools:text="寮犱笁"
+                            />
+                    </LinearLayout>
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:background="#33000000"
+                        />
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:paddingVertical="12dp"
+                        android:paddingHorizontal="10dp"
+                        >
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="鎵嬫満鍙风爜"
+                            />
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_weight="1"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="@{viewModel.infoLiveData.phoneNumber}"
+                            android:gravity="end"
+                            tools:text="13234567890"
+                            />
+                    </LinearLayout>
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:background="#33000000"
+                        />
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:paddingVertical="12dp"
+                        android:paddingHorizontal="10dp"
+                        >
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="鐢ㄦ埛閭"
+                            />
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_weight="1"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="@{viewModel.infoLiveData.email}"
+                            android:gravity="end"
+                            tools:text="zhang@126.com"
+                            />
+                    </LinearLayout>
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:background="#33000000"
+                        />
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:paddingVertical="12dp"
+                        android:paddingHorizontal="10dp"
+                        >
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="鎵�灞炲搴�"
+                            />
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_weight="1"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="@{viewModel.infoLiveData.familyName}"
+                            android:gravity="end"
+                            tools:text="寮犱笁瀹跺涵"
+                            />
+                    </LinearLayout>
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:background="#33000000"
+                        />
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:paddingVertical="12dp"
+                        android:paddingHorizontal="10dp"
+                        >
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="鎵�灞炶鑹�"
+                            />
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_weight="1"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="@{viewModel.infoLiveData.roleName}"
+                            android:gravity="end"
+                            tools:text="瀹跺涵绠$悊鍛�"
+                            />
+                    </LinearLayout>
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:background="#33000000"
+                        />
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:paddingVertical="12dp"
+                        android:paddingHorizontal="10dp"
+                        >
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="鍒涘缓鏃ユ湡"
+                            />
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_weight="1"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="@{viewModel.infoLiveData.createTime}"
+                            android:gravity="end"
+                            tools:text="2023-04-01"
+                            />
+                    </LinearLayout>
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:background="#33000000"
+                        />
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:paddingVertical="12dp"
+                        android:paddingHorizontal="10dp"
+                        android:gravity="center_vertical"
+                        >
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_weight="1"
+                            android:layout_height="wrap_content"
+                            android:textSize="18sp"
+                            android:textColor="#FF212121"
+                            android:text="鎶ょ溂妯″紡"
+                            />
+                        <com.android.app_base.widget.SwitchButton
+                            android:id="@+id/switchBtn"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            />
+
+                    </LinearLayout>
+
+                </LinearLayout>
+                <TextView
+                    android:id="@+id/tv_login_out"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_marginTop="20dp"
+                    android:background="@drawable/shape_ff093878_10_solid"
+                    android:gravity="center"
+                    android:paddingHorizontal="70dp"
+                    android:paddingVertical="5dp"
+                    android:text="閫�鍑虹櫥褰�"
+                    android:textColor="@color/white"
+                    android:textSize="18dp" />
+            </LinearLayout>
+        </ScrollView>
+
+    </LinearLayout>
 </layout>
\ No newline at end of file

--
Gitblit v1.9.1