| | |
| | |
|
| | | public static long selectedId = -1;
|
| | |
|
| | | private boolean isShow = false;
|
| | |
|
| | | public static VisitorRegisterSelectPhotoDialog instance = new VisitorRegisterSelectPhotoDialog();
|
| | | public static VisitorRegisterSelectPhotoDialog getInstance() {
|
| | | return instance;
|
| | |
| | | View view = LayoutInflater.from(MainActivity.getInstance()).inflate(R.layout.dialog_visitor_register_select_photo_select,null);
|
| | | ViewUtils.inject(this, view);
|
| | |
|
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | 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));
|
| | | }
|
| | | } else {
|
| | | if (CommonVariables.Register.VISITOR_REGISTER_SELECTED) {
|
| | | dialog_surveillance_photo_select_list_view.show(UnknownSurveillanceQueryItemUtil.getInstance().getAllUnregisterVisitorTwoRowsForSelect(selectedId));
|
| | | } else {
|
| | | dialog_surveillance_photo_select_list_view.show(UnknownSurveillanceQueryItemUtil.getInstance().getAllUnregisterAttenderTwoRowsForSelect(selectedId));
|
| | | }
|
| | | }
|
| | | setTitleAndList(Constant.DialogSelectType.ID_TYPE);
|
| | | WheelView.WheelViewStyle style = new WheelView.WheelViewStyle();
|
| | | style.selectedTextColor = Color.parseColor("#11c3e3");
|
| | |
| | |
|
| | | }
|
| | | });
|
| | | this.showAtLocation(parentView, Gravity.BOTTOM,0,330);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | }
|
| | |
|
| | | public void show() {
|
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | dialog_surveillance_photo_select_list_view.show(SurveillanceQueryItemUtil.getInstance().getAllUnregisterVisitorTwoRowsForSelect(selectedId));
|
| | | } else {
|
| | | dialog_surveillance_photo_select_list_view.show(UnknownSurveillanceQueryItemUtil.getInstance().getAllUnregisterVisitorTwoRowsForSelect(selectedId));
|
| | | }
|
| | | if (this.isShowing()) {
|
| | |
|
| | | } else {
|
| | | //this.showAsDropDown();
|
| | | this.showAtLocation(parentView, Gravity.BOTTOM,0,330);
|
| | | }
|
| | | isShow = true;
|
| | | }
|
| | |
|
| | | public void hide() {
|
| | | if (!isShow) {
|
| | | return;
|
| | | }
|
| | | if (this.isShowing()) {
|
| | | dismiss();
|
| | | } else {
|