289 lines
13 KiB
XML
289 lines
13 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="#F6F7FB">
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="#F6F7FB">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingStart="16dp"
|
|
android:paddingEnd="16dp"
|
|
android:paddingTop="12dp"
|
|
android:paddingBottom="12dp">
|
|
|
|
<ImageView
|
|
android:id="@+id/backButton"
|
|
android:layout_width="24dp"
|
|
android:layout_height="24dp"
|
|
android:contentDescription="back"
|
|
android:src="@drawable/ic_arrow_back_24"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/titleText"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="12dp"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="编辑资料"
|
|
android:textColor="#111111"
|
|
android:textSize="18sp"
|
|
android:textStyle="bold"
|
|
app:layout_constraintBottom_toBottomOf="@id/backButton"
|
|
app:layout_constraintEnd_toStartOf="@id/saveButton"
|
|
app:layout_constraintStart_toEndOf="@id/backButton"
|
|
app:layout_constraintTop_toTopOf="@id/backButton" />
|
|
|
|
<TextView
|
|
android:id="@+id/saveButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="32dp"
|
|
android:background="@drawable/bg_purple_999"
|
|
android:gravity="center"
|
|
android:paddingStart="14dp"
|
|
android:paddingEnd="14dp"
|
|
android:text="保存"
|
|
android:textColor="@android:color/white"
|
|
android:textSize="14sp"
|
|
app:layout_constraintBottom_toBottomOf="@id/backButton"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="@id/backButton" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
<ScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:fillViewport="true"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingStart="16dp"
|
|
android:paddingEnd="16dp"
|
|
android:paddingTop="14dp"
|
|
android:paddingBottom="24dp">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/avatarRow"
|
|
android:layout_width="0dp"
|
|
android:layout_height="72dp"
|
|
android:background="@drawable/bg_white_16"
|
|
android:paddingStart="16dp"
|
|
android:paddingEnd="16dp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
<TextView
|
|
android:id="@+id/avatarLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="头像"
|
|
android:textColor="#111111"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
android:layout_marginTop="14dp" />
|
|
|
|
<TextView
|
|
android:id="@+id/avatarHint"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="6dp"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="从相册选择或拍照"
|
|
android:textColor="#666666"
|
|
android:textSize="13sp"
|
|
app:layout_constraintEnd_toStartOf="@id/avatarPreview"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/avatarLabel" />
|
|
|
|
<ImageView
|
|
android:id="@+id/avatarPreview"
|
|
android:layout_width="64dp"
|
|
android:layout_height="64dp"
|
|
android:background="@drawable/bg_avatar_circle"
|
|
android:clipToOutline="true"
|
|
android:scaleType="centerCrop"
|
|
android:src="@drawable/ic_person_24"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/nameLayout"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:hint="昵称"
|
|
app:boxBackgroundMode="filled"
|
|
app:boxBackgroundColor="@android:color/white"
|
|
app:boxCornerRadiusTopStart="14dp"
|
|
app:boxCornerRadiusTopEnd="14dp"
|
|
app:boxCornerRadiusBottomStart="14dp"
|
|
app:boxCornerRadiusBottomEnd="14dp"
|
|
app:boxStrokeColor="#22000000"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/avatarRow"
|
|
android:layout_marginTop="12dp">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/inputName"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:maxLines="1" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/bioLayout"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="12dp"
|
|
android:hint="个人签名"
|
|
app:placeholderText="填写个人签名更容易获得关注,点击此处添加"
|
|
app:placeholderTextColor="#999999"
|
|
app:boxBackgroundMode="filled"
|
|
app:boxBackgroundColor="@android:color/white"
|
|
app:boxCornerRadiusTopStart="14dp"
|
|
app:boxCornerRadiusTopEnd="14dp"
|
|
app:boxCornerRadiusBottomStart="14dp"
|
|
app:boxCornerRadiusBottomEnd="14dp"
|
|
app:boxStrokeColor="#22000000"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/nameLayout">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/inputBio"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minLines="2"
|
|
android:maxLines="4" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/birthdayLayout"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="12dp"
|
|
android:hint="生日"
|
|
app:boxBackgroundMode="filled"
|
|
app:boxBackgroundColor="@android:color/white"
|
|
app:boxCornerRadiusTopStart="14dp"
|
|
app:boxCornerRadiusTopEnd="14dp"
|
|
app:boxCornerRadiusBottomStart="14dp"
|
|
app:boxCornerRadiusBottomEnd="14dp"
|
|
app:boxStrokeColor="#22000000"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/bioLayout">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/inputBirthday"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:maxLines="1"
|
|
android:focusable="false"
|
|
android:focusableInTouchMode="false"
|
|
android:clickable="true"
|
|
android:cursorVisible="false"
|
|
android:enabled="true"
|
|
android:inputType="none" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/genderLayout"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="12dp"
|
|
android:hint="性别"
|
|
app:boxBackgroundMode="filled"
|
|
app:boxBackgroundColor="@android:color/white"
|
|
app:boxCornerRadiusTopStart="14dp"
|
|
app:boxCornerRadiusTopEnd="14dp"
|
|
app:boxCornerRadiusBottomStart="14dp"
|
|
app:boxCornerRadiusBottomEnd="14dp"
|
|
app:boxStrokeColor="#22000000"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/birthdayLayout">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/inputGender"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:maxLines="1"
|
|
android:focusable="false"
|
|
android:clickable="true"
|
|
android:cursorVisible="false" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/locationLayout"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="12dp"
|
|
android:hint="所在地"
|
|
app:boxBackgroundMode="filled"
|
|
app:boxBackgroundColor="@android:color/white"
|
|
app:boxCornerRadiusTopStart="14dp"
|
|
app:boxCornerRadiusTopEnd="14dp"
|
|
app:boxCornerRadiusBottomStart="14dp"
|
|
app:boxCornerRadiusBottomEnd="14dp"
|
|
app:boxStrokeColor="#22000000"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/genderLayout">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/inputLocation"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:maxLines="1"
|
|
android:focusable="false"
|
|
android:clickable="true"
|
|
android:cursorVisible="false" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/cancelButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="44dp"
|
|
android:layout_marginTop="18dp"
|
|
android:background="@drawable/bg_gray_12"
|
|
android:gravity="center"
|
|
android:text="取消"
|
|
android:textColor="#111111"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/locationLayout" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</ScrollView>
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|