|
15 | 15 | <androidx.constraintlayout.widget.ConstraintLayout |
16 | 16 | android:layout_width="match_parent" |
17 | 17 | android:layout_height="wrap_content" |
18 | | - android:padding="32dp"> |
| 18 | + android:paddingStart="32dp" |
| 19 | + android:paddingEnd="32dp" |
| 20 | + android:paddingTop="32dp" |
| 21 | + android:paddingBottom="32dp"> |
| 22 | + |
| 23 | + <!-- Content Container with Max Width --> |
| 24 | + <androidx.constraintlayout.widget.Guideline |
| 25 | + android:id="@+id/guidelineStart" |
| 26 | + android:layout_width="wrap_content" |
| 27 | + android:layout_height="wrap_content" |
| 28 | + android:orientation="vertical" |
| 29 | + app:layout_constraintGuide_percent="0.1" /> |
| 30 | + |
| 31 | + <androidx.constraintlayout.widget.Guideline |
| 32 | + android:id="@+id/guidelineEnd" |
| 33 | + android:layout_width="wrap_content" |
| 34 | + android:layout_height="wrap_content" |
| 35 | + android:orientation="vertical" |
| 36 | + app:layout_constraintGuide_percent="0.9" /> |
19 | 37 |
|
20 | 38 | <!-- App Title with Whimsical Style --> |
21 | 39 | <TextView |
|
37 | 55 | android:shadowRadius="4" |
38 | 56 | android:rotation="-2" |
39 | 57 | app:layout_constraintTop_toTopOf="parent" |
40 | | - app:layout_constraintStart_toStartOf="parent" |
41 | | - app:layout_constraintEnd_toEndOf="parent" /> |
| 58 | + app:layout_constraintStart_toStartOf="@id/guidelineStart" |
| 59 | + app:layout_constraintEnd_toEndOf="@id/guidelineEnd" /> |
42 | 60 |
|
43 | 61 | <!-- App Subtitle --> |
44 | 62 | <TextView |
|
48 | 66 | android:text="@string/app_subtitle" |
49 | 67 | android:textSize="16sp" |
50 | 68 | android:textColor="?android:attr/textColorSecondary" |
51 | | - android:layout_marginBottom="32dp" |
| 69 | + android:layout_marginBottom="0dp" |
52 | 70 | android:gravity="center" |
53 | 71 | android:fontFamily="sans-serif" |
54 | 72 | app:layout_constraintTop_toBottomOf="@id/appTitle" |
55 | | - app:layout_constraintStart_toStartOf="parent" |
56 | | - app:layout_constraintEnd_toEndOf="parent" /> |
| 73 | + app:layout_constraintStart_toStartOf="@id/guidelineStart" |
| 74 | + app:layout_constraintEnd_toEndOf="@id/guidelineEnd" /> |
| 75 | + |
| 76 | + <!-- Vertical guideline at center for two-column layout --> |
| 77 | + <androidx.constraintlayout.widget.Guideline |
| 78 | + android:id="@+id/guidelineCenter" |
| 79 | + android:layout_width="wrap_content" |
| 80 | + android:layout_height="wrap_content" |
| 81 | + android:orientation="vertical" |
| 82 | + app:layout_constraintGuide_percent="0.5" /> |
57 | 83 |
|
58 | 84 | <!-- Left Column: Motion Detection Card --> |
59 | 85 | <com.google.android.material.card.MaterialCardView |
60 | 86 | android:id="@+id/motionCard" |
61 | 87 | android:layout_width="0dp" |
62 | 88 | android:layout_height="wrap_content" |
63 | | - android:layout_marginEnd="16dp" |
| 89 | + android:layout_marginTop="32dp" |
| 90 | + android:layout_marginEnd="8dp" |
64 | 91 | app:cardElevation="4dp" |
65 | 92 | app:cardCornerRadius="20dp" |
66 | 93 | app:contentPadding="24dp" |
67 | 94 | app:strokeWidth="0dp" |
68 | 95 | app:cardBackgroundColor="@color/card_motion" |
69 | 96 | app:layout_constraintTop_toBottomOf="@id/appSubtitle" |
70 | | - app:layout_constraintStart_toStartOf="parent" |
71 | | - app:layout_constraintEnd_toStartOf="@id/lightCard" |
72 | | - app:layout_constraintWidth_percent="0.5"> |
| 97 | + app:layout_constraintStart_toStartOf="@id/guidelineStart" |
| 98 | + app:layout_constraintEnd_toEndOf="@id/guidelineCenter"> |
73 | 99 |
|
74 | 100 | <LinearLayout |
75 | 101 | android:layout_width="match_parent" |
|
141 | 167 |
|
142 | 168 | <TextView |
143 | 169 | android:id="@+id/cameraValue" |
144 | | - android:layout_width="80dp" |
| 170 | + android:layout_width="110dp" |
145 | 171 | android:layout_height="wrap_content" |
146 | 172 | android:text="50" |
147 | 173 | android:textSize="15sp" |
|
168 | 194 | android:id="@+id/lightCard" |
169 | 195 | android:layout_width="0dp" |
170 | 196 | android:layout_height="wrap_content" |
171 | | - android:layout_marginStart="16dp" |
| 197 | + android:layout_marginTop="32dp" |
| 198 | + android:layout_marginStart="8dp" |
172 | 199 | app:cardElevation="4dp" |
173 | 200 | app:cardCornerRadius="20dp" |
174 | 201 | app:contentPadding="24dp" |
175 | 202 | app:strokeWidth="0dp" |
176 | 203 | app:cardBackgroundColor="@color/card_light" |
177 | 204 | app:layout_constraintTop_toBottomOf="@id/appSubtitle" |
178 | | - app:layout_constraintStart_toEndOf="@id/motionCard" |
179 | | - app:layout_constraintEnd_toEndOf="parent" |
180 | | - app:layout_constraintWidth_percent="0.5"> |
| 205 | + app:layout_constraintStart_toStartOf="@id/guidelineCenter" |
| 206 | + app:layout_constraintEnd_toEndOf="@id/guidelineEnd"> |
181 | 207 |
|
182 | 208 | <LinearLayout |
183 | 209 | android:layout_width="match_parent" |
|
227 | 253 |
|
228 | 254 | <TextView |
229 | 255 | android:id="@+id/lightValue" |
230 | | - android:layout_width="80dp" |
| 256 | + android:layout_width="110dp" |
231 | 257 | android:layout_height="wrap_content" |
232 | 258 | android:text="0" |
233 | 259 | android:textSize="15sp" |
|
260 | 286 | app:strokeWidth="0dp" |
261 | 287 | app:cardBackgroundColor="@color/card_settings" |
262 | 288 | app:layout_constraintTop_toBottomOf="@id/motionCard" |
263 | | - app:layout_constraintStart_toStartOf="parent" |
264 | | - app:layout_constraintEnd_toEndOf="parent"> |
| 289 | + app:layout_constraintStart_toStartOf="@id/guidelineStart" |
| 290 | + app:layout_constraintEnd_toEndOf="@id/guidelineEnd"> |
265 | 291 |
|
266 | 292 | <LinearLayout |
267 | 293 | android:layout_width="match_parent" |
|
0 commit comments