tab解析json

public class Tab1 extends BaseFragment {

private PullToRefreshListView pull;
private String url = "http://v.juhe.cn/toutiao/index?type=top&key=dbedecbcd1899c9785b95cc2d17131c5";
ArrayList data;

@Override
protected int bindLayout() {
    return R.layout.tab1;
}

@Override
protected void initView() {
    pull = bindView(R.id.pull);

}

@Override
protected void initData() {
    HttpUtils.getAsyncTask(url, new HttpUtils.CallBackA() {

        @Override
        public void getData(String s) {
            Toast.makeText(getActivity(),s,Toast.LENGTH_LONG).show();

           /* Gson gson = new Gson();
            Json json = gson.fromJson(s, Json.class);
            data = json.getResult().getData();
            Adapter adapter = new Adapter(data,getActivity());
            pull.setAdapter(adapter);*/



        }
    });


}

@Override
protected void bindEvent() {

}

}

你可能感兴趣的:(tab解析json)