diff --git a/app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/YuchuFragment.java b/app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/YuchuFragment.java index 3a8367b..7df4660 100644 --- a/app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/YuchuFragment.java +++ b/app/src/main/java/com/qhclh/ytzh/work/Poultrydailyreport/YuchuFragment.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 YuchuFragment extends BaseFragment { + @BindView(R.id.firstContent) + LinearLayout firstContent; @Override protected int setLayout() { return R.layout.frag_yuchu; @@ -20,7 +29,44 @@ public class YuchuFragment extends BaseFragment { @Override protected void initData() { + firstContent.removeAllViews(); + for (int i=0;i<3;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 diff --git a/app/src/main/res/layout/view_first.xml b/app/src/main/res/layout/view_first.xml new file mode 100644 index 0000000..9cb15bb --- /dev/null +++ b/app/src/main/res/layout/view_first.xml @@ -0,0 +1,22 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/view_second.xml b/app/src/main/res/layout/view_second.xml new file mode 100644 index 0000000..1886677 --- /dev/null +++ b/app/src/main/res/layout/view_second.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + \ No newline at end of file