diff options
author | Mason Tang <masontang@google.com> | 2010-08-02 12:01:40 -0700 |
---|---|---|
committer | Mason Tang <masontang@google.com> | 2010-08-03 15:43:30 -0700 |
commit | d7c7f2ab6fdb55451ead2d54819ba8f37af2d0a7 (patch) | |
tree | 8b4419d7706ee82f8cfe33e0e28d6561261e5992 /src/com/android/calendar/Utils.java | |
parent | c9656c9e42d9bb640688648b9dfe8d9f4e16b47d (diff) | |
download | android_packages_apps_Calendar-d7c7f2ab6fdb55451ead2d54819ba8f37af2d0a7.tar.gz android_packages_apps_Calendar-d7c7f2ab6fdb55451ead2d54819ba8f37af2d0a7.tar.bz2 android_packages_apps_Calendar-d7c7f2ab6fdb55451ead2d54819ba8f37af2d0a7.zip |
Added support for specifying a timezone for an individual event (DO NOT MERGE)
- Changed the EditEvent view to support configuring a timezone
- Added a custom TimezoneAdapter
Change-Id: I03b34cf0d5c137e3429ac14b75e88f2b5fcc0a37
Diffstat (limited to 'src/com/android/calendar/Utils.java')
-rw-r--r-- | src/com/android/calendar/Utils.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/android/calendar/Utils.java b/src/com/android/calendar/Utils.java index d37c7ffb..9a201aeb 100644 --- a/src/com/android/calendar/Utils.java +++ b/src/com/android/calendar/Utils.java @@ -225,6 +225,28 @@ public class Utils { } /** + * Returns a list joined together by the provided delimiter, for example, + * ["a", "b", "c"] could be joined into "a,b,c" + * + * @param things the things to join together + * @param delim the delimiter to use + * @return a string contained the things joined together + */ + public static String join(List<?> things, String delim) { + StringBuilder builder = new StringBuilder(); + boolean first = true; + for (Object thing : things) { + if (first) { + first = false; + } else { + builder.append(delim); + } + builder.append(thing.toString()); + } + return builder.toString(); + } + + /** * Sets the time to the beginning of the day (midnight) by clearing the * hour, minute, and second fields. */ |