diff --git a/app/src/main/java/org/cutem/cutecalendar/model/TodoItemUtil.java b/app/src/main/java/org/cutem/cutecalendar/model/TodoItemUtil.java index 5af62f8..f18c066 100644 --- a/app/src/main/java/org/cutem/cutecalendar/model/TodoItemUtil.java +++ b/app/src/main/java/org/cutem/cutecalendar/model/TodoItemUtil.java @@ -372,4 +372,23 @@ public class TodoItemUtil { return !isBeforeStart(item) && !isEnded(item); } + private static String[] TYPE_NAME = { + "unknown", + "others", + "conference", + "date", + "trip", + "anniversary", + "course", + "interview" + }; + + public static String translateType(int type) { + if (1 <= type && type < TYPE_NAME.length) { + return TYPE_NAME[type]; + } else { + return TYPE_NAME[0]; + } + } + }