Browse Source

数据筛选界面

developer
lh 8 years ago
parent
commit
b3a78ac5d2
3 changed files with 346 additions and 1 deletions
  1. +25
    -0
      app/src/main/java/com/qhclh/ytzh/work/breedpoultry/DatanalysisSActivity.java
  2. +307
    -1
      app/src/main/res/layout/act_datanaly_s.xml
  3. +14
    -0
      app/src/main/res/values/strings.xml

+ 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) {
}
});
}
}

+ 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>

+ 14
- 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>
@ -34,10 +37,21 @@
<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