xuxiuxi
2017-07-14 bcefcf7249692e61574438d3857e737c2fd29ca7
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/dialog/SurveillancePhotoDialog.java
@@ -2,13 +2,11 @@
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
@@ -25,11 +23,9 @@
import cn.com.basic.face.dialog.wheelview.adapter.BaseWheelAdapter;
import cn.com.basic.face.dialog.wheelview.widget.WheelView;
import cn.com.basic.face.discern.common.CommonVariables;
import cn.com.basic.face.discern.query.item.SurveillancePhotoQueryItem;
import cn.com.basic.face.discern.query.item.SurveillanceQueryItem;
import cn.com.basic.face.fragment.SurveillanceFragment;
import cn.com.basic.face.util.Constant;
import cn.com.basic.face.util.OkClickedListener;
import cn.com.basic.face.util.SurveillanceQueryItemUtil;
import cn.com.basic.face.widget.surveilance.SurveillancePhotoSelectListView;
public class SurveillancePhotoDialog extends PopupWindow {
@@ -38,46 +34,16 @@
    @ViewInject(R.id.dialog_surveillance_photo_select_list_view)
    private SurveillancePhotoSelectListView dialog_surveillance_photo_select_list_view;
    private List list = new ArrayList();
    public static List visitorTypeList = new ArrayList();
    public static List genderList = new ArrayList();
    public static List idTypeList = new ArrayList();
    public static List visitReasonList = new ArrayList();
    public static void setVisitorTypeList(List visitorTypeList) {
        AddDialog.visitorTypeList = visitorTypeList;
    }
    public static void setGenderList(List genderList) {
        AddDialog.genderList = genderList;
    }
    public static void setIdTypeList(List idTypeList) {
        AddDialog.idTypeList = idTypeList;
    }
    public SurveillancePhotoDialog(View parentView, int type, OkClickedListener okButtonClickedListener) {
    public SurveillancePhotoDialog(View parentView, int type, OkClickedListener okButtonClickedListener, long selectedId) {
        this.parentView = parentView;
        View view = LayoutInflater.from(MainActivity.getInstance()).inflate(R.layout.dialog_surveillance_photo_select,null);
        ViewUtils.inject(this, view);
        List<SurveillanceQueryItem> prevVisitorList = SurveillanceFragment.getInstance().get_fragment_supervisory_bottom_visitor_list_view().getPrevList();
        List<SurveillanceQueryItem> registerList = new ArrayList();
        for (SurveillanceQueryItem surveillanceQueryItem : prevVisitorList) {
            if (surveillanceQueryItem.getRegisterOrCheckIn() == CommonVariables.Surveillance.VISIT_REGISTER_ITEM_TYPE) {
                registerList.add(surveillanceQueryItem);
            }
        if (CommonVariables.Register.VISITOR_REGISTER_SELECTED) {
            dialog_surveillance_photo_select_list_view.show(SurveillanceQueryItemUtil.getInstance().getAllUnregisterVisitorTwoRowsForSelect(selectedId));
        } else {
            dialog_surveillance_photo_select_list_view.show(SurveillanceQueryItemUtil.getInstance().getAllUnregisterAttenderTwoRowsForSelect(selectedId));
        }
        for (int i = 0; i < 2; i++) {
            SurveillanceQueryItem item = new SurveillanceQueryItem();
            registerList.add(item);
        }
        dialog_surveillance_photo_select_list_view.show(registerList);
        setTitleAndList(type);
        WheelView.WheelViewStyle style = new WheelView.WheelViewStyle();
        style.selectedTextColor = Color.parseColor("#11c3e3");
@@ -114,8 +80,8 @@
        this.setHeight(RelativeLayout.LayoutParams.MATCH_PARENT);
        this.setWidth(RelativeLayout.LayoutParams.MATCH_PARENT);
        this.setFocusable(true);
        this.setBackgroundDrawable(new ColorDrawable(0x7f000000));
        this.setAnimationStyle(R.style.PopupAnimation);
        //this.setBackgroundDrawable(new ColorDrawable(0x7f000000));
        this.setAnimationStyle(R.style.PopupSlideAnimation);
        okButtonClickedListeners.add(okButtonClickedListener);
        this.showAtLocation(parentView, Gravity.BOTTOM,0,330);
    }