Theming MonthView#313
Open
carlonzo wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
I still have problems with the formatter. May get some help on that? |
carlonzo
commented
Feb 10, 2017
| mDisabledDayTextColor = ContextCompat.getColor(context, R.color.mdtp_date_picker_text_disabled); | ||
| mHighlightedDayTextColor = ContextCompat.getColor(context, R.color.mdtp_date_picker_text_highlighted); | ||
| } | ||
| TypedArray typedArray = context.obtainStyledAttributes(attr, R.styleable.MonthView, R.attr.mdtp_monthViewTheme, R.style.MonthView); |
Contributor
Author
There was a problem hiding this comment.
by default it uses MonthView style if it cannot find a style applied with attribute mdtp_monthViewTheme
fe61a6d to
0b34361
Compare
carlonzo
commented
Feb 10, 2017
| <item name="colorAccent">#ff4081</item> | ||
| <!-- Customize picker mode here. --> | ||
| <item name="mdtp_theme_dark">true</item> | ||
| <item name="mdtp_mdtp_monthViewTheme">@style/MonthView</item> |
Contributor
Author
There was a problem hiding this comment.
base theme applied from the sample app
carlonzo
commented
Feb 10, 2017
| <item name="daySelectedCircleSize">@dimen/mdtp_day_number_select_circle_radius</item> | ||
| </style> | ||
|
|
||
| <style name="MonthView.Dark"> |
Contributor
Author
There was a problem hiding this comment.
The dark theme, its an actual theme now
0b34361 to
3f37248
Compare
Owner
|
This could be useful. |
Contributor
Author
|
@wdullaer conflicts solved |
Owner
|
Cheers! |
Owner
|
Could you write a snippet of code for in the README on how devs can create their own themes and apply them? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here I have replaced all the resources used by the MonthView with attributes that can be applied by a Theme. the dark theme now is an actual theme. Devs now can apply their own theme to the view without overriding resources