add translateType method

This commit is contained in:
hlq07 2018-05-27 17:31:45 +08:00
parent 2b2d2a1785
commit 2dc659cada
1 changed files with 19 additions and 0 deletions

View File

@ -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];
}
}
}