Search in sources :

Example 1 with RankingBean

use of cn.liuyin.manhua.data.bean.RankingBean in project Manhua by ag2s20150909.

the class HomeActivity method getNew.

public void getNew() {
    new Thread(new Runnable() {

        @Override
        public void run() {
            API api = new API();
            try {
                SearchResult d = new SearchResult();
                RankingBean data = gson.fromJson(api.getRanking("newOnline", 1, 100), RankingBean.class);
                d.add(data);
                mHander.obtainMessage(1, d).sendToTarget();
            } catch (Exception e) {
                FileTool.writeError(e);
                mHander.obtainMessage(0, e.getLocalizedMessage()).sendToTarget();
            }
        }
    }).start();
}
Also used : API(cn.liuyin.manhua.data.api.API) SearchResult(cn.liuyin.manhua.data.bean.SearchResult) RankingBean(cn.liuyin.manhua.data.bean.RankingBean)

Aggregations

API (cn.liuyin.manhua.data.api.API)1 RankingBean (cn.liuyin.manhua.data.bean.RankingBean)1 SearchResult (cn.liuyin.manhua.data.bean.SearchResult)1