Browse Source

no message

master
lh 8 years ago
parent
commit
3edf441de0
2 changed files with 53 additions and 5 deletions
  1. +39
    -2
      app/src/main/java/com/qhclh/ytzh/index/shangpin/InHouseYesFragment.java
  2. +14
    -3
      app/src/main/res/layout/frag_inhouse_yes.xml

+ 39
- 2
app/src/main/java/com/qhclh/ytzh/index/shangpin/InHouseYesFragment.java View File

@ -1,13 +1,30 @@
package com.qhclh.ytzh.index.shangpin; package com.qhclh.ytzh.index.shangpin;
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.InhouseBean;
import com.qhclh.ytzh.ui.RefreshLayout;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
/** /**
* Created by 青花瓷 on 2017/12/28. * Created by 青花瓷 on 2017/12/28.
*/ */
public class InHouseYesFragment extends BaseFragment {
public class InHouseYesFragment extends BaseFragment implements RefreshLayout.OnLoadListener {
@BindView(R.id.lv_inhouseyes)
ListView lv_inhouseyes;
@BindView(R.id.rfl_inhouseyes)
RefreshLayout rfl_inhouseyes;
private int page =0;
private List<InhouseBean> mList;
private InHouseAdapter mAdapter;
@Override @Override
protected int setLayout() { protected int setLayout() {
return R.layout.frag_inhouse_yes; return R.layout.frag_inhouse_yes;
@ -15,16 +32,36 @@ public class InHouseYesFragment extends BaseFragment {
@Override @Override
protected void initView() { protected void initView() {
rfl_inhouseyes.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+5,""+i+5,""+i+5,"2017/09/09","已审核"));
}
mAdapter = new InHouseAdapter(getActivity(),mList);
lv_inhouseyes.setAdapter(mAdapter);
} }
@Override @Override
protected void initOper() { protected void initOper() {
rfl_inhouseyes.setOnLoadListener(this);
}
@Override
public void onLoad() {
rfl_inhouseyes.postDelayed(new Runnable() {
@Override
public void run() {
rfl_inhouseyes.setLoading(false);
for (int i=0;i<5;i++){
mList.add(new InhouseBean(i,""+i,""+i,"2017/08/09","已审核"));
}
mAdapter.notifyDataSetChanged();
}
},1000);
} }
} }

+ 14
- 3
app/src/main/res/layout/frag_inhouse_yes.xml View File

@ -3,8 +3,19 @@
android:orientation="vertical" android:layout_width="match_parent" android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<TextView
android:text="已审核aaaaaaaaaa"
<com.qhclh.ytzh.ui.RefreshLayout
android:id="@+id/rfl_inhouseyes"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent">
<ListView
android:id="@+id/lv_inhouseyes"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:scrollbars="none">
</ListView>
</com.qhclh.ytzh.ui.RefreshLayout>
</LinearLayout> </LinearLayout>

Loading…
Cancel
Save