Browse Source

。。。

master
lh 8 years ago
parent
commit
6e395ffb34
10 changed files with 152 additions and 27 deletions
  1. +3
    -3
      app/src/main/java/com/qhclh/ytzh/work/tablepoultry/XFactryAdapter.java
  2. +29
    -1
      app/src/main/java/com/qhclh/ytzh/work/tablepoultry/anqiu/AnqiuFragment.java
  3. +3
    -2
      app/src/main/java/com/qhclh/ytzh/work/tablepoultry/changle/ChangleFragment.java
  4. +29
    -0
      app/src/main/java/com/qhclh/ytzh/work/tablepoultry/qiuping/QiupingFragment.java
  5. +29
    -0
      app/src/main/java/com/qhclh/ytzh/work/tablepoultry/shouguangdong/ShouguangdFragment.java
  6. +29
    -0
      app/src/main/java/com/qhclh/ytzh/work/tablepoultry/shouguangxi/ShouguangxFragment.java
  7. +11
    -6
      app/src/main/res/layout/fragment_anqiu.xml
  8. +5
    -4
      app/src/main/res/layout/fragment_qiuping.xml
  9. +9
    -6
      app/src/main/res/layout/fragment_shouguangd.xml
  10. +5
    -5
      app/src/main/res/layout/fragment_shouguangx.xml

app/src/main/java/com/qhclh/ytzh/work/tablepoultry/changle/ChangleAdapter.java → app/src/main/java/com/qhclh/ytzh/work/tablepoultry/XFactryAdapter.java View File

@ -1,4 +1,4 @@
package com.qhclh.ytzh.work.tablepoultry.changle;
package com.qhclh.ytzh.work.tablepoultry;
import android.content.Context;
import android.view.LayoutInflater;
@ -16,12 +16,12 @@ import java.util.List;
* Created by 青花瓷 on 2017/12/11.
*/
public class ChangleAdapter extends BaseAdapter{
public class XFactryAdapter extends BaseAdapter{
private Context context;
private List<TablePBean> list;
private LayoutInflater layoutInflater;
public ChangleAdapter(Context context, List<TablePBean> list) {
public XFactryAdapter(Context context, List<TablePBean> list) {
this.context = context;
this.list = list;
layoutInflater = LayoutInflater.from(context);

+ 29
- 1
app/src/main/java/com/qhclh/ytzh/work/tablepoultry/anqiu/AnqiuFragment.java View File

@ -1,13 +1,29 @@
package com.qhclh.ytzh.work.tablepoultry.anqiu;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseFragment;
import com.qhclh.ytzh.bean.TablePBean;
import com.qhclh.ytzh.work.tablepoultry.XFactryAdapter;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
/**
* Created by 青花瓷 on 2017/12/4.
*/
public class AnqiuFragment extends BaseFragment {
@BindView(R.id.lv_anqiu)
ListView lv_anqiu;
private List<TablePBean> list;
private XFactryAdapter adapter;
@Override
protected int setLayout() {
return R.layout.fragment_anqiu;
@ -20,11 +36,23 @@ public class AnqiuFragment extends BaseFragment {
@Override
protected void initData() {
list = new ArrayList<>();
for (int i=0;i<8;i++){
list.add(new TablePBean(i,i+11,"aaaa1"+i,"221"+i,"3331"+i,"55551"+i));
}
adapter = new XFactryAdapter(getActivity(),list);
lv_anqiu.setAdapter(adapter);
}
@Override
protected void initOper() {
lv_anqiu.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
System.out.println("aaa+++++"+l);
}
});
}
}

+ 3
- 2
app/src/main/java/com/qhclh/ytzh/work/tablepoultry/changle/ChangleFragment.java View File

@ -7,6 +7,7 @@ import android.widget.ListView;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseFragment;
import com.qhclh.ytzh.bean.TablePBean;
import com.qhclh.ytzh.work.tablepoultry.XFactryAdapter;
import java.util.ArrayList;
import java.util.List;
@ -22,7 +23,7 @@ public class ChangleFragment extends BaseFragment {
ListView lv_changle;
private List<TablePBean> list;
private ChangleAdapter adapter;
private XFactryAdapter adapter;
@Override
protected int setLayout() {
return R.layout.fragment_changle;
@ -40,7 +41,7 @@ public class ChangleFragment extends BaseFragment {
list.add(new TablePBean(i,i+1,"aaaa"+i,"22"+i,"333"+i,"5555"+i));
}
adapter = new ChangleAdapter(getActivity(),list);
adapter = new XFactryAdapter(getActivity(),list);
lv_changle.setAdapter(adapter);
}


+ 29
- 0
app/src/main/java/com/qhclh/ytzh/work/tablepoultry/qiuping/QiupingFragment.java View File

@ -1,13 +1,29 @@
package com.qhclh.ytzh.work.tablepoultry.qiuping;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseFragment;
import com.qhclh.ytzh.bean.TablePBean;
import com.qhclh.ytzh.work.tablepoultry.XFactryAdapter;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
/**
* Created by 青花瓷 on 2017/12/4.
*/
public class QiupingFragment extends BaseFragment {
@BindView(R.id.lv_qiuping)
ListView lv_qiuping;
private List<TablePBean> list;
private XFactryAdapter adapter;
@Override
protected int setLayout() {
return R.layout.fragment_qiuping;
@ -20,11 +36,24 @@ public class QiupingFragment extends BaseFragment {
@Override
protected void initData() {
list = new ArrayList<>();
for (int i=0;i<8;i++){
list.add(new TablePBean(i,i+12,"aaaa2"+i,"222"+i,"3332"+i,"55552"+i));
}
adapter = new XFactryAdapter(getActivity(),list);
lv_qiuping.setAdapter(adapter);
}
@Override
protected void initOper() {
lv_qiuping.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
System.out.println("aaa+++++"+l);
}
});
}
}

+ 29
- 0
app/src/main/java/com/qhclh/ytzh/work/tablepoultry/shouguangdong/ShouguangdFragment.java View File

@ -1,13 +1,29 @@
package com.qhclh.ytzh.work.tablepoultry.shouguangdong;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseFragment;
import com.qhclh.ytzh.bean.TablePBean;
import com.qhclh.ytzh.work.tablepoultry.XFactryAdapter;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
/**
* Created by 青花瓷 on 2017/12/4.
*/
public class ShouguangdFragment extends BaseFragment {
@BindView(R.id.lv_shouguangdong)
ListView lv_shouguangdong;
private List<TablePBean> list;
private XFactryAdapter adapter;
@Override
protected int setLayout() {
return R.layout.fragment_shouguangd;
@ -20,11 +36,24 @@ public class ShouguangdFragment extends BaseFragment {
@Override
protected void initData() {
list = new ArrayList<>();
for (int i=0;i<8;i++){
list.add(new TablePBean(i,i+4,"aaa4"+i,"24"+i,"334"+i,"5554"+i));
}
adapter = new XFactryAdapter(getActivity(),list);
lv_shouguangdong.setAdapter(adapter);
}
@Override
protected void initOper() {
lv_shouguangdong.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
System.out.println("aaa+++++"+l);
}
});
}
}

+ 29
- 0
app/src/main/java/com/qhclh/ytzh/work/tablepoultry/shouguangxi/ShouguangxFragment.java View File

@ -1,13 +1,29 @@
package com.qhclh.ytzh.work.tablepoultry.shouguangxi;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseFragment;
import com.qhclh.ytzh.bean.TablePBean;
import com.qhclh.ytzh.work.tablepoultry.XFactryAdapter;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
/**
* Created by 青花瓷 on 2017/12/4.
*/
public class ShouguangxFragment extends BaseFragment {
@BindView(R.id.lv_shouguangxi)
ListView lv_shouguangxi;
private List<TablePBean> list;
private XFactryAdapter adapter;
@Override
protected int setLayout() {
return R.layout.fragment_shouguangx;
@ -20,11 +36,24 @@ public class ShouguangxFragment extends BaseFragment {
@Override
protected void initData() {
list = new ArrayList<>();
for (int i=0;i<8;i++){
list.add(new TablePBean(i,i+6,"aaa6"+i,"226"+i,"336"+i,"5556"+i));
}
adapter = new XFactryAdapter(getActivity(),list);
lv_shouguangxi.setAdapter(adapter);
}
@Override
protected void initOper() {
lv_shouguangxi.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
System.out.println("aaa+++++"+l);
}
});
}
}

+ 11
- 6
app/src/main/res/layout/fragment_anqiu.xml View File

@ -1,10 +1,15 @@
<?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">
<TextView
android:text="@string/anqiu"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView
android:id="@+id/lv_anqiu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none">
</ListView>
</LinearLayout>

+ 5
- 4
app/src/main/res/layout/fragment_qiuping.xml View File

@ -2,9 +2,10 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:text="@string/qiuping"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ListView
android:id="@+id/lv_qiuping"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none"></ListView>
</LinearLayout>

+ 9
- 6
app/src/main/res/layout/fragment_shouguangd.xml View File

@ -1,10 +1,13 @@
<?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">
<TextView
android:text="@string/shouguangdong"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView
android:id="@+id/lv_shouguangdong"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none"></ListView>
</LinearLayout>

+ 5
- 5
app/src/main/res/layout/fragment_shouguangx.xml View File

@ -2,9 +2,9 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:text="@string/shouguangxi"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ListView
android:id="@+id/lv_shouguangxi"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none"></ListView>
</LinearLayout>

Loading…
Cancel
Save