From f0f57409a9b0dd0857e4e103ee23264c135bc893 Mon Sep 17 00:00:00 2001 From: Raul Moreno Garcia Date: Thu, 16 Mar 2017 13:48:21 +0100 Subject: [PATCH] no message --- .../supportdate/SupportDatePickerDialog.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/library/src/main/java/com/wdullaer/materialdatetimepicker/supportdate/SupportDatePickerDialog.java b/library/src/main/java/com/wdullaer/materialdatetimepicker/supportdate/SupportDatePickerDialog.java index 140fb0ef..1eb8ae73 100644 --- a/library/src/main/java/com/wdullaer/materialdatetimepicker/supportdate/SupportDatePickerDialog.java +++ b/library/src/main/java/com/wdullaer/materialdatetimepicker/supportdate/SupportDatePickerDialog.java @@ -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); @@ -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 @@ -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 {