摘要:
public static Object returnObject(String jsonStr, Class objClass) {if (jsonStr == null) {return null;}Object obj = null;try {obj = mapper.readValue(js 阅读全文
摘要:
代码 添加依赖:implementation 'org.greenrobot:eventbus:3.0.0'1注册并声明订阅者,然后发布事件最后解除注册 @Override protected void onCreate(Bundle savedInstanceState) { super.onCr 阅读全文
摘要:
public class TimeUtils { public static final int YEAR = 0; public static final int MONTH = 1; public static final int DAY = 2; public static final int 阅读全文
摘要:
导入依赖:implementation 'com.squareup:otto:1.3.8'1定义一个类继承Bus,并且设置单列模式注册和声明订阅者发送事件,最后解除注册与EventBus相同EventBus与Otto的区别 Otto需要写一个类去继承BusOtto需要写单列模式 阅读全文
摘要:
public static Object returnObject(String jsonStr, Class objClass) { if (jsonStr == null) { return null; } Object obj = null; try { obj = mapper.readVa 阅读全文