activity_welcome.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:layout_width="wrap_content"
51                        android:layout_height="wrap_content"
52                        android:text="@string/welcome_header"
53                        android:textAppearance="?textAppearanceTitleLarge" />
54
55                    <TextView
56                        android:layout_width="wrap_content"
57                        android:layout_height="wrap_content"
58                        android:layout_marginTop="8dp"
59                        android:layout_marginBottom="16dp"
60                        android:text="@string/do_you_have_an_account"
61                        android:textAppearance="?textAppearanceBodyMedium" />
62
63                    <Button
64                        android:id="@+id/register_new_account"
65                        style="@style/Widget.Material3.Button.TonalButton"
66                        android:layout_width="wrap_content"
67                        android:layout_height="wrap_content"
68                        android:layout_gravity="end"
69                        android:text="@string/create_new_account" />
70
71                    <Button
72                        android:id="@+id/use_existing"
73                        style="@style/Widget.Material3.Button.TextButton"
74                        android:layout_width="wrap_content"
75                        android:layout_height="wrap_content"
76                        android:layout_gravity="end"
77                        android:text="@string/i_already_have_an_account" />
78                </LinearLayout>
79
80                <RelativeLayout
81                    android:layout_width="match_parent"
82                    android:layout_height="match_parent"
83                    android:layout_above="@+id/linearLayout"
84                    android:layout_alignParentStart="true">
85
86                    <ImageView
87                        android:layout_width="wrap_content"
88                        android:layout_height="wrap_content"
89                        android:layout_centerHorizontal="true"
90                        android:layout_centerVertical="true"
91                        android:padding="8dp"
92                        android:src="@drawable/main_logo" />
93                </RelativeLayout>
94            </RelativeLayout>
95        </ScrollView>
96    </LinearLayout>
97</layout>