git-svn-id: http://192.168.1.226/svn/proxy@558 454eff88-639b-444f-9e54-f578c98de674
| | |
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.ATTENDANCE_QUERY);
|
| | | params.addBodyParameter(AttendanceQueryCondition.FieldNames.username, searchText);
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_NUM, pageNum+"");
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, "7");
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, "20");
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<AttendanceQueryItem> list = getList(AttendanceQueryItem.class);
|
| | |
| | | }
|
| | | params.addBodyParameter(CheckInQueryCondition.FieldNames.username, searchText);
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_NUM, pageNum+"");
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, "5");
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, "20");
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<CheckInQueryItem> list = getList(CheckInQueryItem.class);
|
| | |
| | | }
|
| | | }
|
| | | if (isVisitorList) {
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_visitor().show(allItems, append);
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_visitor().show(allItems);
|
| | | } else {
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_interviewee().show(allItems, isSortByDept, append);
|
| | | }
|
| | |
| | | }
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.PHONE_CALL_QUERY);
|
| | | params.addBodyParameter(PhoneCallQueryCondition.FieldNames.username, searchText);
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, "6");
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, "20");
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_NUM, pageNum+"");
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | |
| | | }
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.VISIT_QUERY);
|
| | | params.addBodyParameter(VisitQueryCondition.FieldNames.username, searchText);
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, "5");
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, "20");
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_NUM, pageNum+"");
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | |
| | | package cn.com.basic.face.widget.attendance;
|
| | |
|
| | | import android.content.Context;
|
| | | import android.os.Parcelable;
|
| | | import android.util.AttributeSet;
|
| | |
|
| | | import com.camnter.easyrecyclerview.widget.EasyRecyclerView;
|
| | |
| | | public class AttendanceLeftListView extends EasyRecyclerView {
|
| | |
|
| | | private AttendanceFragment.AttendanceLeftAdapter adapter;
|
| | | private Parcelable recyclerViewState;
|
| | |
|
| | | private void initView() {
|
| | | adapter = new AttendanceFragment.AttendanceLeftAdapter();
|
| | |
| | | }
|
| | |
|
| | | public void show(List list, boolean append) {
|
| | | recyclerViewState = this.getLayoutManager().onSaveInstanceState();
|
| | | if (append) {
|
| | | List newList = new ArrayList();
|
| | | if (adapter.getList().size() > 0 && adapter.getList().get(adapter.getList().size()-1) instanceof Integer && ((int)adapter.getList().get(adapter.getList().size()-1))== CommonVariables.Page.hasMorePages) {
|
| | |
| | | }
|
| | | newList.addAll(adapter.getList());
|
| | | newList.addAll(list);
|
| | | if (adapter.getList().size() > 0) {
|
| | | this.scrollToPosition(adapter.getList().size()-1);
|
| | | }
|
| | | adapter.setList(newList);
|
| | | } else {
|
| | | adapter.setList(list);
|
| | | }
|
| | | setAdapter(adapter);
|
| | | this.getLayoutManager().onRestoreInstanceState(recyclerViewState);
|
| | | }
|
| | |
|
| | | public List getPrevList() {
|
| | |
| | | package cn.com.basic.face.widget.attendance;
|
| | |
|
| | | import android.content.Context;
|
| | | import android.os.Parcelable;
|
| | | import android.util.AttributeSet;
|
| | |
|
| | | import com.camnter.easyrecyclerview.widget.EasyRecyclerView;
|
| | |
| | | public class AttendanceRightListView extends EasyRecyclerView {
|
| | |
|
| | | private AttendanceFragment.AttendanceRightAdapter adapter;
|
| | | private Parcelable recyclerViewState;
|
| | |
|
| | | private void initView() {
|
| | | adapter = new AttendanceFragment.AttendanceRightAdapter();
|
| | |
| | | }
|
| | |
|
| | | public void show(List list) {
|
| | | recyclerViewState = this.getLayoutManager().onSaveInstanceState();
|
| | | adapter.setList(list);
|
| | | setAdapter(adapter);
|
| | | this.getLayoutManager().onRestoreInstanceState(recyclerViewState);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | 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;
|
| | |
| | |
|
| | | private CheckInFragment.CheckInLeftIntervieweeAdapter adapter = new CheckInFragment.CheckInLeftIntervieweeAdapter();
|
| | | private List list = new ArrayList();
|
| | | private Parcelable recyclerViewState;
|
| | |
|
| | | public void setAdapter(Context context) {
|
| | | setAdapter(adapter);
|
| | |
| | | }
|
| | |
|
| | | public void refresh(List list, boolean isSortByDept, boolean append) {
|
| | | if (append && adapter.getList().size() > 0) {
|
| | | this.scrollToPosition(adapter.getList().size()-1);
|
| | | }
|
| | | recyclerViewState = this.getLayoutManager().onSaveInstanceState();
|
| | | adapter.setList(list);
|
| | | adapter.setSortByDept(isSortByDept);
|
| | | this.setAdapter(adapter);
|
| | | this.getLayoutManager().onRestoreInstanceState(recyclerViewState);
|
| | | }
|
| | |
|
| | | public List getPrevList() {
|
| | |
| | | package cn.com.basic.face.widget.checkin;
|
| | |
|
| | | import android.content.Context;
|
| | | import android.os.Parcelable;
|
| | | import android.support.v7.widget.RecyclerView;
|
| | | import android.util.AttributeSet;
|
| | |
|
| | |
| | |
|
| | | private CheckInFragment.CheckInLeftVisitorAdapter adapter = new CheckInFragment.CheckInLeftVisitorAdapter();
|
| | | private List list = new ArrayList();
|
| | | private Parcelable recyclerViewState;
|
| | |
|
| | | public void setAdapter(Context context) {
|
| | | setAdapter(adapter);
|
| | |
| | | setAdapter(context);
|
| | | }
|
| | |
|
| | | public void show(List list, boolean append) {
|
| | | refresh(list, append);
|
| | | }
|
| | |
|
| | | public void refresh(List list, boolean append) {
|
| | | if (append && adapter.getList().size() > 0) {
|
| | | this.scrollToPosition(adapter.getList().size()-1);
|
| | | }
|
| | | public void show(List list) {
|
| | | recyclerViewState = this.getLayoutManager().onSaveInstanceState();
|
| | | adapter.setList(list);
|
| | | this.setAdapter(adapter);
|
| | | adapter.notifyDataSetChanged();
|
| | | this.getLayoutManager().onRestoreInstanceState(recyclerViewState);
|
| | | }
|
| | |
|
| | | public List getPrevList() {
|
| | |
| | | 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;
|
| | |
| | | public class PhoneCallLeftListView extends EasyRecyclerView {
|
| | |
|
| | | private PhoneCallLeftAdapter adapter ;
|
| | | private Parcelable recyclerViewState;
|
| | |
|
| | | private void initView() {
|
| | | adapter = new PhoneCallLeftAdapter();
|
| | |
| | | }
|
| | |
|
| | | public void show(boolean isSortByDept, List list, boolean append) {
|
| | | if (append && adapter.getList().size() > 0) {
|
| | | this.scrollToPosition(adapter.getList().size()-1);
|
| | | }
|
| | | recyclerViewState = this.getLayoutManager().onSaveInstanceState();
|
| | | adapter.setList(list);
|
| | | setAdapter(adapter);
|
| | | adapter.setSortByDept(isSortByDept);
|
| | | this.getLayoutManager().onRestoreInstanceState(recyclerViewState);
|
| | | }
|
| | |
|
| | | public List getPrevList() {
|
| | |
| | |
|
| | | import android.content.Context;
|
| | | import android.graphics.Rect;
|
| | | import android.os.Parcelable;
|
| | | import android.support.v7.widget.GridLayoutManager;
|
| | | import android.support.v7.widget.LinearLayoutManager;
|
| | | import android.support.v7.widget.RecyclerView;
|
| | |
| | | import cn.com.basic.face.util.WindowsUtil;
|
| | |
|
| | | public class SurveillanceBottomListView extends EasyRecyclerView {
|
| | |
|
| | | private Parcelable recyclerViewState;
|
| | |
|
| | | private class SpaceItemDecoration extends RecyclerView.ItemDecoration {
|
| | | @Override
|
| | |
| | | }
|
| | |
|
| | | public void refresh(List list) {
|
| | | recyclerViewState = this.getLayoutManager().onSaveInstanceState();
|
| | | this.list.clear();
|
| | | this.list.addAll(list);
|
| | | mAdapter.setList(this.list);
|
| | | this.setAdapter(mAdapter);
|
| | | this.getLayoutManager().onRestoreInstanceState(recyclerViewState);
|
| | | }
|
| | |
|
| | | public List getPrevList() {
|
| | |
| | | package cn.com.basic.face.widget.visit;
|
| | |
|
| | | import android.content.Context;
|
| | | import android.os.Parcelable;
|
| | | import android.util.AttributeSet;
|
| | |
|
| | | import com.camnter.easyrecyclerview.widget.EasyRecyclerView;
|
| | |
| | | public class VisitLeftListView extends EasyRecyclerView {
|
| | |
|
| | | private VisitFragment.VisitLeftAdapter adapter;
|
| | | private Parcelable recyclerViewState;
|
| | |
|
| | | private void initView() {
|
| | | adapter = new VisitFragment.VisitLeftAdapter();
|
| | |
| | | }
|
| | |
|
| | | public void show(List list, boolean append) {
|
| | | recyclerViewState = this.getLayoutManager().onSaveInstanceState();
|
| | | if (append) {
|
| | | List newList = new ArrayList();
|
| | | if (adapter.getList().size() > 0 && adapter.getList().get(adapter.getList().size()-1) instanceof Integer && ((int)adapter.getList().get(adapter.getList().size()-1))== CommonVariables.Page.hasMorePages) {
|
| | |
| | | }
|
| | | newList.addAll(adapter.getList());
|
| | | newList.addAll(list);
|
| | | if (adapter.getList().size() > 0) {
|
| | | this.scrollToPosition(adapter.getList().size()-1);
|
| | | }
|
| | | adapter.setList(newList);
|
| | | } else {
|
| | | adapter.setList(list);
|
| | | }
|
| | | setAdapter(adapter);
|
| | | adapter.notifyDataSetChanged();
|
| | | this.getLayoutManager().onRestoreInstanceState(recyclerViewState);
|
| | | }
|
| | |
|
| | | public List getPrevList() {
|
| | |
| | | <TextView
|
| | | android:id="@+id/load_more_text_view"
|
| | | android:paddingTop="20dp"
|
| | | android:layout_marginBottom="20dp"
|
| | | android:paddingBottom="20dp"
|
| | | android:layout_width="match_parent"
|
| | | android:layout_height="wrap_content"
|
| | | android:text="加载更多"
|
| | | android:gravity="center_horizontal"
|
| | | android:layout_height="60dp" />
|
| | | android:gravity="center" />
|
| | |
|
| | | </LinearLayout> |