activity_publish_profile_picture.xml

  1<?xml version="1.0" encoding="utf-8"?>
  2<layout xmlns:android="http://schemas.android.com/apk/res/android"
  3    xmlns:tools="http://schemas.android.com/tools">
  4
  5    <RelativeLayout
  6        android:layout_width="match_parent"
  7        android:layout_height="match_parent"
  8        android:fitsSystemWindows="true">
  9
 10        <com.google.android.material.appbar.AppBarLayout
 11            android:id="@+id/app_bar_layout"
 12            android:layout_width="match_parent"
 13            android:layout_height="wrap_content">
 14
 15            <com.google.android.material.appbar.MaterialToolbar
 16                android:id="@+id/toolbar"
 17                android:layout_width="match_parent"
 18                android:layout_height="wrap_content"
 19                android:minHeight="?attr/actionBarSize" />
 20
 21        </com.google.android.material.appbar.AppBarLayout>
 22
 23
 24        <ScrollView
 25            android:layout_width="match_parent"
 26            android:layout_height="wrap_content"
 27            android:layout_above="@+id/button_bar"
 28            android:layout_below="@id/app_bar_layout">
 29
 30            <LinearLayout
 31                android:layout_width="match_parent"
 32                android:layout_height="wrap_content"
 33                android:layout_marginLeft="@dimen/activity_horizontal_margin"
 34                android:layout_marginTop="@dimen/activity_vertical_margin"
 35                android:layout_marginRight="@dimen/activity_horizontal_margin"
 36                android:layout_marginBottom="@dimen/activity_vertical_margin"
 37                android:gravity="center_horizontal"
 38                android:orientation="vertical">
 39
 40                <FrameLayout
 41                    android:id="@+id/account_image_wrapper"
 42                    android:layout_width="wrap_content"
 43                    android:layout_height="wrap_content"
 44                    android:layout_marginTop="@dimen/publish_avatar_top_margin"
 45                    android:layout_marginBottom="8dp"
 46                    android:background="@drawable/background_account_profile_picture">
 47
 48                    <ImageView
 49                        android:id="@+id/account_image"
 50                        android:layout_width="@dimen/publish_avatar_size"
 51                        android:layout_height="@dimen/publish_avatar_size"
 52                        android:contentDescription="@string/your_avatar_tap_to_select_new_avatar" />
 53                </FrameLayout>
 54
 55                <TextView
 56                    android:id="@+id/hint"
 57                    android:layout_width="wrap_content"
 58                    android:layout_height="wrap_content"
 59                    android:text="@string/touch_to_choose_picture"
 60                    android:textAppearance="?textAppearanceBodyMedium" />
 61
 62                <TextView
 63                    android:id="@+id/secondary_hint"
 64                    android:layout_width="wrap_content"
 65                    android:layout_height="wrap_content"
 66                    android:text="@string/or_long_press_for_default"
 67                    android:textAppearance="?textAppearanceBodyMedium" />
 68
 69                <com.google.android.material.materialswitch.MaterialSwitch
 70                    android:id="@+id/contact_only"
 71                    android:layout_width="wrap_content"
 72                    android:layout_height="wrap_content"
 73                    android:layout_marginVertical="12dp"
 74                    android:text="@string/show_to_contacts_only" />
 75
 76                <TextView
 77                    android:id="@+id/hint_or_warning"
 78                    android:layout_width="wrap_content"
 79                    android:layout_height="wrap_content"
 80                    android:layout_marginVertical="12dp"
 81                    android:textAppearance="?textAppearanceBodyMedium"
 82                    android:textColor="?colorError"
 83                    tools:text="@string/error_saving_avatar" />
 84            </LinearLayout>
 85
 86
 87        </ScrollView>
 88
 89        <RelativeLayout
 90            android:id="@+id/button_bar"
 91            android:layout_width="wrap_content"
 92            android:layout_height="wrap_content"
 93            android:layout_alignParentStart="true"
 94            android:layout_alignParentEnd="true"
 95            android:layout_alignParentBottom="true"
 96            android:paddingHorizontal="16dp"
 97            android:paddingVertical="8dp">
 98
 99            <Button
100                android:id="@+id/cancel_button"
101                style="@style/Widget.Material3.Button.TextButton"
102                android:layout_width="wrap_content"
103                android:layout_height="wrap_content"
104                android:layout_alignParentStart="true"
105                android:layout_centerInParent="true"
106                android:text="@string/cancel" />
107
108            <Button
109                android:id="@+id/publish_button"
110                android:layout_width="wrap_content"
111                android:layout_height="wrap_content"
112                android:layout_alignParentEnd="true"
113                android:layout_centerInParent="true"
114                android:enabled="false"
115                android:text="@string/publish" />
116        </RelativeLayout>
117
118
119    </RelativeLayout>
120</layout>