标签:
private void prepareData() { // 请求网络数据 new Thread() { public void run() { String vp_data = NetWorkUtil.getdataByClient(URL_1); // 解析获取的json文件 Gson g = new Gson(); Type type = new TypeToken<List<SuperClass_vp>>() { }.getType(); list_vp = g.fromJson(vp_data, type); // 循环为控件赋值 BitmapUtils bit = new BitmapUtils(MainActivity.this); imgs = new ArrayList<ImageView>(); for (int i = 0; i < list_vp.size(); i++) { ImageView img = new ImageView(MainActivity.this); bit.display(img, "http://172.17.29.120/localuser/ljy/jc/" + list_vp.get(i).getSrc()); imgs.add(img); } handler.sendEmptyMessage(1); }; }.start(); }
标签:
原文地址:http://www.cnblogs.com/1426837364qqcom/p/5147821.html