|
|
@@ -2,6 +2,7 @@ package com.xzjmyk.pm.activity.ui.erp.activity.crm;
|
|
|
|
|
|
import android.content.Context;
|
|
|
import android.content.Intent;
|
|
|
+import android.content.res.Resources;
|
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
|
import android.os.Bundle;
|
|
|
import android.os.Handler;
|
|
|
@@ -473,32 +474,36 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
|
|
|
progressDialog.dismiss();
|
|
|
Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
|
|
|
String json = msg.getData().getString("result");
|
|
|
- JSONArray array = JSON.parseObject(json).getJSONArray("stages");
|
|
|
- labels=new String[array.size()];
|
|
|
- if (!array.isEmpty()) {
|
|
|
- for (int i = 0; i < array.size(); i++) {
|
|
|
- // lists.add(array.getJSONObject(i).getString("BS_NAME"));
|
|
|
- labels[i]=array.getJSONObject(i).getString("BS_NAME");
|
|
|
+ try {
|
|
|
+ JSONArray array = JSON.parseObject(json).getJSONArray("stages");
|
|
|
+ labels=new String[array.size()];
|
|
|
+ if (!array.isEmpty()) {
|
|
|
+ for (int i = 0; i < array.size(); i++) {
|
|
|
+ // lists.add(array.getJSONObject(i).getString("BS_NAME"));
|
|
|
+ labels[i]=array.getJSONObject(i).getString("BS_NAME");
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (labels!=null){
|
|
|
- int position=0;
|
|
|
- for (int i=0;i<labels.length;i++){
|
|
|
- if (labels[i].equals(bc_currentprocess.getText().toString())){
|
|
|
- position=i;
|
|
|
+ if (labels!=null){
|
|
|
+ int position=0;
|
|
|
+ for (int i=0;i<labels.length;i++){
|
|
|
+ if (labels[i].equals(bc_currentprocess.getText().toString())){
|
|
|
+ position=i;
|
|
|
+ }
|
|
|
}
|
|
|
+ LogUtil.d(JSON.toJSONString(labels));
|
|
|
+ LogUtil.d(JSON.toJSONString(position));
|
|
|
+ LogUtil.d(bc_currentprocess.getText().toString());
|
|
|
+ mStepsView.setCompletedPosition(position%labels.length)
|
|
|
+ .setLabels(labels)
|
|
|
+ .setBarColorIndicator(
|
|
|
+ ct.getResources().getColor(R.color.light_gray))
|
|
|
+ .setProgressColorIndicator(ct.getResources().getColor(R.color.orange))
|
|
|
+ .setLabelColorIndicator(ct.getResources().getColor(R.color.orange))
|
|
|
+ .drawView();
|
|
|
}
|
|
|
- LogUtil.d(JSON.toJSONString(labels));
|
|
|
- LogUtil.d(JSON.toJSONString(position));
|
|
|
- LogUtil.d(bc_currentprocess.getText().toString());
|
|
|
- mStepsView.setCompletedPosition(position%labels.length)
|
|
|
- .setLabels(labels)
|
|
|
- .setBarColorIndicator(
|
|
|
- ct.getResources().getColor(R.color.light_gray))
|
|
|
- .setProgressColorIndicator(ct.getResources().getColor(R.color.orange))
|
|
|
- .setLabelColorIndicator(ct.getResources().getColor(R.color.orange))
|
|
|
- .drawView();
|
|
|
+ } catch (Resources.NotFoundException e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
break;
|
|
|
case LOAD_STAGEPOINT:
|
|
|
@@ -506,24 +511,28 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
|
|
|
Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
|
|
|
json = msg.getData().getString("result");
|
|
|
LogUtil.d(JSON.toJSONString(json));
|
|
|
- JSONArray data=JSON.parseObject(json).getJSONArray("data");
|
|
|
- int size=data.size();
|
|
|
- List<SimpleData> simpleDatas=new ArrayList<>();
|
|
|
- JSONArray value=data.getJSONObject(0).getJSONArray("value");
|
|
|
- for (int j=0;j<value.size();j++){
|
|
|
- for(int i=0;i<data.size();i++){
|
|
|
- SimpleData simpleData=new SimpleData();
|
|
|
- simpleData.setLeft(data.getJSONObject(i).getString("caption"));
|
|
|
- simpleData.setRight(data.getJSONObject(i).getJSONArray("value").get(j).toString());
|
|
|
- simpleData.setGroupId(j);
|
|
|
- simpleDatas.add(simpleData);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- mAapter=new StickyListAdapter(mContext,simpleDatas);
|
|
|
- mList.setAdapter(mAapter);
|
|
|
-
|
|
|
-
|
|
|
+ try {
|
|
|
+ JSONArray data=JSON.parseObject(json).getJSONArray("data");
|
|
|
+ int size=data.size();
|
|
|
+ List<SimpleData> simpleDatas=new ArrayList<>();
|
|
|
+ JSONArray value=data.getJSONObject(0).getJSONArray("value");
|
|
|
+ for (int j=0;j<value.size();j++){
|
|
|
+ for(int i=0;i<data.size();i++){
|
|
|
+ SimpleData simpleData=new SimpleData();
|
|
|
+ simpleData.setLeft(data.getJSONObject(i).getString("caption"));
|
|
|
+ simpleData.setRight(data.getJSONObject(i).getJSONArray("value").get(j).toString());
|
|
|
+ simpleData.setGroupId(j);
|
|
|
+ simpleDatas.add(simpleData);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ mAapter=new StickyListAdapter(mContext,simpleDatas);
|
|
|
+ mList.setAdapter(mAapter);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
}
|