|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" |
| 2 | +<ScrollView |
| 3 | + xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 4 | xmlns:app="http://schemas.android.com/apk/res-auto" |
| 5 | + xmlns:tools="http://schemas.android.com/tools" |
4 | 6 | android:layout_width="match_parent" |
5 | | - android:layout_height="match_parent"> |
| 7 | + android:layout_height="match_parent" |
| 8 | + android:fillViewport="true"> |
6 | 9 |
|
7 | | - <LinearLayout |
| 10 | + <androidx.constraintlayout.widget.ConstraintLayout |
8 | 11 | android:layout_width="match_parent" |
9 | 12 | android:layout_height="wrap_content" |
10 | | - android:orientation="vertical" |
11 | 13 | android:padding="24dp"> |
12 | 14 |
|
13 | | - <com.google.android.material.card.MaterialCardView |
14 | | - android:layout_width="match_parent" |
| 15 | + <!-- Main Title --> |
| 16 | + <com.google.android.material.textview.MaterialTextView |
| 17 | + android:id="@+id/title" |
| 18 | + android:layout_width="wrap_content" |
15 | 19 | android:layout_height="wrap_content" |
16 | | - android:padding="16dp" |
17 | | - app:cardElevation="0dp"> |
| 20 | + android:text="@string/default_tab" |
| 21 | + android:textAppearance="?attr/textAppearanceHeadlineMedium" |
| 22 | + app:layout_constraintTop_toTopOf="parent" |
| 23 | + app:layout_constraintStart_toStartOf="parent" |
| 24 | + app:layout_constraintEnd_toEndOf="parent" /> |
18 | 25 |
|
19 | | - <LinearLayout |
| 26 | + <!-- Subtitle/Description --> |
| 27 | + <com.google.android.material.textview.MaterialTextView |
| 28 | + android:id="@+id/description" |
| 29 | + android:layout_width="0dp" |
| 30 | + android:layout_height="wrap_content" |
| 31 | + android:layout_marginTop="8dp" |
| 32 | + android:text="@string/default_tab_description" |
| 33 | + android:textAppearance="?attr/textAppearanceBodyMedium" |
| 34 | + android:textColor="?attr/colorOnSurfaceVariant" |
| 35 | + app:layout_constraintTop_toBottomOf="@id/title" |
| 36 | + app:layout_constraintStart_toStartOf="parent" |
| 37 | + app:layout_constraintEnd_toEndOf="parent"/> |
| 38 | + |
| 39 | + <!-- RadioGroup manages the selection logic for the cards --> |
| 40 | + <RadioGroup |
| 41 | + android:id="@+id/start_page_group" |
| 42 | + android:layout_width="0dp" |
| 43 | + android:layout_height="wrap_content" |
| 44 | + android:layout_marginTop="32dp" |
| 45 | + android:orientation="vertical" |
| 46 | + app:layout_constraintTop_toBottomOf="@id/description" |
| 47 | + app:layout_constraintStart_toStartOf="parent" |
| 48 | + app:layout_constraintEnd_toEndOf="parent"> |
| 49 | + |
| 50 | + <!-- Home Card --> |
| 51 | + <com.google.android.material.card.MaterialCardView |
| 52 | + android:id="@+id/card_home" |
20 | 53 | android:layout_width="match_parent" |
21 | 54 | android:layout_height="wrap_content" |
22 | | - android:orientation="vertical"> |
| 55 | + app:cardElevation="0dp"> |
23 | 56 |
|
24 | | - <com.google.android.material.textview.MaterialTextView |
25 | | - style="@style/TextAppearance.Material3.TitleLarge" |
26 | | - android:layout_width="wrap_content" |
| 57 | + <LinearLayout |
| 58 | + android:layout_width="match_parent" |
27 | 59 | android:layout_height="wrap_content" |
28 | | - android:layout_marginBottom="16dp" |
29 | | - android:text="@string/default_tab" /> |
| 60 | + android:orientation="horizontal" |
| 61 | + android:gravity="center_vertical" |
| 62 | + android:padding="16dp"> |
30 | 63 |
|
31 | | - <RadioGroup |
32 | | - android:id="@+id/start_page_group" |
33 | | - android:layout_width="match_parent" |
34 | | - android:layout_height="wrap_content"> |
| 64 | + <ImageView |
| 65 | + android:layout_width="24dp" |
| 66 | + android:layout_height="24dp" |
| 67 | + android:src="@drawable/ic_home" |
| 68 | + android:contentDescription="@string/home"/> |
| 69 | + |
| 70 | + <LinearLayout |
| 71 | + android:layout_width="0dp" |
| 72 | + android:layout_height="wrap_content" |
| 73 | + android:layout_marginStart="16dp" |
| 74 | + android:layout_weight="1" |
| 75 | + android:orientation="vertical"> |
| 76 | + |
| 77 | + <com.google.android.material.textview.MaterialTextView |
| 78 | + android:layout_width="wrap_content" |
| 79 | + android:layout_height="wrap_content" |
| 80 | + android:text="@string/home" |
| 81 | + android:textAppearance="?attr/textAppearanceBodyLarge"/> |
| 82 | + |
| 83 | + <com.google.android.material.textview.MaterialTextView |
| 84 | + android:layout_width="wrap_content" |
| 85 | + android:layout_height="wrap_content" |
| 86 | + android:text="@string/home_description" |
| 87 | + android:textAppearance="?attr/textAppearanceBodySmall" |
| 88 | + android:textColor="?attr/colorOnSurfaceVariant"/> |
| 89 | + </LinearLayout> |
35 | 90 |
|
36 | 91 | <com.google.android.material.radiobutton.MaterialRadioButton |
37 | 92 | android:id="@+id/radio_home" |
38 | 93 | android:layout_width="wrap_content" |
39 | 94 | android:layout_height="wrap_content" |
40 | | - android:checked="true" |
41 | | - android:text="@string/home" /> |
| 95 | + android:checked="true"/> |
| 96 | + </LinearLayout> |
| 97 | + </com.google.android.material.card.MaterialCardView> |
| 98 | + |
| 99 | + <!-- Android Studio Card --> |
| 100 | + <com.google.android.material.card.MaterialCardView |
| 101 | + android:id="@+id/card_android_studio" |
| 102 | + android:layout_width="match_parent" |
| 103 | + android:layout_height="wrap_content" |
| 104 | + android:layout_marginTop="16dp" |
| 105 | + app:cardElevation="0dp"> |
| 106 | + |
| 107 | + <LinearLayout |
| 108 | + android:layout_width="match_parent" |
| 109 | + android:layout_height="wrap_content" |
| 110 | + android:orientation="horizontal" |
| 111 | + android:gravity="center_vertical" |
| 112 | + android:padding="16dp"> |
| 113 | + |
| 114 | + <ImageView |
| 115 | + android:layout_width="24dp" |
| 116 | + android:layout_height="24dp" |
| 117 | + android:src="@drawable/ic_android" |
| 118 | + android:contentDescription="@string/android_studio"/> |
| 119 | + |
| 120 | + <LinearLayout |
| 121 | + android:layout_width="0dp" |
| 122 | + android:layout_height="wrap_content" |
| 123 | + android:layout_marginStart="16dp" |
| 124 | + android:layout_weight="1" |
| 125 | + android:orientation="vertical"> |
| 126 | + |
| 127 | + <com.google.android.material.textview.MaterialTextView |
| 128 | + android:layout_width="wrap_content" |
| 129 | + android:layout_height="wrap_content" |
| 130 | + android:text="@string/android_studio" |
| 131 | + android:textAppearance="?attr/textAppearanceBodyLarge"/> |
| 132 | + |
| 133 | + <com.google.android.material.textview.MaterialTextView |
| 134 | + android:layout_width="wrap_content" |
| 135 | + android:layout_height="wrap_content" |
| 136 | + android:text="@string/android_studio_description" |
| 137 | + android:textAppearance="?attr/textAppearanceBodySmall" |
| 138 | + android:textColor="?attr/colorOnSurfaceVariant"/> |
| 139 | + </LinearLayout> |
42 | 140 |
|
43 | 141 | <com.google.android.material.radiobutton.MaterialRadioButton |
44 | 142 | android:id="@+id/radio_android_studio" |
45 | 143 | android:layout_width="wrap_content" |
| 144 | + android:layout_height="wrap_content"/> |
| 145 | + </LinearLayout> |
| 146 | + </com.google.android.material.card.MaterialCardView> |
| 147 | + |
| 148 | + <!-- About Card --> |
| 149 | + <com.google.android.material.card.MaterialCardView |
| 150 | + android:id="@+id/card_about" |
| 151 | + android:layout_width="match_parent" |
| 152 | + android:layout_height="wrap_content" |
| 153 | + android:layout_marginTop="16dp" |
| 154 | + app:cardElevation="0dp"> |
| 155 | + |
| 156 | + <LinearLayout |
| 157 | + android:layout_width="match_parent" |
| 158 | + android:layout_height="wrap_content" |
| 159 | + android:orientation="horizontal" |
| 160 | + android:gravity="center_vertical" |
| 161 | + android:padding="16dp"> |
| 162 | + |
| 163 | + <ImageView |
| 164 | + android:layout_width="24dp" |
| 165 | + android:layout_height="24dp" |
| 166 | + android:src="@drawable/ic_about" |
| 167 | + android:contentDescription="@string/about"/> |
| 168 | + |
| 169 | + <LinearLayout |
| 170 | + android:layout_width="0dp" |
46 | 171 | android:layout_height="wrap_content" |
47 | | - android:text="@string/android_studio" /> |
| 172 | + android:layout_marginStart="16dp" |
| 173 | + android:layout_weight="1" |
| 174 | + android:orientation="vertical"> |
| 175 | + |
| 176 | + <com.google.android.material.textview.MaterialTextView |
| 177 | + android:layout_width="wrap_content" |
| 178 | + android:layout_height="wrap_content" |
| 179 | + android:text="@string/about" |
| 180 | + android:textAppearance="?attr/textAppearanceBodyLarge"/> |
| 181 | + |
| 182 | + <com.google.android.material.textview.MaterialTextView |
| 183 | + android:layout_width="wrap_content" |
| 184 | + android:layout_height="wrap_content" |
| 185 | + android:text="@string/about_description" |
| 186 | + android:textAppearance="?attr/textAppearanceBodySmall" |
| 187 | + android:textColor="?attr/colorOnSurfaceVariant"/> |
| 188 | + </LinearLayout> |
48 | 189 |
|
49 | 190 | <com.google.android.material.radiobutton.MaterialRadioButton |
50 | 191 | android:id="@+id/radio_about" |
51 | 192 | android:layout_width="wrap_content" |
52 | | - android:layout_height="wrap_content" |
53 | | - android:text="@string/about" /> |
54 | | - </RadioGroup> |
55 | | - </LinearLayout> |
56 | | - </com.google.android.material.card.MaterialCardView> |
| 193 | + android:layout_height="wrap_content"/> |
| 194 | + </LinearLayout> |
| 195 | + </com.google.android.material.card.MaterialCardView> |
| 196 | + |
| 197 | + </RadioGroup> |
57 | 198 |
|
58 | | - </LinearLayout> |
| 199 | + </androidx.constraintlayout.widget.ConstraintLayout> |
59 | 200 | </ScrollView> |
0 commit comments