add translateType method
This commit is contained in:
parent
2b2d2a1785
commit
2dc659cada
|
@ -372,4 +372,23 @@ public class TodoItemUtil {
|
||||||
return !isBeforeStart(item) && !isEnded(item);
|
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];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue