|
|
@ -1,5 +1,6 @@ |
|
|
package com.qhclh.ytzh.index.shangpin; |
|
|
package com.qhclh.ytzh.index.shangpin; |
|
|
|
|
|
|
|
|
|
|
|
import android.support.v4.widget.SwipeRefreshLayout; |
|
|
import android.widget.ListView; |
|
|
import android.widget.ListView; |
|
|
|
|
|
|
|
|
import com.qhclh.ytzh.R; |
|
|
import com.qhclh.ytzh.R; |
|
|
@ -7,6 +8,7 @@ import com.qhclh.ytzh.base.BaseFragment; |
|
|
import com.qhclh.ytzh.bean.InhouseBean; |
|
|
import com.qhclh.ytzh.bean.InhouseBean; |
|
|
import com.qhclh.ytzh.ui.RefreshLayout; |
|
|
import com.qhclh.ytzh.ui.RefreshLayout; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
import butterknife.BindView; |
|
|
import butterknife.BindView; |
|
|
@ -15,7 +17,7 @@ import butterknife.BindView; |
|
|
* Created by 青花瓷 on 2017/12/28. |
|
|
* Created by 青花瓷 on 2017/12/28. |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
public class InHouseAllFragment extends BaseFragment { |
|
|
|
|
|
|
|
|
public class InHouseAllFragment extends BaseFragment implements RefreshLayout.OnLoadListener, SwipeRefreshLayout.OnRefreshListener { |
|
|
@BindView(R.id.lv_inhouseall) |
|
|
@BindView(R.id.lv_inhouseall) |
|
|
ListView lv_inhouseall; |
|
|
ListView lv_inhouseall; |
|
|
@BindView(R.id.rfl_inhouseall) |
|
|
@BindView(R.id.rfl_inhouseall) |
|
|
@ -24,7 +26,7 @@ public class InHouseAllFragment extends BaseFragment { |
|
|
|
|
|
|
|
|
private List<InhouseBean> mList; |
|
|
private List<InhouseBean> mList; |
|
|
private InHouseAdapter mAdapter; |
|
|
private InHouseAdapter mAdapter; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected int setLayout() { |
|
|
protected int setLayout() { |
|
|
return R.layout.frag_inhouse_all; |
|
|
return R.layout.frag_inhouse_all; |
|
|
@ -32,16 +34,39 @@ public class InHouseAllFragment extends BaseFragment { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void initView() { |
|
|
protected void initView() { |
|
|
|
|
|
|
|
|
|
|
|
rfl_inhouseall.setEnabled(false); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void initData() { |
|
|
protected void initData() { |
|
|
|
|
|
mList = new ArrayList<>(); |
|
|
|
|
|
for (int i=0;i<5;i++){ |
|
|
|
|
|
mList.add(new InhouseBean(i,""+i,""+i,"2017/08/09","已审核")); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
mAdapter = new InHouseAdapter(getActivity(),mList); |
|
|
|
|
|
lv_inhouseall.setAdapter(mAdapter); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void initOper() { |
|
|
protected void initOper() { |
|
|
|
|
|
rfl_inhouseall.setOnLoadListener(this); |
|
|
|
|
|
rfl_inhouseall.setOnRefreshListener(this); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void onLoad() { |
|
|
|
|
|
rfl_inhouseall.postDelayed(new Runnable() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void run() { |
|
|
|
|
|
rfl_inhouseall.setLoading(false); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
},1000); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void onRefresh() { |
|
|
|
|
|
rfl_inhouseall.setRefreshing(false); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |