Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit e6275c6

Browse files
committed
SubHeaderStyle
1 parent e773b9b commit e6275c6

File tree

2 files changed

+21
-49
lines changed

2 files changed

+21
-49
lines changed

app/src/main/res/layout/main_content.xml

Lines changed: 12 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,8 @@
2828

2929

3030
<com.google.android.material.textview.MaterialTextView
31-
style="?android:attr/textAppearanceSmall"
32-
android:layout_width="match_parent"
33-
android:layout_height="wrap_content"
34-
android:layout_marginStart="24dp"
35-
android:layout_marginBottom="2dp"
36-
android:text="Icons"
37-
android:textAlignment="viewStart"
38-
android:textStyle="bold" />
39-
31+
style="@style/SubHeaderStyle"
32+
android:text="Icons" />
4033

4134
<com.google.android.material.card.MaterialCardView
4235
android:layout_width="match_parent"
@@ -55,15 +48,9 @@
5548

5649

5750
<com.google.android.material.textview.MaterialTextView
58-
style="?android:attr/textAppearanceSmall"
59-
android:layout_width="match_parent"
60-
android:layout_height="wrap_content"
61-
android:layout_marginStart="24dp"
51+
style="@style/SubHeaderStyle"
6252
android:layout_marginTop="15dp"
63-
android:layout_marginBottom="2dp"
64-
android:text="SeekBar"
65-
android:textAlignment="viewStart"
66-
android:textStyle="bold" />
53+
android:text="SeekBar" />
6754

6855

6956
<com.google.android.material.card.MaterialCardView
@@ -96,15 +83,9 @@
9683

9784

9885
<com.google.android.material.textview.MaterialTextView
99-
style="?android:attr/textAppearanceSmall"
100-
android:layout_width="match_parent"
101-
android:layout_height="wrap_content"
102-
android:layout_marginStart="24dp"
86+
style="@style/SubHeaderStyle"
10387
android:layout_marginTop="15dp"
104-
android:layout_marginBottom="2dp"
105-
android:text="ProgressBar"
106-
android:textAlignment="viewStart"
107-
android:textStyle="bold" />
88+
android:text="ProgressBar" />
10889

10990

11091
<com.google.android.material.card.MaterialCardView
@@ -163,15 +144,9 @@
163144

164145

165146
<com.google.android.material.textview.MaterialTextView
166-
style="?android:attr/textAppearanceSmall"
167-
android:layout_width="match_parent"
168-
android:layout_height="wrap_content"
169-
android:layout_marginStart="24dp"
147+
style="@style/SubHeaderStyle"
170148
android:layout_marginTop="15dp"
171-
android:layout_marginBottom="2dp"
172-
android:text="Buttons"
173-
android:textAlignment="viewStart"
174-
android:textStyle="bold" />
149+
android:text="Buttons" />
175150

176151

177152
<com.google.android.material.card.MaterialCardView
@@ -284,15 +259,9 @@
284259

285260

286261
<com.google.android.material.textview.MaterialTextView
287-
style="?android:attr/textAppearanceSmall"
288-
android:layout_width="match_parent"
289-
android:layout_height="wrap_content"
290-
android:layout_marginStart="24dp"
262+
style="@style/SubHeaderStyle"
291263
android:layout_marginTop="15dp"
292-
android:layout_marginBottom="2dp"
293-
android:text="Others"
294-
android:textAlignment="viewStart"
295-
android:textStyle="bold" />
264+
android:text="Others" />
296265

297266

298267
<com.google.android.material.card.MaterialCardView
@@ -333,15 +302,9 @@
333302

334303

335304
<com.google.android.material.textview.MaterialTextView
336-
style="?android:attr/textAppearanceSmall"
337-
android:layout_width="match_parent"
338-
android:layout_height="wrap_content"
339-
android:layout_marginStart="24dp"
305+
style="@style/SubHeaderStyle"
340306
android:layout_marginTop="15dp"
341-
android:layout_marginBottom="2dp"
342-
android:text="Color"
343-
android:textAlignment="viewStart"
344-
android:textStyle="bold" />
307+
android:text="Color" />
345308

346309

347310
<com.google.android.material.card.MaterialCardView

yanndroid/samsung/src/main/res/values/styles.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,15 @@
344344
<item name="android:textColor">@color/setting_color_picker_mode_text_selected_color</item>
345345
</style>
346346

347+
<!--SubHeader-->
348+
<style name="SubHeaderStyle" >
349+
<item name="android:textStyle">bold</item>
350+
<item name="android:textAlignment">viewStart</item>
351+
<item name="android:layout_marginStart">24dp</item>
352+
<item name="android:layout_marginBottom">2dp</item>
353+
<item name="android:layout_width">match_parent</item>
354+
<item name="android:layout_height">wrap_content</item>
355+
</style>
347356

348357
<!--Dialog-->
349358
<style name="DialogStyle" parent="android:Theme.DeviceDefault.DayNight" tools:targetApi="q" />

0 commit comments

Comments
 (0)