From 6600f64ed0c892c720c003615851633b201f31c4 Mon Sep 17 00:00:00 2001 From: lh <1209405678@qq.com> Date: Fri, 9 Feb 2018 17:02:31 +0800 Subject: [PATCH] no message --- .../java/com/qhclh/ytzh/bean/ReportBean.java | 21 ++++++++++++++++++- .../tablepoultry/LvReportInfoAdapter.java | 4 ++++ .../work/tablepoultry/ReportActivity.java | 6 +++--- app/src/main/res/layout/act_report.xml | 15 ++++++++++--- .../res/layout/item_lv_buildhouse_info.xml | 9 ++++++++ 5 files changed, 48 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/qhclh/ytzh/bean/ReportBean.java b/app/src/main/java/com/qhclh/ytzh/bean/ReportBean.java index d7e5ca6..8408185 100644 --- a/app/src/main/java/com/qhclh/ytzh/bean/ReportBean.java +++ b/app/src/main/java/com/qhclh/ytzh/bean/ReportBean.java @@ -3,7 +3,7 @@ package com.qhclh.ytzh.bean; /** * Created by 青花瓷 on 2017/6/29. */ -///< 利润行 +///< 报表数据 public class ReportBean { private long id; private String item_dayage; @@ -11,6 +11,25 @@ public class ReportBean { private String item_eliminatee; private String item_water; private String item_weight; + private String dongshe; + + public ReportBean(long id, String item_dayage, String item_death, String item_eliminatee, String item_water, String item_weight, String dongshe) { + this.id = id; + this.item_dayage = item_dayage; + this.item_death = item_death; + this.item_eliminatee = item_eliminatee; + this.item_water = item_water; + this.item_weight = item_weight; + this.dongshe = dongshe; + } + + public String getDongshe() { + return dongshe; + } + + public void setDongshe(String dongshe) { + this.dongshe = dongshe; + } public long getId() { return id; diff --git a/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/LvReportInfoAdapter.java b/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/LvReportInfoAdapter.java index 010d432..668384a 100644 --- a/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/LvReportInfoAdapter.java +++ b/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/LvReportInfoAdapter.java @@ -54,6 +54,7 @@ public class LvReportInfoAdapter extends BaseAdapter { holder.item_water = (TextView) convertView.findViewById(R.id.item_water); holder.item_weight = (TextView) convertView.findViewById(R.id.item_weight); holder.ll_buildhouseinfo = convertView.findViewById(R.id.ll_buildhouseinfo); + holder.item_dongshe = convertView.findViewById(R.id.item_dongshe); convertView.setTag(holder); @@ -68,6 +69,8 @@ public class LvReportInfoAdapter extends BaseAdapter { holder.item_water.setText(message.getItem_water()); holder.item_weight.setText(message.getItem_weight()); + holder.item_dongshe.setText(message.getDongshe()); + if (position%2==0){ holder.ll_buildhouseinfo.setBackgroundColor(context.getResources().getColor(R.color.greyf4f4f4)); }else { @@ -82,6 +85,7 @@ public class LvReportInfoAdapter extends BaseAdapter { TextView item_eliminatee; TextView item_water; TextView item_weight; + TextView item_dongshe; LinearLayout ll_buildhouseinfo; } } diff --git a/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/ReportActivity.java b/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/ReportActivity.java index b313269..224e0c6 100644 --- a/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/ReportActivity.java +++ b/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/ReportActivity.java @@ -66,9 +66,9 @@ public class ReportActivity extends BaseActivity { buildhouseList = new ArrayList<>(); reportBeanList = new ArrayList<>(); - for (int i=0;i<10;i++){ - buildhouseList.add(new ReportString(i,"栋舍"+i)); - reportBeanList.add(new ReportBean(i,"1"+i,"2"+i,"3"+i,"4"+i,"5"+i)); + for (int i=0;i<15;i++){ + buildhouseList.add(new ReportString(i,""+(i+1))); + reportBeanList.add(new ReportBean(i,"1"+i,"2"+i,"3"+i,"4"+i,"5"+i,"栋舍栋舍栋舍"+i)); } lvBuildhousenaneAdapter = new LvBuildhousenaneAdapter(this,buildhouseList); diff --git a/app/src/main/res/layout/act_report.xml b/app/src/main/res/layout/act_report.xml index b93ecbe..fcbc924 100644 --- a/app/src/main/res/layout/act_report.xml +++ b/app/src/main/res/layout/act_report.xml @@ -17,14 +17,14 @@ @@ -43,6 +43,15 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + diff --git a/app/src/main/res/layout/item_lv_buildhouse_info.xml b/app/src/main/res/layout/item_lv_buildhouse_info.xml index cf916d7..b6549af 100644 --- a/app/src/main/res/layout/item_lv_buildhouse_info.xml +++ b/app/src/main/res/layout/item_lv_buildhouse_info.xml @@ -7,6 +7,15 @@ android:paddingBottom="@dimen/dp_10" android:paddingTop="@dimen/dp_10"> + +