app/src/main/res/layout/activity_settings_update_email.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="wrap_content"
android:fillViewport="false"
android:orientation="vertical"
tools:context=".main_screen.profile.settings.SettingsUpdateEmail">
<androidx.appcompat.widget.Toolbar
android:id="@+id/settings_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:theme="?attr/actionBarTheme"
app:title="@string/email" />
<EditText
android:id="@+id/update_email_field"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/margin_small"
android:layout_marginStart="@dimen/margin_small"
android:layout_marginEnd="@dimen/margin_small"
android:autofillHints=".AUTOFILL_HINT_EMAIL_ADDRESS"
android:hint="@string/new_e_mail"
android:inputType="textWebEmailAddress" />
<TextView
android:id="@+id/update_email_success_notice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_small"
android:layout_marginEnd="@dimen/margin_small"
android:text="@string/email_update_success"
android:visibility="gone" />
<TextView
android:id="@+id/update_email_failure_notice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_small"
android:layout_marginEnd="@dimen/margin_small"
android:textColor="@color/design_default_color_error"
android:visibility="gone" />
<com.google.android.material.button.MaterialButton
android:id="@+id/update_email_button"
android:layout_width="@dimen/pill_shape_width"
android:layout_height="@dimen/pill_shape_height"
android:layout_marginTop="@dimen/cell_height"
android:layout_marginStart="75dp"
android:onClick="updateEmail"
android:text="@string/update_email"
app:shapeAppearanceOverlay="@style/PillShapeButton" />
</LinearLayout>