You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
metu.life-android/app/src/main/res/layout/activity_edit_profile.xml

195 lines
9.0 KiB

<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.keylesspalace.tusky.EditProfileActivity">
<include layout="@layout/toolbar_basic" />
<androidx.core.widget.NestedScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusableInTouchMode="true">
<ImageView
android:id="@+id/headerPreview"
android:layout_width="match_parent"
android:layout_height="200dp"
android:contentDescription="@null"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/headerButton"
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="#66000000"
android:contentDescription="@string/label_header"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_add_a_photo_32dp" />
<ProgressBar
android:id="@+id/headerProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/headerPreview"
app:layout_constraintEnd_toEndOf="@id/headerPreview"
app:layout_constraintStart_toStartOf="@id/headerPreview"
app:layout_constraintTop_toTopOf="@id/headerPreview" />
<com.keylesspalace.tusky.view.RoundedImageView
android:id="@+id/avatarPreview"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginStart="16dp"
android:contentDescription="@null"
app:layout_constraintBottom_toBottomOf="@id/headerPreview"
app:layout_constraintStart_toStartOf="@id/contentContainer"
app:layout_constraintTop_toBottomOf="@id/headerPreview" />
<ImageButton
android:id="@+id/avatarButton"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginStart="16dp"
android:background="@drawable/round_button"
android:contentDescription="@string/label_avatar"
android:elevation="4dp"
app:layout_constraintBottom_toBottomOf="@id/headerPreview"
app:layout_constraintStart_toStartOf="@id/contentContainer"
app:layout_constraintTop_toBottomOf="@id/headerPreview"
app:srcCompat="@drawable/ic_add_a_photo_32dp" />
<ProgressBar
android:id="@+id/avatarProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminate="true"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/avatarPreview"
app:layout_constraintEnd_toEndOf="@id/avatarPreview"
app:layout_constraintStart_toStartOf="@id/avatarPreview"
app:layout_constraintTop_toTopOf="@id/avatarPreview" />
<LinearLayout
android:id="@+id/contentContainer"
android:layout_width="@dimen/timeline_width"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/avatarPreview">
<com.google.android.material.textfield.TextInputLayout
style="@style/TuskyTextInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:hint="@string/hint_display_name">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/displayNameEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no"
android:lines="1" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/TuskyTextInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:hint="@string/hint_note"
app:counterEnabled="true"
app:counterTextColor="?android:textColorTertiary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/noteEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no" />
</com.google.android.material.textfield.TextInputLayout>
<CheckBox
android:id="@+id/lockedCheckBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="16dp"
android:paddingStart="8dp"
android:text="@string/lock_account_label"
android:textSize="?attr/status_text_medium"
app:buttonTint="?attr/compound_button_color" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="24dp"
android:paddingStart="40dp"
android:text="@string/lock_account_label_description"
android:textSize="?attr/status_text_small" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:text="@string/profile_metadata_label"
android:textSize="?attr/status_text_small" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/fieldList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:nestedScrollingEnabled="false" />
<Button
android:id="@+id/addFieldButton"
style="@style/TuskyButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:drawablePadding="6dp"
android:text="@string/profile_metadata_add"
android:textColor="#fff" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<ProgressBar
android:id="@+id/saveProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true"
android:visibility="gone" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>