this.mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { getBoss( FragmentBossList.this.mBeans.get(position).getmId()); Log.e("TTT", "1: " + strings); }}); public void getBoss(String id){ this.mActivity.showProgressDialog(); Api.getBoss(id, new Api.OnResponseListener() { @Override public void onError(String paramAnonymousString) { FragmentBossList.this.mActivity.showShortToast(paramAnonymousString); FragmentBossList.this.mActivity.dismissProgressDialog(); } @Override public void onResponse(String paramAnonymousString) { Result localResult = Result.parse(paramAnonymousString); if (localResult.success()) { listBossBean.clear(); listBossBean = BossBean.parsePro(localResult.mData); Log.e("TTT", "0: " + listBossBean.toString()); if (paramAnonymousString == null) { onError("数据加载失败"); return; } ArrayList<String> list=new ArrayList<String>(); list.clear(); if(listBossBean.size() > 0){ list.add("诊所:"+listBossBean.get(0).getmName()); list.add("负责人:"+listBossBean.get(0).getmBossName()); list.add("联系电话:"+listBossBean.get(0).getmBossPhone()); list.add("地址:"+listBossBean.get(0).getmAddress()); list.add("账户:"+listBossBean.get(0).getmAccount()); list.add("密码:"+listBossBean.get(0).getmPassword()); list.add("最后一次入库时间:"+listBossBean.get(0).getmLastDate()); } strings = new String[list.size()]; for(int i=0;i<list.size();i++){ strings[i]=list.get(i); } Log.e("TTT", "0: " + strings); FragmentBossList.this.mActivity.dismissProgressDialog(); new AlertDialog.Builder(mActivity) .setTitle("诊所详情") //.setMessage("id = " + FragmentBossList.this.mBeans.get(position).getmId() + "号") //.setItems(new String[] { "诊所:友新街道社区卫生服务中心", "负责人:孙珏", "联系电话:80815547", "地址:吴中西路909号沧浪新城汇邻中心1层", "归口集中点:", "账户:youxinjiedao", "密码:Hw7rG07n" }, null) .setItems(strings, null)// .setItems(Integer.parseInt(strings[2]), new DialogInterface.OnClickListener() {// @Override// public void onClick(DialogInterface dialog, int which) {//// Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:10010"));// startActivity(intent);// }// }) .setNegativeButton("确定", null) .show(); } else{ onError(localResult.mErrMsg); } } }); }
添加回答
举报
0/150
提交
取消