取得数据 在活动开始的时候,就向服务器发送一个请求,然后我们得到返回的json数据。 private void init() { handler=new ReportDetailJsonHandler(); formUtil = new GetServerReportInfoUtil(handler, this); startMonth=getIntent().getExtras().getString("startMonth"); endMonth=getIntent().getExtras().getString("endMonth"); currentYear=getIntent().getExtras().getString("currentYear"); formUtil.getJsonInfoIdFromServer(startMonth,endMonth ,currentYear); } class ReportDetailJsonHandler extends Handler { @Override public void handleMessage(Message msg) { // TODO Auto-generated method stub super.handleMessage(msg); switch (msg.what) { ... ... ... case HandlerCASE.MSG_DONE_SECOND: for (ReportDetailInfoBean bean : formUtil.getResponseForm() .getData()) { if (!"部门名称".equals(bean.getAttr1())) { dataList.add(bean); } } drawChart(); break; case HandlerCASE.MSG_NODATA: ... ... ... default: break; } } } 至此我们得到了List dataList |
|广告服务|关于我们|Archiver|手机版|小黑屋|大数据人 ( 鄂ICP备14012176号-2 )
GMT+8, 2024-11-22 03:08 , Processed in 0.183789 second(s), 21 queries .
Powered by 小雄! X3.2
© 2014-2020 bigdataer Inc.