Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Raul Moreno Garcia committed Mar 16, 2017
1 parent c8da220 commit f0f5740
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,6 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
setToNearestDate(mCalendar);

mDatePickerHeaderView = (TextView) view.findViewById(R.id.mdtp_date_picker_header);
if(headerTypeface != null){
mDatePickerHeaderView.setTypeface(headerTypeface);
}
mMonthAndDayView = (LinearLayout) view.findViewById(R.id.mdtp_date_picker_month_and_day);
mMonthAndDayView.setOnClickListener(this);
mSelectedMonthTextView = (TextView) view.findViewById(R.id.mdtp_date_picker_month);
Expand Down Expand Up @@ -387,7 +384,12 @@ public void onClick(View v) {
if (mAccentColor == -1) {
mAccentColor = Utils.getAccentColorFromThemeIfAvailable(getActivity());
}
if(mDatePickerHeaderView != null) mDatePickerHeaderView.setBackgroundColor(Utils.darkenColor(mAccentColor));
if(mDatePickerHeaderView != null) {
mDatePickerHeaderView.setBackgroundColor(Utils.darkenColor(mAccentColor));
if(headerTypeface != null){
mDatePickerHeaderView.setTypeface(headerTypeface);
}
}
view.findViewById(R.id.mdtp_day_picker_selected_date_layout).setBackgroundColor(mAccentColor);

// Buttons can have a different color
Expand Down Expand Up @@ -535,6 +537,9 @@ private void updateDisplay(boolean announce) {

if (mVersion == Version.VERSION_1) {
if (mDatePickerHeaderView != null) {
if(headerTypeface != null){
mDatePickerHeaderView.setTypeface(headerTypeface);
}
if (mTitle != null)
mDatePickerHeaderView.setText(mTitle.toUpperCase(Locale.getDefault()));
else {
Expand Down

0 comments on commit f0f5740

Please sign in to comment.