public void getTitleInfo1() {
// 网络请求数据
HttpUtils httpUtils = new HttpUtils();
String path = "请求网址";
httpUtils.send(HttpMethod.GET, path, new RequestCallBack<String>() {
@Override
public void onFailure(HttpException arg0, String arg1) {
}
@Override
public void onSuccess(ResponseInfo<String> info) {
String result = info.result;
// gson解析
Gson gson = new Gson();
//HpViewPagerBean bean包
HpViewPagerBean fromJson = gson.fromJson(result,
HpViewPagerBean.class);
ad1BeanList.addAll(fromJson.data.ad1);
//跟新适配器 适配器de操作
}
});
}