Browse Source

Merge branch 'developer' of http://192.168.1.5:3000/BWPB3/ytzh_Android

# Conflicts:
#	app/src/main/res/layout/activity_mine_info.xml
master
zhanghui 8 years ago
parent
commit
6b5e16cf18
14 changed files with 767 additions and 3 deletions
  1. +2
    -0
      app/src/main/java/com/qhclh/ytzh/me/MeFragment.java
  2. +2
    -0
      app/src/main/java/com/qhclh/ytzh/me/SettingActivity.java
  3. +161
    -0
      app/src/main/java/com/qhclh/ytzh/work/breedpoultry/DatanalysisActivity.java
  4. +25
    -0
      app/src/main/java/com/qhclh/ytzh/work/breedpoultry/DatanalysisSActivity.java
  5. +12
    -0
      app/src/main/res/drawable/shape_balck.xml
  6. +12
    -0
      app/src/main/res/drawable/shape_blue.xml
  7. +12
    -0
      app/src/main/res/drawable/shape_green.xml
  8. +12
    -0
      app/src/main/res/drawable/shape_perpo.xml
  9. +12
    -0
      app/src/main/res/drawable/shape_red1.xml
  10. +12
    -0
      app/src/main/res/drawable/shape_white.xml
  11. +307
    -1
      app/src/main/res/layout/act_datanaly_s.xml
  12. +174
    -2
      app/src/main/res/layout/act_datanalysis.xml
  13. +4
    -0
      app/src/main/res/values/colors.xml
  14. +20
    -0
      app/src/main/res/values/strings.xml

+ 2
- 0
app/src/main/java/com/qhclh/ytzh/me/MeFragment.java View File

@ -19,6 +19,8 @@ import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import static com.umeng.analytics.pro.x.R;
/**
* Created by 青花瓷 on 2017/11/28.
*/


+ 2
- 0
app/src/main/java/com/qhclh/ytzh/me/SettingActivity.java View File

@ -15,6 +15,8 @@ import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import static com.umeng.analytics.pro.x.R;
public class SettingActivity extends BaseActivity {
@BindView(R.id.tv_phoneNumber)


+ 161
- 0
app/src/main/java/com/qhclh/ytzh/work/breedpoultry/DatanalysisActivity.java View File

@ -1,15 +1,31 @@
package com.qhclh.ytzh.work.breedpoultry;
import android.content.Intent;
import android.graphics.Color;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
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 lecho.lib.hellocharts.formatter.LineChartValueFormatter;
import lecho.lib.hellocharts.formatter.SimpleLineChartValueFormatter;
import lecho.lib.hellocharts.gesture.ZoomType;
import lecho.lib.hellocharts.model.Axis;
import lecho.lib.hellocharts.model.AxisValue;
import lecho.lib.hellocharts.model.Line;
import lecho.lib.hellocharts.model.LineChartData;
import lecho.lib.hellocharts.model.PointValue;
import lecho.lib.hellocharts.model.ValueShape;
import lecho.lib.hellocharts.model.Viewport;
import lecho.lib.hellocharts.view.LineChartView;
/**
* Created by 青花瓷 on 2017/11/30.
@ -18,6 +34,28 @@ import butterknife.BindView;
public class DatanalysisActivity extends BaseActivity {
@BindView(R.id.toolbar)
Toolbar mToolbar;
@BindView(R.id.taget_content1)
TextView taget_content1;
@BindView(R.id.line_chart)
LineChartView lineChart;
///< 横坐标
private List<AxisValue> mAxisXValuesList = new ArrayList<AxisValue>();
///< 横坐标
List<String> hengzuobiaolist = new ArrayList<>();
String[] date;//X轴的标注
///< 指标数据
private List<PointValue> mPointValuesList = new ArrayList<PointValue>();
///< 基准线 标准线
private List<PointValue> mPointValuesList1 = new ArrayList<PointValue>();
///< 指标数据
List listshuju = new ArrayList();
Float[] score;//图表的数据
///< 基准线数据
Float[] score1;
///< 获取到的基准线值
private List listjizhun = new ArrayList();
@Override
protected int setLayoutId() {
return R.layout.act_datanalysis;
@ -35,7 +73,28 @@ public class DatanalysisActivity extends BaseActivity {
@Override
protected void initData() {
taget_content1.setText("20\t\t10\t\t15");
for (int i=0;i<7;i++){
hengzuobiaolist.add("第"+i+"天");
listshuju.add(i+1.0f);
listjizhun.add(i+2.0f);
}
///< 横坐标数据
int lenth = hengzuobiaolist.size();
date = hengzuobiaolist.toArray(new String[lenth]);
///< 批次数据
int length = listshuju.size();
score = (Float[]) listshuju.toArray(new Float[length]);
///< 基准 标准
int size = listjizhun.size();
score1 = (Float[]) listjizhun.toArray(new Float[size]);
getAxisXLables();//获取x轴的标注
getAxisPoints();//获取坐标点
initLineChart();//初始化
}
@Override
@ -60,4 +119,106 @@ public class DatanalysisActivity extends BaseActivity {
}
return super.onOptionsItemSelected(item);
}
/**
* X 轴的显示
*/
private void getAxisXLables() {
mAxisXValuesList.clear();
for (int i = 0; i < date.length; i++) {
mAxisXValuesList.add(new AxisValue(i).setLabel(date[i]));
}
}
/**
* 图表的每个点的显示
*/
private void getAxisPoints() {
mPointValuesList.clear();
mPointValuesList1.clear();
for (int i = 0; i < score.length; i++) {
mPointValuesList.add(new PointValue(i, score[i]));
}
for (int i = 0; i < score1.length; i++) {
mPointValuesList1.add(new PointValue(i, score1[i]));
}
}
/**
* 初始化LineChart的一些设置
*/
private void initLineChart() {
///< 数据
Line line = new Line(mPointValuesList).setColor(Color.parseColor("#336699")); //折线的颜色
///< 标准线
Line line1 = new Line(mPointValuesList1).setColor(Color.parseColor("#2eab71")); //折线的颜色
List<Line> lines = new ArrayList<Line>();
line.setShape(ValueShape.CIRCLE);//折线图上每个数据点的形状 这里是圆形 有三种 ValueShape.SQUARE ValueShape.CIRCLE ValueShape.DIAMOND
line1.setShape(ValueShape.CIRCLE);//折线图上每个数据点的形状 这里是圆形 有三种 ValueShape.SQUARE ValueShape.CIRCLE ValueShape.DIAMOND
line.setCubic(false);//曲线是否平滑
line1.setCubic(false);//曲线是否平滑
// line.setStrokeWidth(3);//线条的粗细默认是3
line1.setStrokeWidth(1);//线条的粗细默认是3
line.setFilled(false);//是否填充曲线的面积
line1.setFilled(false);//是否填充曲线的面积
line.setHasLabels(true);//曲线的数据坐标是否加上备注
line1.setHasLabels(false);//曲线的数据坐标是否加上备注
// line.setHasLabelsOnlyForSelected(true);//点击数据坐标提示数据设置了这个line.setHasLabels(true);就无效
line.setHasLines(true);//是否用直线显示如果为false 则没有曲线只有点显示
line1.setHasLines(true);//是否用直线显示如果为false 则没有曲线只有点显示
line.setHasPoints(true);//是否显示圆点 如果为false 则没有原点只有点显示
line1.setHasPoints(false);//是否显示圆点 如果为false 则没有原点只有点显示
LineChartValueFormatter chartValueFormatter = new SimpleLineChartValueFormatter(2);
line.setFormatter(chartValueFormatter);//显示小数点
line1.setFormatter(chartValueFormatter);//显示小数点
lines.add(line);
lines.add(line1);
LineChartData data = new LineChartData();
data.setLines(lines);
//坐标轴
Axis axisX = new Axis(); //X轴
axisX.setHasTiltedLabels(false); //X轴下面坐标轴字体是斜的显示还是直的true是斜的显示
axisX.setTextColor(Color.WHITE); //设置字体颜色
axisX.setTextColor(Color.parseColor("#336699"));//灰色
// axisX.setName(hengzuobiao); //表格名称
axisX.setTextSize(11);//设置字体大小
axisX.setMaxLabelChars(6); //最多几个X轴坐标意思就是你的缩放让X轴上数据的个数7<=x<=mAxisValues.length
axisX.setValues(mAxisXValuesList); //填充X轴的坐标名称
data.setAxisXBottom(axisX); //x 轴在底部
//// data.setAxisXTop(axisX); //x 轴在顶部
// axisX.setHasLines(true); //x 轴分割线
//
//
Axis axisY = new Axis(); //Y轴
// axisY.setName(zongzuobiao);//y轴标注
axisY.setTextSize(11);//设置字体大小
data.setAxisYLeft(axisY); //Y轴设置在左边
//data.setAxisYRight(axisY); //y轴设置在右边
//设置行为属性支持缩放滑动以及平移
lineChart.setInteractive(true);
lineChart.setZoomType(ZoomType.HORIZONTAL); //缩放类型水平
lineChart.setMaxZoom((float) 10);//缩放比例
lineChart.setLineChartData(data);
lineChart.setVisibility(View.VISIBLE);
/**下面的710只是代表一个数字去类比而已
* 尼玛搞的老子好辛苦http://forum.xda-developers.com/tools/programming/library-hellocharts-charting-library-t2904456/page2;
* 下面几句可以设置X轴数据的显示个数x轴0-7个数据当数据点个数小于29的时候缩小到极致hellochart默认的是所有显示当数据点个数大于29的时候
* 若不设置axisX.setMaxLabelChars(int count)这句话,则会自动适配X轴所能显示的尽量合适的数据个数
* 若设置axisX.setMaxLabelChars(int count)这句话,
* 33个数据点测试 axisX.setMaxLabelChars(10);里面的10大于v.right= 7; 里面的7
刚开始X轴显示7条数据然后缩放的时候X轴的个数会保证大于7小于10
若小于v.right= 7;中的7,反正我感觉是这两句都好像失效了的样子 - -!
* 并且Y轴是根据数据的大小自动设置Y轴上限
* 若这儿不设置 v.right= 7; 这句话则图表刚开始就会尽可能的显示所有数据交互性太差
*/
Viewport v = new Viewport(lineChart.getMaximumViewport());
v.left = 0;
v.right = 6;
lineChart.setCurrentViewport(v);
}
}

+ 25
- 0
app/src/main/java/com/qhclh/ytzh/work/breedpoultry/DatanalysisSActivity.java View File

@ -2,7 +2,10 @@ package com.qhclh.ytzh.work.breedpoultry;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.GridView;
import android.widget.Spinner;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseActivity;
@ -22,8 +25,12 @@ public class DatanalysisSActivity extends BaseActivity {
Toolbar mToolbar;
@BindView(R.id.gv_dataanaly)
GridView gv_dataanaly;
@BindView(R.id.buildinghome)
Spinner buildinghome;
private List<FactryBean> factryBeanList;
private FactryAdapter factryAdapter;
private List<String> list = new ArrayList<String>();
private List<Boolean> factryCheck;
@Override
@ -53,10 +60,28 @@ public class DatanalysisSActivity extends BaseActivity {
}
factryAdapter = new FactryAdapter(this,factryBeanList,factryCheck);
gv_dataanaly.setAdapter(factryAdapter);
list.add("苹果");
list.add("香蕉");
list.add("橘子");
list.add("香蕉");
ArrayAdapter<String> adapter=new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item,list);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
buildinghome.setAdapter(adapter);
}
@Override
protected void initOper() {
buildinghome.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
}
}

+ 12
- 0
app/src/main/res/drawable/shape_balck.xml View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/greyf4f4f4" />
<stroke
android:width="@dimen/dp_0.5"
android:color="@color/black" />
<size
android:width="@dimen/dp_14"
android:height="@dimen/dp_14" />
</shape>

+ 12
- 0
app/src/main/res/drawable/shape_blue.xml View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/blue48dac7" />
<!--<stroke-->
<!--android:width="@dimen/dp_1"-->
<!--android:color="@color/grey888888" />-->
<size
android:width="@dimen/dp_14"
android:height="@dimen/dp_14" />
</shape>

+ 12
- 0
app/src/main/res/drawable/shape_green.xml View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/grenn48da59" />
<!--<stroke-->
<!--android:width="@dimen/dp_1"-->
<!--android:color="@color/grey888888" />-->
<size
android:width="@dimen/dp_14"
android:height="@dimen/dp_14" />
</shape>

+ 12
- 0
app/src/main/res/drawable/shape_perpo.xml View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/perpod26ee4" />
<!--<stroke-->
<!--android:width="@dimen/dp_1"-->
<!--android:color="@color/grey888888" />-->
<size
android:width="@dimen/dp_14"
android:height="@dimen/dp_14" />
</shape>

+ 12
- 0
app/src/main/res/drawable/shape_red1.xml View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/redda4848" />
<!--<stroke-->
<!--android:width="@dimen/dp_1"-->
<!--android:color="@color/grey888888" />-->
<size
android:width="@dimen/dp_14"
android:height="@dimen/dp_14" />
</shape>

+ 12
- 0
app/src/main/res/drawable/shape_white.xml View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<stroke
android:width="@dimen/dp_0.5"
android:color="@color/black" />
<size
android:width="@dimen/dp_14"
android:height="@dimen/dp_14" />
</shape>

+ 307
- 1
app/src/main/res/layout/act_datanaly_s.xml View File

@ -9,7 +9,8 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:scrollbars="none">
<LinearLayout
@ -17,6 +18,12 @@
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:text="@string/Farm"
android:textSize="@dimen/text_size_16" />
<com.qhclh.ytzh.ui.MyGridView
android:id="@+id/gv_dataanaly"
@ -31,6 +38,305 @@
android:scrollbars="none"
android:stretchMode="columnWidth"
android:verticalSpacing="15dp"></com.qhclh.ytzh.ui.MyGridView>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:text="@string/age"
android:textSize="@dimen/text_size_16" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal">
<CheckBox
android:id="@+id/dayage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/btn_check"
android:button="@null"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/dayage"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18" />
<CheckBox
android:id="@+id/monage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/btn_check"
android:button="@null"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/monage"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18" />
<CheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/btn_check"
android:button="@null"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/weight"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18"
android:visibility="invisible" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:text="@string/target"
android:textSize="@dimen/text_size_16" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal">
<CheckBox
android:id="@+id/death"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/btn_check"
android:button="@null"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/death"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18" />
<CheckBox
android:id="@+id/ddeath"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/btn_check"
android:button="@null"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/Death"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18" />
<CheckBox
android:id="@+id/weight"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/btn_check"
android:button="@null"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/weight"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:text="@string/Deathofmalemother"
android:textSize="@dimen/text_size_16" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal">
<CheckBox
android:id="@+id/deathofmale"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/btn_check"
android:button="@null"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/Deathofmale"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18" />
<CheckBox
android:id="@+id/deathofemale"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/btn_check"
android:button="@null"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/Deathofemale"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18" />
<CheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/btn_check"
android:button="@null"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/weight"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18"
android:visibility="invisible" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:text="@string/standard"
android:textSize="@dimen/text_size_16" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:padding="@dimen/dp_10">
<CheckBox
android:id="@+id/check_standard"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tostandard"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:text="@string/condition"
android:textSize="@dimen/text_size_16" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_20">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:text="@string/date1"
android:textSize="@dimen/text_size_18" />
<TextView
android:id="@+id/chosedate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_20"
android:background="@drawable/shape_bg"
android:drawableRight="@drawable/riqi_3x"
android:hint="@string/chosedate"
android:padding="@dimen/dp_5"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:paddingBottom="@dimen/dp_10"
android:paddingLeft="@dimen/dp_20"
android:paddingRight="@dimen/dp_20"
android:paddingTop="@dimen/dp_10">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:text="@string/Buildinghomes"
android:textSize="@dimen/text_size_18" />
<Spinner
android:id="@+id/buildinghome"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_3"
android:background="@drawable/shape_bg"
android:padding="@dimen/dp_5"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_20">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:text="@string/batch1"
android:textSize="@dimen/text_size_18" />
<Spinner
android:id="@+id/chosebatch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_3"
android:background="@drawable/shape_bg"
android:padding="@dimen/dp_5"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<Button
android:id="@+id/commit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_20"
android:background="@drawable/queding_3x" />
</LinearLayout>
</ScrollView>
</LinearLayout>

+ 174
- 2
app/src/main/res/layout/act_datanalysis.xml View File

@ -1,8 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<include layout="@layout/include_tool_bar"></include>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/greyf4f4f4">
<TextView
android:id="@+id/data_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_8"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_8"
android:background="@drawable/shape_select"
android:padding="@dimen/dp_3"
android:text="@string/app_name"
android:textSize="@dimen/text_size_16" />
</LinearLayout>
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/line_chart"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="2dp"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:drawableLeft="@drawable/shape_red1"
android:drawablePadding="@dimen/dp_5"
android:text="@string/standard"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_14" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:drawableLeft="@drawable/shape_blue"
android:drawablePadding="@dimen/dp_5"
android:text="@string/death"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_14" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:drawableLeft="@drawable/shape_green"
android:drawablePadding="@dimen/dp_5"
android:text="@string/weight"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_14" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:drawableLeft="@drawable/shape_perpo"
android:drawablePadding="@dimen/dp_5"
android:text="@string/Death"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_14" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
</LinearLayout>
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:stretchColumns="*">
<TableRow>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:background="@drawable/shape_balck"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/Contrastiveterm"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16"></TextView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:background="@drawable/shape_balck"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/showcontents"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16"></TextView>
</TableRow>
<TableRow>
<TextView
android:id="@+id/taget1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:background="@drawable/shape_white"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/death"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_16"></TextView>
<TextView
android:id="@+id/taget_content1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:background="@drawable/shape_white"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/showcontents"
android:textSize="@dimen/text_size_16"></TextView>
</TableRow>
<TableRow>
<TextView
android:id="@+id/taget2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:background="@drawable/shape_white"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/death"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_16"></TextView>
<TextView
android:id="@+id/taget_content2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:background="@drawable/shape_white"
android:gravity="center_horizontal"
android:padding="@dimen/dp_3"
android:text="@string/showcontents"
android:textSize="@dimen/text_size_16"></TextView>
</TableRow>
</TableLayout>
</LinearLayout>

+ 4
- 0
app/src/main/res/values/colors.xml View File

@ -32,5 +32,9 @@
<color name="transp">#00000000</color>
<color name="green02aa3e">#02aa3e</color>
<color name="redda4848">#da4848</color>
<color name="blue48dac7">#48dac7</color>
<color name="grenn48da59">#48da59</color>
<color name="perpod26ee4">#d26ee4</color>
</resources>

+ 20
- 0
app/src/main/res/values/strings.xml View File

@ -13,6 +13,8 @@
<string name="work_tablepoultry">肉禽</string>
<string name="functions">功能区</string>
<string name="date">日期:</string>
<string name="date1">日期</string>
<string name="chosedate">请选择日期</string>
<string name="supplier">供货商:</string>
<string name="variety">品种:</string>
<string name="driver">司机:</string>
@ -21,6 +23,7 @@
<string name="carname">车牌号:</string>
<string name="phone">联系方式:</string>
<string name="batch">批次:</string>
<string name="batch1">批次</string>
<string name="addrs">厂址:</string>
<string name="time">时间:</string>
<string name="immune">免疫:</string>
@ -33,5 +36,22 @@
<string name="Chicks">鸡苗</string>
<string name="GrossChicken">毛鸡</string>
<string name="feed">饲料</string>
<string name="standard">标准</string>
<string name="tostandard">和标准对比</string>
<string name="death">死亡</string>
<string name="weight">体重</string>
<string name="Death">死淘</string>
<string name="Contrastiveterm">对比项</string>
<string name="showcontents">显示内容</string>
<string name="Farm">养殖场</string>
<string name="target">指标</string>
<string name="age">龄段</string>
<string name="monage">周龄</string>
<string name="dayage">日龄</string>
<string name="Deathofmalemother">公母死亡</string>
<string name="Deathofmale">公死亡数</string>
<string name="Deathofemale">母死亡数</string>
<string name="condition">条件</string>
<string name="Buildinghomes">栋舍</string>
</resources>

Loading…
Cancel
Save