当我在Android中显示弹出窗口时,如何阻止并使视图变暗?

时间:2016-07-04 22:23:17

标签: android view popup

通过显示弹出窗口我的问题是视图后面没有被阻止,我需要阻止并隐藏视图,而弹出这个结束时,我需要视图无法点击,只有弹出窗口 我的弹出窗口:

View popupView;
PopupWindow popupWindow;
popupView = layoutInflater.inflate(R.layout.popup_ver_noconf_submateria_urgente, null);
                                    popupWindow = new PopupWindow(popupView, RadioGroup.LayoutParams.WRAP_CONTENT, RadioGroup.LayoutParams.WRAP_CONTENT);

                                    popupWindow.showAtLocation(v, Gravity.CENTER, 0, 0);

                                    aceptar = (Button) popupView.findViewById(R.id.acept);
                                    aceptar.setOnClickListener(new Button.OnClickListener() {

                                        @Override
                                        public void onClick(View v) {
                                            sub.activity.startActivity(new Intent(sub.activity, VerNoConformidadesSubmateria.class));
                                            popupWindow.dismiss();
                                            releaseLayout();
                                        }
                                    });

PD:抱歉英文不好

0 个答案:

没有答案