Skip to content

Commit

Permalink
Update title/item/indicator style
Browse files Browse the repository at this point in the history
  • Loading branch information
minibugdev committed Mar 3, 2020
1 parent ae17688 commit 73c46ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Add your theme and style to `styles.xml` or wherever your want.
**3. Indicator** style `parent` must be `Widget.SheetSelection.Indicator` eg.
``` xml
<style name="Widget.Custom.SheetSelection.Indicator" parent="@style/Widget.SheetSelection.Indicator">
<item name="android:layout_margin">16dp</item>
<item name="android:layout_marginTop">48dp</item>
</style>
```

Expand Down
13 changes: 10 additions & 3 deletions sheetselection/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<item name="android:minHeight">56dp</item>
<item name="android:paddingStart">16dp</item>
<item name="android:paddingEnd">16dp</item>
<item name="android:paddingTop">0dp</item>
<item name="android:paddingBottom">0dp</item>
<item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Subtitle1</item>
<item name="android:gravity">center_vertical</item>
</style>
Expand All @@ -22,17 +24,22 @@
<item name="android:minHeight">56dp</item>
<item name="android:paddingStart">16dp</item>
<item name="android:paddingEnd">16dp</item>
<item name="android:paddingTop">0dp</item>
<item name="android:paddingBottom">0dp</item>
<item name="android:drawablePadding">16dp</item>
<item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Body2</item>
<item name="android:gravity">center_vertical</item>
</style>

<style name="Widget.SheetSelection.Indicator" parent="@style/Widget.MaterialComponents.CardView">
<item name="android:maxWidth">32dp</item>
<item name="android:minWidth">32dp</item>
<item name="android:maxWidth">24dp</item>
<item name="android:minWidth">24dp</item>
<item name="android:maxHeight">4dp</item>
<item name="android:minHeight">4dp</item>
<item name="android:layout_margin">8dp</item>
<item name="android:layout_marginStart">8dp</item>
<item name="android:layout_marginEnd">8dp</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:layout_marginBottom">8dp</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="cardBackgroundColor">?attr/sheetSelection_indicatorColor</item>
<item name="cardElevation">0dp</item>
Expand Down

0 comments on commit 73c46ff

Please sign in to comment.