GridView网络,加载缓慢,有时候加载不出来 网络异步数据gridview 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 [{"subitem":{"picture":null,"name":"\u6e05\u6d17\u8863\u7269\u3001\u88ab\u8925","subitemid":"1"}},{"subitem":{"picture":null,"name":"\u5bb6\u5ead\u4fdd\u6d01","subitemid":"2"}},{"subitem":{"picture":null,"name":"\u5bb6\u7535\u7ef4\u4fee","subitemid":"3"}},{"subitem":{"picture":null,"name":"\u758f\u901a\u4e0b\u6c34\u7ba1\u9053","subitemid":"4"}},{"subitem":{"picture":null,"name":"\u6e05\u6d17\u6cb9\u70df\u673a","subitemid":"5"}},{"item":{"picture":null,"name":"\u5bb6\u653f\u670d\u52a1","describe":"\u5bb6\u653f\u670d\u52a1\uff1a\u8d1f\u8d23\u5bb6\u5ead\u7684\u4e00\u4e9b\u7410\u788e\u4e8b\uff0c\u4f8b\u5982\u6e05\u6d17\u8863\u7269\u3001\u88ab\u8925\u3001\u4fdd\u6d01\uff0c\u5bb6\u7535\u7ef4\u4fee\uff0c\u758f\u901a\u4e0b\u6c34\u7ba1\u9053\uff0c\u6e05\u6d17\u6cb9\u70df\u673a\u3002","notes":null}}] 自己琢磨出来了。现在取数据跟飞一样。 JSONArray jsonArray = new JSONArray(result); for (int i = 0; i < jsonArray.length() - 1; i++) { JSONObject js = jsonArray.getJSONObject(i); String json = js.getString("subitem"); JSONObject jsonObject = new JSONObject(json); name = jsonObject.getString("name"); subitemid = jsonObject.getString("subitemid"); Log.v("zyz", name + "-------"); Log.v("zyz", subitemid + "-------"); Picture picture = new Picture(name, images[i]); list.add(picture); } adapter = new GridViewAdapter(IndexTow.this, list); gridView.setAdapter(adapter); adapter.notifyDataSetChanged(); 有没有人知道为啥2.3的开关怎么在4.0上变成了checkbox?非常感谢~~~ 显示歌词就出错!为什么? listview的背景色丢失 寻找软件:装在android手机上可以查看log信息 求教~~几个问题~~ TableLayout佈局問題 第一次android编程,遇到困难求大神帮忙! 最新百分百获得100QB话费活动!!! MT6580(android5.1)做横屏,物理旋转90度之后,开机动画只显示三分之二 请问安装Android stdio 怎么换模拟器? ffmpeg可以做rtsp服务器吗? android 5.0的摄像头类修改了吗?
JSONArray jsonArray = new JSONArray(result);
for (int i = 0; i < jsonArray.length() - 1; i++) {
JSONObject js = jsonArray.getJSONObject(i);
String json = js.getString("subitem");
JSONObject jsonObject = new JSONObject(json);
name = jsonObject.getString("name");
subitemid = jsonObject.getString("subitemid");
Log.v("zyz", name + "-------");
Log.v("zyz", subitemid + "-------");
Picture picture = new Picture(name, images[i]);
list.add(picture);
}
adapter = new GridViewAdapter(IndexTow.this, list);
gridView.setAdapter(adapter);
adapter.notifyDataSetChanged();