From f2b04ff0409460d5c6429feb51e0ee3a5623d851 Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期一, 17 四月 2017 13:49:31 +0800
Subject: [PATCH] 

---
 VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/PhoneCallMng.java                   |   18 +++
 VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/PhoneCallFragment.java             |   16 ++
 VisitFace/DemoForBsk/app/src/main/res/layout/fragment_surveillance.xml                               |    4 
 VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInLeftInterviewee.java  |   33 ++++--
 VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/SurveillanceFragment.java          |    6 
 VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/adapter/CheckInFragment.java                |   57 +++++++++++
 VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/adapter/PhoneCallFragment.java              |   29 +++++
 VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInLeftVisitor.java      |   31 ++++-
 VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/CheckInFragment.java               |   20 +++
 VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/CheckInMng.java                     |   24 ++++
 VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/phonecall/PhoneCallLeftListView.java |   20 +++
 11 files changed, 220 insertions(+), 38 deletions(-)

diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/adapter/CheckInFragment.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/adapter/CheckInFragment.java
index 947e5ca..6c88741 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/adapter/CheckInFragment.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/adapter/CheckInFragment.java
@@ -12,6 +12,7 @@
 import com.facebook.drawee.view.SimpleDraweeView;
 
 import cn.com.basic.face.base.MainActivity;
+import cn.com.basic.face.discern.common.CommonVariables;
 import cn.com.basic.face.discern.query.item.CheckInQueryItem;
 import cn.com.basic.face.util.AppApi;
 
@@ -21,11 +22,28 @@
 
         @Override
         public int[] getItemLayouts() {
-            return new int[]{R.layout.fragment_check_in_left_visitor_row, R.layout.fragment_check_in_left_first_letter_row};
+            return new int[]{R.layout.fragment_check_in_left_visitor_row, R.layout.fragment_check_in_left_first_letter_row,R.layout.load_more, R.layout.no_more, R.layout.reach_bottom};
         }
 
         @Override
         public void onBindRecycleViewHolder(EasyRecyclerViewHolder viewHolder, final int position) {
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.reachBottom) {
+                return;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.noMorePage) {
+                return;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.hasMorePages) {
+                TextView load_more_text_view = viewHolder.findViewById(R.id.load_more_text_view);
+                load_more_text_view.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        cn.com.basic.face.fragment.CheckInFragment.getInstance().addPageNum();
+                        cn.com.basic.face.fragment.CheckInFragment.getInstance().append();
+                    }
+                });
+                return;
+            }
             if (!(getItem(position) instanceof CheckInQueryItem)) {
                 TextView fragment_phone_call_left_row_first_letter_name = viewHolder.findViewById(R.id.fragment_check_in_left_row_first_letter_name);
                 fragment_phone_call_left_row_first_letter_name.setText(getItem(position)+"".toUpperCase());
@@ -66,6 +84,15 @@
 
         @Override
         public int getRecycleViewItemType(int position) {
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.reachBottom) {
+                return 4;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.noMorePage) {
+                return 3;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.hasMorePages) {
+                return 2;
+            }
             if (!(getItem(position) instanceof CheckInQueryItem)) {
                 return 1;
             }
@@ -80,11 +107,28 @@
 
         @Override
         public int[] getItemLayouts() {
-            return new int[]{R.layout.fragment_check_in_left_interviewee_row, R.layout.fragment_check_in_left_first_letter_row};
+            return new int[]{R.layout.fragment_check_in_left_interviewee_row, R.layout.fragment_check_in_left_first_letter_row,R.layout.load_more, R.layout.no_more, R.layout.reach_bottom};
         }
 
         @Override
         public void onBindRecycleViewHolder(EasyRecyclerViewHolder viewHolder, final int position) {
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.reachBottom) {
+                return;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.noMorePage) {
+                return;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.hasMorePages) {
+                TextView load_more_text_view = viewHolder.findViewById(R.id.load_more_text_view);
+                load_more_text_view.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        cn.com.basic.face.fragment.CheckInFragment.getInstance().addPageNum();
+                        cn.com.basic.face.fragment.CheckInFragment.getInstance().append();
+                    }
+                });
+                return;
+            }
             if (!(getItem(position) instanceof CheckInQueryItem)) {
                 TextView fragment_phone_call_left_row_first_letter_name = viewHolder.findViewById(R.id.fragment_check_in_left_row_first_letter_name);
                 fragment_phone_call_left_row_first_letter_name.setText(getItem(position)+"".toUpperCase());
@@ -129,6 +173,15 @@
 
         @Override
         public int getRecycleViewItemType(int position) {
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.reachBottom) {
+                return 4;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.noMorePage) {
+                return 3;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.hasMorePages) {
+                return 2;
+            }
             if (!(getItem(position) instanceof CheckInQueryItem)) {
                 return 1;
             }
diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/adapter/PhoneCallFragment.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/adapter/PhoneCallFragment.java
index 77977af..f42af8a 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/adapter/PhoneCallFragment.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/adapter/PhoneCallFragment.java
@@ -11,6 +11,7 @@
 
 
 import cn.com.basic.face.base.MainActivity;
+import cn.com.basic.face.discern.common.CommonVariables;
 import cn.com.basic.face.discern.query.item.PhoneCallQueryItem;
 import cn.com.basic.face.util.AppApi;
 
@@ -22,11 +23,28 @@
 
         @Override
         public int[] getItemLayouts() {
-            return new int[]{R.layout.fragment_phone_call_left_row, R.layout.fragment_phone_call_left_first_letter_row};
+            return new int[]{R.layout.fragment_phone_call_left_row, R.layout.fragment_phone_call_left_first_letter_row,R.layout.load_more, R.layout.no_more, R.layout.reach_bottom};
         }
 
         @Override
         public void onBindRecycleViewHolder(EasyRecyclerViewHolder viewHolder, int position) {
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.reachBottom) {
+                return;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.noMorePage) {
+                return;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.hasMorePages) {
+                TextView load_more_text_view = viewHolder.findViewById(R.id.load_more_text_view);
+                load_more_text_view.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        cn.com.basic.face.fragment.VisitFragment.getInstance().addPageNum();
+                        cn.com.basic.face.fragment.VisitFragment.getInstance().append();
+                    }
+                });
+                return;
+            }
             if (!(getItem(position) instanceof PhoneCallQueryItem)) {
                 TextView fragment_phone_call_left_row_first_letter_name = viewHolder.findViewById(R.id.fragment_phone_call_left_row_first_letter_name);
                 fragment_phone_call_left_row_first_letter_name.setText(getItem(position)+"".toUpperCase());
@@ -58,6 +76,15 @@
 
         @Override
         public int getRecycleViewItemType(int position) {
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.reachBottom) {
+                return 4;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.noMorePage) {
+                return 3;
+            }
+            if (getItem(position) instanceof Integer && ((int)getItem(position))== CommonVariables.Page.hasMorePages) {
+                return 2;
+            }
             if (!(getItem(position) instanceof PhoneCallQueryItem)) {
                 return 1;
             }
diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/CheckInFragment.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/CheckInFragment.java
index 3743201..501e3b5 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/CheckInFragment.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/CheckInFragment.java
@@ -70,6 +70,8 @@
     @ViewInject(R.id.fragment_check_in_left_interviewee_radio)
     private RadioButton fragment_check_in_left_interviewee_radio;
 
+    private int pageNum = 1;
+
     private CheckInMng manager = CheckInMng.getInstance();
 
     @Override
@@ -105,13 +107,27 @@
 
     }
 
-    private void reloadCheckInLeftList() {
+    public void append() {
         fragment_check_in_left_sort_type_linear_layout.setVisibility(!fragment_check_in_left_visitor_radio.isChecked()?View.VISIBLE:View.GONE);
         fragment_check_in_left_interviewee.setVisibility(!fragment_check_in_left_visitor_radio.isChecked()?View.VISIBLE:View.GONE);
         fragment_check_in_left_visitor.setVisibility(fragment_check_in_left_visitor_radio.isChecked()?View.VISIBLE:View.GONE);
         manager.findCheckInLeftList(fragment_check_in_left_visitor_radio.isChecked(),
                 fragment_check_in_left_sort_by_dept_radio_button.isChecked(),
-                fragment_check_in_left_search_edit_text.getText().toString());
+                fragment_check_in_left_search_edit_text.getText().toString(), pageNum, true);
+    }
+
+    public void addPageNum() {
+        pageNum++;
+    }
+
+    private void reloadCheckInLeftList() {
+        pageNum = 1;
+        fragment_check_in_left_sort_type_linear_layout.setVisibility(!fragment_check_in_left_visitor_radio.isChecked()?View.VISIBLE:View.GONE);
+        fragment_check_in_left_interviewee.setVisibility(!fragment_check_in_left_visitor_radio.isChecked()?View.VISIBLE:View.GONE);
+        fragment_check_in_left_visitor.setVisibility(fragment_check_in_left_visitor_radio.isChecked()?View.VISIBLE:View.GONE);
+        manager.findCheckInLeftList(fragment_check_in_left_visitor_radio.isChecked(),
+                fragment_check_in_left_sort_by_dept_radio_button.isChecked(),
+                fragment_check_in_left_search_edit_text.getText().toString(), pageNum, false);
     }
 
     @Override
diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/PhoneCallFragment.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/PhoneCallFragment.java
index 0a8ca00..3df9ba5 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/PhoneCallFragment.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/PhoneCallFragment.java
@@ -39,6 +39,8 @@
     @ViewInject(R.id.fragment_phone_call_left_search)
     private EditText fragment_phone_call_left_search;
 
+    private int pageNum = 1;
+
     public int[] getLeftRightLayoutIds() {
         return new int[]{R.layout.fragment_phone_call_left, R.layout.fragment_phone_call_right};
     }
@@ -66,9 +68,19 @@
         }
     }
 
-    public void loadLeftList() {
+    public void append() {
         PhoneCallMng.getInstance().findPhoneCallLeftList(!fragment_phone_call_left_sort_by_name_radio_button.isChecked(),
-                fragment_phone_call_left_search.getText().toString());
+                fragment_phone_call_left_search.getText().toString(), pageNum, true);
+    }
+
+    public void addPageNum() {
+        pageNum++;
+    }
+
+    public void loadLeftList() {
+        pageNum = 1;
+        PhoneCallMng.getInstance().findPhoneCallLeftList(!fragment_phone_call_left_sort_by_name_radio_button.isChecked(),
+                fragment_phone_call_left_search.getText().toString(), pageNum, false);
     }
 
     @OnClick(R.id.fragment_phone_call_left_back)
diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/SurveillanceFragment.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/SurveillanceFragment.java
index 1b90897..8a4bf03 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/SurveillanceFragment.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/SurveillanceFragment.java
@@ -1,6 +1,8 @@
 package cn.com.basic.face.fragment;
 
 import android.os.Bundle;
+import android.view.Surface;
+import android.view.SurfaceView;
 import android.view.View;
 import android.widget.RadioButton;
 import android.widget.RadioGroup;
@@ -32,9 +34,9 @@
     @ViewInject(R.id.fragment_supervisory_bottom_attendance_list_view)
     private SurveillanceBottomListView fragment_supervisory_bottom_attendance_list_view;
     @ViewInject(R.id.fragment_supervisory_enter_camera)
-    VideoView fragment_supervisory_enter_camera;
+    SurfaceView fragment_supervisory_enter_camera;
     @ViewInject(R.id.fragment_supervisory_exit_camera)
-    VideoView fragment_supervisory_exit_camera;
+    SurfaceView fragment_supervisory_exit_camera;
 
     static boolean useNative = false;
 
diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/CheckInMng.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/CheckInMng.java
index ce70b07..28e529a 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/CheckInMng.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/CheckInMng.java
@@ -3,6 +3,7 @@
 import android.widget.Toast;
 
 import cn.com.basic.face.base.BaseApplication;
+import cn.com.basic.face.discern.common.CommonVariables;
 import cn.com.basic.face.discern.query.condition.CheckInQueryCondition;
 import cn.com.basic.face.discern.query.item.PhoneCallQueryItem;
 import cn.com.basic.face.fragment.CheckInFragment;
@@ -40,7 +41,7 @@
         });
     }
 
-    public void findCheckInLeftList(final boolean isVisitorList, final boolean isSortByDept, String searchText) {
+    public void findCheckInLeftList(final boolean isVisitorList, final boolean isSortByDept, String searchText, final int pageNum, final boolean append) {
         RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.CHECK_IN_QUERY);
         if (isVisitorList) {
             params.addBodyParameter(CheckInQueryCondition.FieldNames.visitorCompanyId, BaseApplication.getInstance().getDevice().getCompanyId());
@@ -48,6 +49,8 @@
             params.addBodyParameter(CheckInQueryCondition.FieldNames.employeeCompanyId, BaseApplication.getInstance().getDevice().getCompanyId());
         }
         params.addBodyParameter(CheckInQueryCondition.FieldNames.username, searchText);
+        params.addBodyParameter(CommonVariables.Page.PAGE_NUM, pageNum+"");
+        params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, "5");
         x.http().post(params, new BaseCommonCallBack() {
             public void success() {
                 List<CheckInQueryItem> list = getList(CheckInQueryItem.class);
@@ -71,10 +74,23 @@
                     allItems.add(item);
                     prev = name;
                 }
-                if (isVisitorList) {
-                    CheckInFragment.getInstance().get_fragment_check_in_left_visitor().show(allItems);
+                if (hasMorePages()) {
+                    allItems.add(CommonVariables.Page.hasMorePages);
                 } else {
-                    CheckInFragment.getInstance().get_fragment_check_in_left_interviewee().show(allItems, isSortByDept);
+                    if (getPageNum() > 1) {
+                        allItems.add(CommonVariables.Page.reachBottom);
+                    } else {
+                        if (allItems.size() > 0) {
+                            allItems.add(CommonVariables.Page.reachBottom);
+                        } else {
+                            allItems.add(CommonVariables.Page.noMorePage);
+                        }
+                    }
+                }
+                if (isVisitorList) {
+                    CheckInFragment.getInstance().get_fragment_check_in_left_visitor().show(allItems, append);
+                } else {
+                    CheckInFragment.getInstance().get_fragment_check_in_left_interviewee().show(allItems, isSortByDept, append);
                 }
             }
         });
diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/PhoneCallMng.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/PhoneCallMng.java
index 6f67618..33284a3 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/PhoneCallMng.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/PhoneCallMng.java
@@ -9,6 +9,7 @@
 import java.util.List;
 
 import cn.com.basic.face.discern.common.BaseCommonCallBack;
+import cn.com.basic.face.discern.common.CommonVariables;
 import cn.com.basic.face.discern.query.condition.PhoneCallQueryCondition;
 import cn.com.basic.face.discern.query.item.PhoneCallQueryItem;
 import cn.com.basic.face.fragment.PhoneCallFragment;
@@ -22,7 +23,7 @@
         return instance;
     }
 
-    public void findPhoneCallLeftList(final boolean isSortByDept, String searchText) {
+    public void findPhoneCallLeftList(final boolean isSortByDept, String searchText, final int pageNum, final boolean append) {
         RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.PHONE_CALL_QUERY);
         params.addBodyParameter(PhoneCallQueryCondition.FieldNames.username, searchText);
         x.http().post(params, new BaseCommonCallBack() {
@@ -53,7 +54,20 @@
                     allItems.add(item);
                     prev = name;
                 }
-                PhoneCallFragment.getInstance().get_fragment_phone_call_left_list_view().show(isSortByDept, allItems);
+                if (hasMorePages()) {
+                    allItems.add(CommonVariables.Page.hasMorePages);
+                } else {
+                    if (getPageNum() > 1) {
+                        allItems.add(CommonVariables.Page.reachBottom);
+                    } else {
+                        if (allItems.size() > 0) {
+                            allItems.add(CommonVariables.Page.reachBottom);
+                        } else {
+                            allItems.add(CommonVariables.Page.noMorePage);
+                        }
+                    }
+                }
+                PhoneCallFragment.getInstance().get_fragment_phone_call_left_list_view().show(isSortByDept, allItems, append);
             }
         });
     }
diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInLeftInterviewee.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInLeftInterviewee.java
index 4b4ab4b..c94c67f 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInLeftInterviewee.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInLeftInterviewee.java
@@ -10,15 +10,16 @@
 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();
 
     public void setAdapter(Context context) {
-        setAdapter(mAdapter);
+        setAdapter(adapter);
     }
 
     public CheckInLeftInterviewee(Context context) {
@@ -36,16 +37,28 @@
         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) {
+        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) {
+                adapter.getList().remove(adapter.getList().size() - 1);
+            }
+            if (adapter.getList().size() > 0 &&  adapter.getList().get(adapter.getList().size()-1) instanceof
+                    Integer && ((int)adapter.getList().get(adapter.getList().size()-1))== CommonVariables.Page.noMorePage) {
+                adapter.getList().remove(adapter.getList().size() - 1);
+            }
+            newList.addAll(adapter.getList());
+            newList.addAll(list);
+            adapter.setList(newList);
+        } else {
+            adapter.setList(list);
+        }
+        adapter.setSortByDept(isSortByDept);
+        this.setAdapter(adapter);
     }
 
 }
diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInLeftVisitor.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInLeftVisitor.java
index bdfface..0f1392d 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInLeftVisitor.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInLeftVisitor.java
@@ -10,14 +10,15 @@
 import java.util.List;
 
 import cn.com.basic.face.adapter.CheckInFragment;
+import cn.com.basic.face.discern.common.CommonVariables;
 
 public class CheckInLeftVisitor extends EasyRecyclerView {
 
-    private CheckInFragment.CheckInLeftVisitorAdapter mAdapter = new CheckInFragment.CheckInLeftVisitorAdapter();
+    private CheckInFragment.CheckInLeftVisitorAdapter adapter = new CheckInFragment.CheckInLeftVisitorAdapter();
     private List list = new ArrayList();
 
     public void setAdapter(Context context) {
-        setAdapter(mAdapter);
+        setAdapter(adapter);
     }
 
     public CheckInLeftVisitor(Context context) {
@@ -35,15 +36,27 @@
         setAdapter(context);
     }
 
-    public void show(List list) {
-        refresh(list);
+    public void show(List list, boolean append) {
+        refresh(list, append);
     }
 
-    public void refresh(List list) {
-        this.list.clear();
-        this.list.addAll(list);
-        mAdapter.setList(this.list);
-        this.setAdapter(mAdapter);
+    public void refresh(List list, boolean append) {
+        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) {
+                adapter.getList().remove(adapter.getList().size() - 1);
+            }
+            if (adapter.getList().size() > 0 &&  adapter.getList().get(adapter.getList().size()-1) instanceof
+                    Integer && ((int)adapter.getList().get(adapter.getList().size()-1))== CommonVariables.Page.noMorePage) {
+                adapter.getList().remove(adapter.getList().size() - 1);
+            }
+            newList.addAll(adapter.getList());
+            newList.addAll(list);
+            adapter.setList(newList);
+        } else {
+            adapter.setList(list);
+        }
+        this.setAdapter(adapter);
     }
 
 
diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/phonecall/PhoneCallLeftListView.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/phonecall/PhoneCallLeftListView.java
index b89087a..b41b5e3 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/phonecall/PhoneCallLeftListView.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/phonecall/PhoneCallLeftListView.java
@@ -6,7 +6,9 @@
 import com.camnter.easyrecyclerview.widget.EasyRecyclerView;
 
 import cn.com.basic.face.adapter.PhoneCallFragment.PhoneCallLeftAdapter;
+import cn.com.basic.face.discern.common.CommonVariables;
 
+import java.util.ArrayList;
 import java.util.List;
 
 public class PhoneCallLeftListView extends EasyRecyclerView {
@@ -33,8 +35,22 @@
         initView();
     }
 
-    public void show(boolean isSortByDept, List list) {
-        adapter.setList(list);
+    public void show(boolean isSortByDept, List list, boolean append) {
+        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) {
+                adapter.getList().remove(adapter.getList().size() - 1);
+            }
+            if (adapter.getList().size() > 0 &&  adapter.getList().get(adapter.getList().size()-1) instanceof
+                    Integer && ((int)adapter.getList().get(adapter.getList().size()-1))== CommonVariables.Page.noMorePage) {
+                adapter.getList().remove(adapter.getList().size() - 1);
+            }
+            newList.addAll(adapter.getList());
+            newList.addAll(list);
+            adapter.setList(newList);
+        } else {
+            adapter.setList(list);
+        }
         setAdapter(adapter);
         adapter.setSortByDept(isSortByDept);
     }
diff --git a/VisitFace/DemoForBsk/app/src/main/res/layout/fragment_surveillance.xml b/VisitFace/DemoForBsk/app/src/main/res/layout/fragment_surveillance.xml
index 0995412..fa6a16f 100644
--- a/VisitFace/DemoForBsk/app/src/main/res/layout/fragment_surveillance.xml
+++ b/VisitFace/DemoForBsk/app/src/main/res/layout/fragment_surveillance.xml
@@ -37,7 +37,7 @@
             android:layout_height="match_parent"
             android:layout_weight="1"
             >
-            <VideoView
+            <SurfaceView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:id="@+id/fragment_supervisory_enter_camera" />
@@ -73,7 +73,7 @@
             android:layout_weight="1"
             android:layout_marginLeft="2dp"
             >
-            <VideoView
+            <SurfaceView
                 android:id="@+id/fragment_supervisory_exit_camera"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"/>

--
Gitblit v1.8.0