From 25761b84498bba43530ab78dc4280bdee0daa4c4 Mon Sep 17 00:00:00 2001 From: lh <1209405678@qq.com> Date: Thu, 22 Mar 2018 15:33:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E8=9B=8B=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Poultrydailyreport/ChandanFragment.java | 46 +++++++++++++++++++ app/src/main/res/layout/frag_chandan.xml | 24 +++++++--- 2 files changed, 63 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/ChandanFragment.java b/app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/ChandanFragment.java index 5dfb214..598eb20 100644 --- a/app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/ChandanFragment.java +++ b/app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/ChandanFragment.java @@ -1,13 +1,22 @@ package com.qhclh.ytzh.work.Poultrydailyreport; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.LinearLayout; +import android.widget.TextView; + import com.qhclh.ytzh.R; import com.qhclh.ytzh.base.BaseFragment; +import butterknife.BindView; + /** * Created by 青花瓷 on 2018/3/22. */ public class ChandanFragment extends BaseFragment { + @BindView(R.id.firstContent_chandan) + LinearLayout firstContent; @Override protected int setLayout() { return R.layout.frag_chandan; @@ -20,7 +29,44 @@ public class ChandanFragment extends BaseFragment { @Override protected void initData() { + firstContent.removeAllViews(); + for (int i=1;i<13;i++){ + View view = LayoutInflater.from(getActivity()).inflate(R.layout.view_first,null); + TextView name = view.findViewById(R.id.name); + + LinearLayout secondContent = view.findViewById(R.id.secondContent); + LinearLayout main_ll = view.findViewById(R.id.main_ll); + + name.setText("场:"+i); + main_ll.setTag(i); + secondContent.removeAllViews(); + for (int j=0;j - - + + - \ No newline at end of file + + + + + \ No newline at end of file