<?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:backgroundTint="@color/cardview_dark_background"
|
android:text="保存"
|
android:textColor="@android:color/white"/>
|
|
|
|
</LinearLayout>
|