<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/app_bar_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <com.google.android.material.appbar.MaterialToolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:minHeight="?attr/actionBarSize" />

        </com.google.android.material.appbar.AppBarLayout>


        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_above="@+id/button_bar"
            android:layout_below="@id/app_bar_layout">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/activity_horizontal_margin"
                android:layout_marginTop="@dimen/activity_vertical_margin"
                android:layout_marginRight="@dimen/activity_horizontal_margin"
                android:layout_marginBottom="@dimen/activity_vertical_margin"
                android:gravity="center_horizontal"
                android:orientation="vertical">

                <FrameLayout
                    android:id="@+id/account_image_wrapper"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/publish_avatar_top_margin"
                    android:layout_marginBottom="8dp"
                    android:foreground="@drawable/foreground_round_cutout_overlay"
                    android:background="@drawable/background_account_profile_picture">

                    <ImageView
                        android:id="@+id/account_image"
                        android:layout_width="@dimen/publish_avatar_size"
                        android:layout_height="@dimen/publish_avatar_size"
                        android:contentDescription="@string/your_avatar_tap_to_select_new_avatar" />
                </FrameLayout>

                <TextView
                    android:id="@+id/hint"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/touch_to_choose_picture"
                    android:textAppearance="?textAppearanceBodyMedium" />

                <TextView
                    android:id="@+id/secondary_hint"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/or_long_press_for_default"
                    android:textAppearance="?textAppearanceBodyMedium" />

                <com.google.android.material.materialswitch.MaterialSwitch
                    android:id="@+id/contact_only"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginVertical="12dp"
                    android:text="@string/show_to_contacts_only" />

                <TextView
                    android:id="@+id/hint_or_warning"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginVertical="12dp"
                    android:textAppearance="?textAppearanceBodyMedium"
                    android:textColor="?colorError"
                    tools:text="@string/error_saving_avatar" />
            </LinearLayout>


        </ScrollView>

        <RelativeLayout
            android:id="@+id/button_bar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_alignParentEnd="true"
            android:layout_alignParentBottom="true"
            android:paddingHorizontal="16dp"
            android:paddingVertical="8dp">

            <Button
                android:id="@+id/cancel_button"
                style="@style/Widget.Material3.Button.TextButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:layout_centerInParent="true"
                android:text="@string/cancel" />

            <Button
                android:id="@+id/publish_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_centerInParent="true"
                android:enabled="false"
                android:text="@string/publish" />
        </RelativeLayout>


    </RelativeLayout>
</layout>