xuxiuxi
2017-07-14 b37c7f21ff92cf0af06f47eac85062b8af7d8b2f
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;
@@ -24,12 +22,9 @@
import cn.com.basic.face.base.MainActivity;
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 {
@@ -57,26 +52,12 @@
        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);
            }
        }
        for (int i = 0; i < 2; i++) {
            SurveillanceQueryItem item = new SurveillanceQueryItem();
            registerList.add(item);
        }
        dialog_surveillance_photo_select_list_view.show(registerList);
        dialog_surveillance_photo_select_list_view.show(SurveillanceQueryItemUtil.getInstance().getAllUnregisterVisitorTwoRowsForSelect(selectedId));
        setTitleAndList(type);
        WheelView.WheelViewStyle style = new WheelView.WheelViewStyle();
@@ -114,8 +95,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);
    }