//解析 private void myinitData() { RequestParams parms=new RequestParams("http://huixinguiyu.cn/Assets/js/data.js"); x.http().get(parms, new Callback.CommonCallback<String>() { //请求数据成功 @Override public void onSuccess(String result) { Gson gson=new Gson(); InifBean bean = gson.fromJson(result, InifBean.class); List<InifBean.ApkBean> apklist = bean.getApk(); if(adapter==null){ adapter=new MyAdapter(getActivity(),apklist); xlv.setAdapter(adapter); }else{ adapter.loadmore(apklist,flog); } } //请求数据失败要做的 @Override public void onError(Throwable ex, boolean isOnCallback) { } //取消 @Override public void onCancelled(CancelledException cex) { } //最后要做的 @Override public void onFinished() { } });
x.Ext.init(this);