| | |
| | | package cn.com.basic.face.widget.checkin;
|
| | |
|
| | | import android.content.Context;
|
| | | import android.os.Parcelable;
|
| | | import android.util.AttributeSet;
|
| | |
|
| | | import com.camnter.easyrecyclerview.adapter.EasyRecyclerViewAdapter;
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import cn.com.basic.face.adapter.CheckInFragment;
|
| | | import cn.com.basic.face.discern.common.CommonVariables;
|
| | | import cn.com.basic.face.util.Constant;
|
| | |
|
| | | public class CheckInLeftInterviewee extends EasyRecyclerView {
|
| | |
|
| | | private CheckInFragment.CheckInLeftIntervieweeAdapter mAdapter = new CheckInFragment.CheckInLeftIntervieweeAdapter();
|
| | | private CheckInFragment.CheckInLeftIntervieweeAdapter adapter = new CheckInFragment.CheckInLeftIntervieweeAdapter();
|
| | | private List list = new ArrayList();
|
| | | private Parcelable recyclerViewState;
|
| | |
|
| | | public void setAdapter(Context context) {
|
| | | setAdapter(mAdapter);
|
| | | setAdapter(adapter);
|
| | | }
|
| | |
|
| | | public CheckInLeftInterviewee(Context context) {
|
| | |
| | | setAdapter(context);
|
| | | }
|
| | |
|
| | | public void show(List list, boolean isSortByDept) {
|
| | | refresh(list, isSortByDept);
|
| | | public void show(List list, boolean isSortByDept, boolean append) {
|
| | | refresh(list, isSortByDept, append);
|
| | | }
|
| | |
|
| | | public void refresh(List list, boolean isSortByDept) {
|
| | | this.list.clear();
|
| | | this.list.addAll(list);
|
| | | mAdapter.setList(this.list);
|
| | | mAdapter.setSortByDept(isSortByDept);
|
| | | this.setAdapter(mAdapter);
|
| | | public void refresh(List list, boolean isSortByDept, boolean append) {
|
| | | recyclerViewState = this.getLayoutManager().onSaveInstanceState();
|
| | | adapter.setList(list);
|
| | | adapter.setSortByDept(isSortByDept);
|
| | | this.setAdapter(adapter);
|
| | | this.getLayoutManager().onRestoreInstanceState(recyclerViewState);
|
| | | }
|
| | |
|
| | | public List getPrevList() {
|
| | | return adapter.getList();
|
| | | }
|
| | | }
|