use of org.qii.weiciyuan.bean.CommentListBean in project weiciyuan by qii.
the class CommentsByIdTimeLineFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
bean = new CommentListBean();
setHasOptionsMenu(true);
setRetainInstance(false);
}
use of org.qii.weiciyuan.bean.CommentListBean in project weiciyuan by qii.
the class CommentsByIdMsgLoader method loadData.
public CommentListBean loadData() throws WeiboException {
CommentsTimeLineByIdDao dao = new CommentsTimeLineByIdDao(token, id);
dao.setSince_id(sinceId);
dao.setMax_id(maxId);
CommentListBean result = null;
lock.lock();
try {
result = dao.getGSONMsgList();
} finally {
lock.unlock();
}
return result;
}
use of org.qii.weiciyuan.bean.CommentListBean in project weiciyuan by qii.
the class CommentsByMeMsgLoader method loadData.
public CommentListBean loadData() throws WeiboException {
CommentsTimeLineByMeDao dao = new CommentsTimeLineByMeDao(token);
dao.setSince_id(sinceId);
dao.setMax_id(maxId);
CommentListBean result = null;
lock.lock();
try {
result = dao.getGSONMsgList();
} finally {
lock.unlock();
}
return result;
}
use of org.qii.weiciyuan.bean.CommentListBean in project weiciyuan by qii.
the class MentionsCommentMsgLoader method loadData.
public CommentListBean loadData() throws WeiboException {
MentionsCommentTimeLineDao dao = new MentionsCommentTimeLineDao(token);
dao.setSince_id(sinceId);
dao.setMax_id(maxId);
CommentListBean result = null;
lock.lock();
try {
result = dao.getGSONMsgList();
} finally {
lock.unlock();
}
return result;
}
use of org.qii.weiciyuan.bean.CommentListBean in project weiciyuan by qii.
the class CommentsTimeLineByMeDao method getGSONMsgList.
public CommentListBean getGSONMsgList() throws WeiboException {
String url = URLHelper.COMMENTS_BY_ME_TIMELINE;
Map<String, String> map = new HashMap<String, String>();
map.put("access_token", access_token);
map.put("since_id", since_id);
map.put("max_id", max_id);
map.put("count", count);
map.put("page", page);
map.put("filter_by_source", filter_by_source);
String jsonData = HttpUtility.getInstance().executeNormalTask(HttpMethod.Get, url, map);
Gson gson = new Gson();
CommentListBean value = null;
try {
value = gson.fromJson(jsonData, CommentListBean.class);
} catch (JsonSyntaxException e) {
AppLogger.e(e.getMessage());
}
if (value != null && value.getSize() > 0) {
List<CommentBean> msgList = value.getItemList();
Iterator<CommentBean> iterator = msgList.iterator();
while (iterator.hasNext()) {
CommentBean msg = iterator.next();
if (msg.getUser() == null) {
iterator.remove();
} else {
msg.getListViewSpannableString();
TimeUtility.dealMills(msg);
}
}
}
return value;
}
Aggregations