-
-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theming MonthView #313
base: master
Are you sure you want to change the base?
Theming MonthView #313
Conversation
I still have problems with the formatter. May get some help on that? |
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by default it uses MonthView
style if it cannot find a style applied with attribute mdtp_monthViewTheme
fe61a6d
to
0b34361
Compare
@@ -8,6 +8,7 @@ | |||
<item name="colorAccent">#ff4081</item> | |||
<!-- Customize picker mode here. --> | |||
<item name="mdtp_theme_dark">true</item> | |||
<item name="mdtp_mdtp_monthViewTheme">@style/MonthView</item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base theme applied from the sample app
<item name="daySelectedCircleSize">@dimen/mdtp_day_number_select_circle_radius</item> | ||
</style> | ||
|
||
<style name="MonthView.Dark"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dark theme, its an actual theme now
0b34361
to
3f37248
Compare
This could be useful. |
@wdullaer conflicts solved |
Cheers! |
Could you write a snippet of code for in the README on how devs can create their own themes and apply them? |
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