diff options
author | Nicolai Ehemann <en@enlightened.de> | 2013-02-20 16:50:42 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-03-08 04:26:58 -0800 |
commit | 240aa3b805a19922c62160728c4ff38922de2033 (patch) | |
tree | 77d6bd195de5a2d35c81d6068b966c1b6450166a /src/com/cyanogenmod/lockclock/misc/Constants.java | |
parent | d1bb45388d1ec074bf1d210b286c34129b64df36 (diff) | |
download | android_packages_apps_LockClock-240aa3b805a19922c62160728c4ff38922de2033.tar.gz android_packages_apps_LockClock-240aa3b805a19922c62160728c4ff38922de2033.tar.bz2 android_packages_apps_LockClock-240aa3b805a19922c62160728c4ff38922de2033.zip |
cLock: Updates to how dates are displayed in calendar entries
This commit:
- Removes the display of the date in calendar entries when the
interval is below one week
- Switches formatting of date in calendar entries from manual
localized formatting strings to DateUtils locale-aware format methods
- Adds full date if events are > 1 week
Screenshots:
- Before:
https://dl.dropbox.com/u/39911341/screenshot_confusing_appointments.png
- After:
https://dl.dropbox.com/u/39911341/screenshot_confusing_appointments_fixed.png
Change-Id: I29883fc9c81229d4fd25a74428a997eef1c27c62
Diffstat (limited to 'src/com/cyanogenmod/lockclock/misc/Constants.java')
-rw-r--r-- | src/com/cyanogenmod/lockclock/misc/Constants.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/lockclock/misc/Constants.java b/src/com/cyanogenmod/lockclock/misc/Constants.java index bc62401..1307513 100644 --- a/src/com/cyanogenmod/lockclock/misc/Constants.java +++ b/src/com/cyanogenmod/lockclock/misc/Constants.java @@ -16,6 +16,8 @@ package com.cyanogenmod.lockclock.misc; +import android.text.format.DateUtils; + public class Constants { public static final boolean DEBUG = false; @@ -53,4 +55,18 @@ public class Constants { public static final String WEATHER_DATA = "weather_data"; public static final int MAX_CALENDAR_ITEMS = 3; + public static final int CALENDAR_FORMAT_TIME = + DateUtils.FORMAT_SHOW_TIME + | DateUtils.FORMAT_NO_NOON + | DateUtils.FORMAT_NO_MIDNIGHT; + public static final int CALENDAR_FORMAT_ABBREV_DATE = + DateUtils.FORMAT_SHOW_WEEKDAY + | DateUtils.FORMAT_ABBREV_ALL + | DateUtils.FORMAT_SHOW_DATE; + public static final int CALENDAR_FORMAT_ABBREV_DATETIME = + CALENDAR_FORMAT_ABBREV_DATE + | CALENDAR_FORMAT_TIME; + public static final int CALENDAR_FORMAT_ALLDAY = CALENDAR_FORMAT_ABBREV_DATE; + public static final int CALENDAR_FORMAT_TODAY = CALENDAR_FORMAT_TIME; + public static final int CALENDAR_FORMAT_FUTURE = CALENDAR_FORMAT_ABBREV_DATETIME; } |