【发布时间】:2020-05-23 02:20:38
【问题描述】:
我有一个这样的枚举:
public enum Type {
VIDEO(10,"video"),
AUDIO(11,"audio");
int code;
String desc;
Type(int code,String desc){
this.code = code;
this.desc = desc;
}
}
但是,在Android中不推荐使用枚举,用typedef怎么做,或者有其他更好的方法吗?
【问题讨论】: