当前位置:宝石小说>科幻灵异>小米那些事儿_测试> 第二十七章
阅读设置(推荐配合 快捷键[F11] 进入全屏沉浸式阅读)

设置X

第二十七章(2 / 2)

Gson gson = new Gson();

Type type = new TypeToken<><baselistdatabean<chapterbean>>>() {}.getType();

try {

result = gson.fromJson(json, type);

记录最后章节id

ArrayList<ChapterBean> data = result.getData().getData();

spUtil.putString(book_id2 + "_stChapterId", data.get(data.size()-1).getId());

spUtil.putInt("chap_count_" + book_id2, data.size());

} catch (JsonSyntaxException e) {

数据解析失败

ToastAlone.show(mContext, "数据解析失败");

e.printStackTrace();

return;

}

if (null == result || null == result.getData()

|| !"1".equals(result.getResult())) {

ToastAlone.show(mContext, result.getError_msg());

} else {

保存章节总数

spUtil.putInt("chap_count_" + book_id, result.getData().getData().size());

BookFileUtils.saveBookDirectory(json, book_id2);

}

handler.sendEmptyMessage(2);BaseDataBean<baselistdatabean<chapterbean>> result;

Gson gson = new Gson();

Type type = new TypeToken<><baselistdatabean<chapterbean>>>() {}.getType();

try {

result = gson.fromJson(json, type);

记录最后章节id

ArrayList<ChapterBean> data = result.getData().getData();

spUtil.putString(book_id2 + "_stChapterId", data.get(data.size()-1).getId());

spUtil.putInt("chap_count_" + book_id2, data.size());

} catch (JsonSyntaxException e) {

数据解析失败

ToastAlone.show(mContext, "数据解析失败");

e.printStackTrace();

return;

}

if (null == result || null == result.getData()

|| !"1".equals(result.getResult())) {

ToastAlone.show(mContext, result.getError_msg());

} else {

保存章节总数

spUtil.putInt("chap_count_" + book_id, result.getData().getData().size());

BookFileUtils.saveBookDirectory(json, book_id2);

}

handler.sendEmptyMessage(2);</baselistdatabean<chapterbean>></baselistdatabean<chapterbean>></baselistdatabean<chapterbean>></baselistdatabean<chapterbean>></baselistdatabean<chapterbean>></baselistdatabean<chapterbean>></baselistdatabean<chapterbean>></baselistdatabean<chapterbean>>@@

返回首页 上一页 目录 下一章

Copyright 2021宝石小说All Rights Reserved