diff options
author | Matt Garnes <matt@cyngn.com> | 2014-11-11 17:55:27 -0800 |
---|---|---|
committer | Matt Garnes <matt@cyngn.com> | 2014-11-13 16:20:18 -0800 |
commit | 47851abf10de03162f18eb0620650f1f0b0c4232 (patch) | |
tree | 445840854eb02714632243b5046c72a07c933110 /src/com/android/calendar/month/MonthWeekEventsView.java | |
parent | 4f65ce8f7e3b63754b532fb4c87057b287f692fe (diff) | |
download | android_packages_apps_Calendar-47851abf10de03162f18eb0620650f1f0b0c4232.tar.gz android_packages_apps_Calendar-47851abf10de03162f18eb0620650f1f0b0c4232.tar.bz2 android_packages_apps_Calendar-47851abf10de03162f18eb0620650f1f0b0c4232.zip |
Revert "Calendar: To display the complex lunar info."
This reverts commit 3dc108642c87bc85085e7b5dd40d0a227ead24ff.
Diffstat (limited to 'src/com/android/calendar/month/MonthWeekEventsView.java')
-rw-r--r-- | src/com/android/calendar/month/MonthWeekEventsView.java | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/src/com/android/calendar/month/MonthWeekEventsView.java b/src/com/android/calendar/month/MonthWeekEventsView.java index 70b0d652..a5dd5dae 100644 --- a/src/com/android/calendar/month/MonthWeekEventsView.java +++ b/src/com/android/calendar/month/MonthWeekEventsView.java @@ -67,7 +67,7 @@ public class MonthWeekEventsView extends SimpleWeekView { /* NOTE: these are not constants, and may be multiplied by a scale factor */ private static int TEXT_SIZE_MONTH_NUMBER = 32; - private static int TEXT_SIZE_LUNAR = 20; + private static int TEXT_SIZE_LUNAR = 18; private static int TEXT_SIZE_EVENT = 12; private static int TEXT_SIZE_EVENT_TITLE = 14; private static int TEXT_SIZE_MORE_EVENTS = 12; @@ -93,7 +93,6 @@ public class MonthWeekEventsView extends SimpleWeekView { private static int DAY_SEPARATOR_VERTICAL_LENGTH = 53; private static int DAY_SEPARATOR_VERTICAL_LENGHT_PORTRAIT = 64; private static int MIN_WEEK_WIDTH = 50; - private static int LUNAR_PADDING_LUNAR = 2; private static int EVENT_X_OFFSET_LANDSCAPE = 38; private static int EVENT_Y_OFFSET_LANDSCAPE = 8; @@ -751,34 +750,22 @@ public class MonthWeekEventsView extends SimpleWeekView { } try { - String[] lunarInfo = service.getLunarInfo(year, month, monthDay, true, false) - .split(service.getSeparationForMultiInfo()); - - float originalTextSize = mMonthNumPaint.getTextSize(); - mMonthNumPaint.setTextSize(TEXT_SIZE_LUNAR); - Resources res = getResources(); - int mOrientation = res.getConfiguration().orientation; - - int num = 0; - for (int index = 0; index < lunarInfo.length; index++) { - String info = lunarInfo[index]; - if (TextUtils.isEmpty(info)) continue; - - int infoX = 0; - int infoY = 0; + String display = service.getLunarDay(year, month, monthDay); + if (!TextUtils.isEmpty(display)) { + float originalTextSize = mMonthNumPaint.getTextSize(); + mMonthNumPaint.setTextSize(TEXT_SIZE_LUNAR); + Resources res = getResources(); + int mOrientation = res.getConfiguration().orientation; if (mOrientation == Configuration.ORIENTATION_LANDSCAPE) { - infoX = x - mMonthNumHeight - TOP_PADDING_MONTH_NUMBER; - infoY = y + (mMonthNumHeight + LUNAR_PADDING_LUNAR) * num; + canvas.drawText(display, x - mMonthNumHeight - TOP_PADDING_MONTH_NUMBER, + y , mMonthNumPaint); } else { - infoX = x; - infoY = y + (mMonthNumHeight + LUNAR_PADDING_LUNAR) * (num + 1); + canvas.drawText(display, x, y + mMonthNumHeight + + TOP_PADDING_MONTH_NUMBER, mMonthNumPaint); } - canvas.drawText(info, infoX, infoY, mMonthNumPaint); - num = num + 1; + // restore the text size. + mMonthNumPaint.setTextSize(originalTextSize); } - - // restore the text size. - mMonthNumPaint.setTextSize(originalTextSize); } catch (RemoteException e) { Log.e(TAG, "RemoteException e:" + e.toString()); e.printStackTrace(); |