|
|
@ -1,13 +1,29 @@ |
|
|
package com.qhclh.ytzh.work.tablepoultry.shouguangdong; |
|
|
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.R; |
|
|
import com.qhclh.ytzh.base.BaseFragment; |
|
|
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. |
|
|
* Created by 青花瓷 on 2017/12/4. |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
public class ShouguangdFragment extends BaseFragment { |
|
|
public class ShouguangdFragment extends BaseFragment { |
|
|
|
|
|
@BindView(R.id.lv_shouguangdong) |
|
|
|
|
|
ListView lv_shouguangdong; |
|
|
|
|
|
|
|
|
|
|
|
private List<TablePBean> list; |
|
|
|
|
|
private XFactryAdapter adapter; |
|
|
@Override |
|
|
@Override |
|
|
protected int setLayout() { |
|
|
protected int setLayout() { |
|
|
return R.layout.fragment_shouguangd; |
|
|
return R.layout.fragment_shouguangd; |
|
|
@ -20,11 +36,24 @@ public class ShouguangdFragment extends BaseFragment { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void initData() { |
|
|
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 |
|
|
@Override |
|
|
protected void initOper() { |
|
|
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); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |