| | |
| | | package cn.com.basic.face.widget.phonecall;
|
| | |
|
| | | import android.content.Context;
|
| | | import android.os.Parcelable;
|
| | | import android.util.AttributeSet;
|
| | |
|
| | | import com.camnter.easyrecyclerview.widget.EasyRecyclerView;
|
| | |
|
| | | import cn.com.basic.face.adapter.CheckInFragment;
|
| | | import cn.com.basic.face.adapter.PhoneCallFragment.PhoneCallLeftAdapter;
|
| | | import cn.com.basic.face.discern.common.CommonVariables;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import cn.com.basic.face.service.vo.PhoneCallFragment;
|
| | |
|
| | | public class PhoneCallLeftListView extends EasyRecyclerView {
|
| | |
|
| | | private PhoneCallLeftAdapter phoneCallLeftAdapter ;
|
| | | private PhoneCallLeftAdapter adapter ;
|
| | | private Parcelable recyclerViewState;
|
| | |
|
| | | private void initView() {
|
| | | phoneCallLeftAdapter = new PhoneCallLeftAdapter();
|
| | | setAdapter(phoneCallLeftAdapter);
|
| | | adapter = new PhoneCallLeftAdapter();
|
| | | setAdapter(adapter);
|
| | | }
|
| | |
|
| | | public PhoneCallLeftListView(Context context) {
|
| | |
| | | initView();
|
| | | }
|
| | |
|
| | | public void show(List<PhoneCallFragment.PhoneCallQueryItem> list) {
|
| | | phoneCallLeftAdapter.setList(list);
|
| | | setAdapter(phoneCallLeftAdapter);
|
| | | public void show(boolean isSortByDept, List list, boolean append) {
|
| | | recyclerViewState = this.getLayoutManager().onSaveInstanceState();
|
| | | adapter.setList(list);
|
| | | setAdapter(adapter);
|
| | | adapter.setSortByDept(isSortByDept);
|
| | | this.getLayoutManager().onRestoreInstanceState(recyclerViewState);
|
| | | }
|
| | |
|
| | | public List getPrevList() {
|
| | | return adapter.getList();
|
| | | }
|
| | |
|
| | | }
|