Browse Source

no message

master
lh 7 years ago
parent
commit
4de1b95ec5
2 changed files with 49 additions and 0 deletions
  1. +47
    -0
      app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/PoultryDataChartActivity.java
  2. +2
    -0
      app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/PoultryReportActvity.java

+ 47
- 0
app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/PoultryDataChartActivity.java View File

@ -8,7 +8,12 @@ import android.widget.TextView;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseActivity;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.OnClick;
import lecho.lib.hellocharts.model.AxisValue;
import lecho.lib.hellocharts.view.LineChartView;
/**
@ -33,6 +38,17 @@ public class PoultryDataChartActivity extends BaseActivity {
private long House_ID;
private String House_Name;
private int type=-1;
///< 横坐标
private List<AxisValue> mAxisXValuesList = new ArrayList<AxisValue>();
///< 横坐标
List<String> hengzuobiaolist = new ArrayList<>();
String[] date;//X轴的标注
///< 指标数据
List listshuju = new ArrayList();
Float[] score;//图表的数据
@Override
protected int setLayoutId() {
return R.layout.act_poultry_data_chart;
@ -52,11 +68,42 @@ public class PoultryDataChartActivity extends BaseActivity {
protected void initData() {
House_ID = getIntent().getLongExtra("House_ID",-1);
House_Name = getIntent().getStringExtra("House_Name");
type = getIntent().getIntExtra("TYPE",-1);
tv_toolbar_title.setText(House_Name);
if (type == 1){
ll_chandanlv.setVisibility(View.GONE);
}
}
@Override
protected void initOper() {
}
@Override
protected void onResume() {
super.onResume();
HouseView("母死淘","#da4848");
}
private void HouseView(final String item, final String color) {
}
@OnClick({R.id.ll_musitao, R.id.ll_muzhiliaoliang, R.id.ll_chandanlv})
public void OnClick(View view){
switch (view.getId()){
case R.id.ll_musitao:
HouseView("母死淘","#da4848");
break;
case R.id.ll_muzhiliaoliang:
HouseView("母只料量","#d16ee3");
break;
case R.id.ll_chandanlv:
HouseView("产蛋率","#e6d621");
break;
}
}
}

+ 2
- 0
app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/PoultryReportActvity.java View File

@ -85,6 +85,7 @@ public class PoultryReportActvity extends BaseActivity {
Intent intent = new Intent(PoultryReportActvity.this,PoultryDataChartActivity.class);
intent.putExtra("House_ID",l);
intent.putExtra("House_Name",reportBeanList.get(i).getHouse_Name());
intent.putExtra("TYPE",1);
startActivity(intent);
}
});
@ -94,6 +95,7 @@ public class PoultryReportActvity extends BaseActivity {
Intent intent = new Intent(PoultryReportActvity.this,PoultryDataChartActivity.class);
intent.putExtra("House_ID",l);
intent.putExtra("House_Name",reportBeanList.get(i).getHouse_Name());
intent.putExtra("TYPE",1);
startActivity(intent);
}
});


Loading…
Cancel
Save