|
@@ -44,7 +44,7 @@ import java.util.List;
|
|
|
public class HomeFragment extends Fragment implements View.OnClickListener {
|
|
|
|
|
|
private Button btStartTask;
|
|
|
- private ImageView ivHomeBeauty;
|
|
|
+ private ImageView ivHomeBeauty, ivCompanyTop;
|
|
|
private Dialog mCameraDialog;
|
|
|
private TextView tvCompany, tvTopCompany;
|
|
|
private MyPieView pieView, pieViewHazard;
|
|
@@ -75,6 +75,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener {
|
|
|
btStartTask = getView().findViewById(R.id.bt_home_start_task);
|
|
|
btStartTask.setOnClickListener(this);
|
|
|
ivHomeBeauty = getView().findViewById(R.id.iv_home_beauty);
|
|
|
+ ivCompanyTop = getView().findViewById(R.id.iv_home_company_top);
|
|
|
pieView = getView().findViewById(R.id.pie_home_risk);
|
|
|
// ArrayList<PieHelper> pieHelperArrayList = new ArrayList<PieHelper>();
|
|
|
// pieHelperArrayList.add(new PieHelper(10, getResources().getColor(R.color.risk_high)));
|
|
@@ -338,9 +339,9 @@ public class HomeFragment extends Fragment implements View.OnClickListener {
|
|
|
JSONArray enterprise_children = data.getJSONArray("enterprise_children");
|
|
|
if (enterprise_children != null){
|
|
|
tvTopCompany.setVisibility(View.VISIBLE);
|
|
|
- getView().findViewById(R.id.iv_home_company_top).setVisibility(View.VISIBLE);
|
|
|
+ ivCompanyTop.setVisibility(View.VISIBLE);
|
|
|
tvTopCompany.setOnClickListener(this);
|
|
|
- getView().findViewById(R.id.iv_home_company_top).setOnClickListener(this);
|
|
|
+ ivCompanyTop.setOnClickListener(this);
|
|
|
enterpriseItems.clear();
|
|
|
for (int i = 0; i < enterprise_children.size(); i++) {
|
|
|
JSONObject enterprise = enterprise_children.getJSONObject(i);
|
|
@@ -348,7 +349,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener {
|
|
|
}
|
|
|
} else {
|
|
|
tvTopCompany.setVisibility(View.INVISIBLE);
|
|
|
- getView().findViewById(R.id.iv_home_company_top).setVisibility(View.INVISIBLE);
|
|
|
+ ivCompanyTop.setVisibility(View.INVISIBLE);
|
|
|
}
|
|
|
}
|
|
|
|