cloudroam
2025-03-24 168f53f24a8d13968a9e13d3072af8f046f674be
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?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="match_parent"
    android:orientation="vertical">
 
    <!-- 标题栏(保持不变) -->
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="56dp"
        android:background="@android:color/white">
 
        <ImageButton
            android:id="@+id/btn_back"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_centerVertical="true"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:src="@drawable/ic_back"
            android:contentDescription="返回"/>
 
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="资料编辑"
            android:textColor="@android:color/black"
            android:textSize="18sp"/>
    </RelativeLayout>
 
    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="#EEEEEE"/>
 
    <!-- 内容区域 -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="16dp">
 
        <!-- 昵称行 -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:paddingVertical="12dp">
 
            <TextView
                android:layout_width="80dp"
                android:layout_height="wrap_content"
                android:text="昵称"
                android:textColor="#333333"
                android:textSize="16sp"/>
 
            <!-- 使用 View 作为间隔 -->
            <View
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:background="@android:color/transparent"/>
 
            <EditText
                android:id="@+id/et_nickname"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="120dp"
                android:background="@null"
                android:hint="请输入昵称"
                android:textSize="16sp"
                android:padding="8dp"
                android:gravity="end"/> <!-- 文本右对齐 -->
        </LinearLayout>
 
        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="#EEEEEE"/>
 
        <!-- 头像行 -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:paddingVertical="16dp">
 
            <TextView
                android:layout_width="80dp"
                android:layout_height="wrap_content"
                android:text="头像"
                android:textColor="#333333"
                android:textSize="16sp"/>
 
            <!-- 使用 View 作为间隔 -->
            <View
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:background="@android:color/transparent"/>
 
            <com.google.android.material.imageview.ShapeableImageView
                android:id="@+id/iv_avatar"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:scaleType="centerCrop"
                android:src="@drawable/default_avatar"/>
        </LinearLayout>
    </LinearLayout>
 
    <View
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"/>
 
    <Button
        android:id="@+id/btn_save_bottom"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:background="@drawable/bg_button_black"
        android:text="保存"
        android:textColor="@android:color/white"/>
 
</LinearLayout>