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

Commit

Permalink
Enable setting button text color from theme (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
dri94 authored and afollestad committed Feb 3, 2019
1 parent c8d3431 commit 86dd306
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ class MaterialDialog(
textRes = res,
text = text,
fallback = android.R.string.ok,
typeface = this.buttonFont
typeface = this.buttonFont,
textColor = R.attr.md_color_button_text
)
return this
}
Expand Down Expand Up @@ -237,7 +238,8 @@ class MaterialDialog(
textRes = res,
text = text,
fallback = android.R.string.cancel,
typeface = this.buttonFont
typeface = this.buttonFont,
textColor = R.attr.md_color_button_text
)
return this
}
Expand Down
1 change: 1 addition & 0 deletions core/src/main/res-public/values/public.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<attr format="color" name="md_color_title"/>
<attr format="color" name="md_color_content"/>
<attr format="color" name="md_ripple_color"/>
<attr format="color" name="md_color_button_text"/>
<attr format="dimension" name="md_corner_radius"/>
<attr format="reference" name="md_font_title"/>
<attr format="reference" name="md_font_body"/>
Expand Down
1 change: 1 addition & 0 deletions sample/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<item name="md_font_body">@font/raleway_medium</item>
<item name="md_font_button">@font/raleway_semibold</item>
<item name="md_ripple_color">@color/primary_custom_translucent</item>
<item name="md_color_button_text">@color/accent_custom</item>
</style>

<style name="SampleHeader" tools:ignore="NewApi">
Expand Down

0 comments on commit 86dd306

Please sign in to comment.