activity_magic_create.xml

  1<?xml version="1.0" encoding="utf-8"?>
  2<layout xmlns:android="http://schemas.android.com/apk/res/android">
  3
  4    <LinearLayout
  5        android:layout_width="match_parent"
  6        android:layout_height="match_parent"
  7        android:fitsSystemWindows="true"
  8        android:orientation="vertical">
  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        <ScrollView
 24            android:layout_width="match_parent"
 25            android:layout_height="match_parent"
 26            android:fillViewport="true">
 27
 28            <RelativeLayout
 29                android:layout_width="match_parent"
 30                android:layout_height="wrap_content">
 31
 32                <LinearLayout
 33                    android:id="@+id/linearLayout"
 34                    android:layout_width="match_parent"
 35                    android:layout_height="wrap_content"
 36                    android:layout_alignParentStart="true"
 37                    android:layout_alignParentBottom="true"
 38                    android:minHeight="256dp"
 39                    android:orientation="vertical"
 40                    android:paddingLeft="16dp"
 41                    android:paddingRight="16dp"
 42                    android:paddingBottom="10dp">
 43
 44                    <Space
 45                        android:layout_width="match_parent"
 46                        android:layout_height="0dp"
 47                        android:layout_weight="1" />
 48
 49                    <TextView
 50                        android:id="@+id/title"
 51                        android:layout_width="wrap_content"
 52                        android:layout_height="wrap_content"
 53                        android:text="@string/pick_your_username"
 54                        android:textAppearance="?textAppearanceTitleLarge" />
 55
 56                    <TextView
 57                        android:id="@+id/instructions"
 58                        android:layout_width="wrap_content"
 59                        android:layout_height="wrap_content"
 60                        android:layout_marginVertical="8dp"
 61                        android:text="@string/magic_create_text"
 62                        android:textAppearance="?textAppearanceBodyMedium" />
 63
 64                    <com.google.android.material.textfield.TextInputLayout
 65                        android:id="@+id/username_layout"
 66                        android:layout_width="match_parent"
 67                        android:layout_height="wrap_content"
 68                        android:hint="@string/username_hint">
 69
 70                        <com.google.android.material.textfield.TextInputEditText
 71                            android:id="@+id/username"
 72                            android:layout_width="match_parent"
 73                            android:layout_height="wrap_content"
 74                            android:layout_gravity="center_horizontal"
 75                            android:inputType="textNoSuggestions" />
 76                    </com.google.android.material.textfield.TextInputLayout>
 77
 78                    <TextView
 79                        android:id="@+id/full_jid"
 80                        android:layout_width="wrap_content"
 81                        android:layout_height="wrap_content"
 82                        android:layout_marginVertical="8dp"
 83                        android:text="@string/your_full_jid_will_be"
 84                        android:textAppearance="?textAppearanceLabelSmall"
 85                        android:visibility="invisible" />
 86
 87                    <Button
 88                        android:id="@+id/create_account"
 89                        style="@style/Widget.Material3.Button.TonalButton"
 90                        android:layout_width="wrap_content"
 91                        android:layout_height="wrap_content"
 92                        android:layout_gravity="end"
 93                        android:text="@string/next" />
 94                </LinearLayout>
 95
 96                <RelativeLayout
 97                    android:layout_width="match_parent"
 98                    android:layout_height="match_parent"
 99                    android:layout_above="@+id/linearLayout"
100                    android:layout_alignParentStart="true">
101
102                    <ImageView
103                        android:layout_width="wrap_content"
104                        android:layout_height="wrap_content"
105                        android:layout_centerHorizontal="true"
106                        android:layout_centerVertical="true"
107                        android:padding="8dp"
108                        android:src="@drawable/main_logo" />
109                </RelativeLayout>
110            </RelativeLayout>
111        </ScrollView>
112    </LinearLayout>
113</layout>