From dd2194affda7556d03cce73cd44814d5054ba1c0 Mon Sep 17 00:00:00 2001 From: Jarett Millard Date: Tue, 22 Mar 2016 14:47:45 -0400 Subject: [PATCH] Allow setting textAllCaps to change capitalization for month name --- .../main/java/com/roomorama/caldroid/CaldroidFragment.java | 7 ++++++- caldroid/src/main/res/values/styles.xml | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/caldroid/src/main/java/com/roomorama/caldroid/CaldroidFragment.java b/caldroid/src/main/java/com/roomorama/caldroid/CaldroidFragment.java index 478d148..639d719 100644 --- a/caldroid/src/main/java/com/roomorama/caldroid/CaldroidFragment.java +++ b/caldroid/src/main/java/com/roomorama/caldroid/CaldroidFragment.java @@ -6,6 +6,7 @@ import android.content.res.Configuration; import android.graphics.Color; import android.graphics.drawable.Drawable; +import android.os.Build; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.DialogFragment; @@ -1043,7 +1044,11 @@ protected void refreshMonthTitleTextView() { String monthTitle = DateUtils.formatDateRange(getActivity(), monthYearFormatter, millis, millis, MONTH_YEAR_FLAG).toString(); - monthTitleTextView.setText(monthTitle.toUpperCase(Locale.getDefault())); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { + monthTitle = monthTitle.toUpperCase(Locale.getDefault()); + } + + monthTitleTextView.setText(monthTitle); } /** diff --git a/caldroid/src/main/res/values/styles.xml b/caldroid/src/main/res/values/styles.xml index a9732cb..faf3cf7 100644 --- a/caldroid/src/main/res/values/styles.xml +++ b/caldroid/src/main/res/values/styles.xml @@ -1,5 +1,5 @@ - +