-1

I want to customize my alert dialogs in my application and not use alert dialog. What I have done was to create a layout that contains my popup warning with a dismiss button inside. When I inflate the popup warning xml layout from my activity, the popup shows, but the parent view can still be clicked on and interacted with. I have tried setting the parent layout a variety of ways when the popup layout is in focus. I have .setClickable(false); .setEnabled(false); setFocusable(false); setActivated(false). I would appreciate any suggestions. Thanks In Advance!

Muhammad Aamir Ali
  • 20,419
  • 10
  • 66
  • 57

1 Answers1

1

1) use DialogFragment

2) use your custom view and inflate it in onCreateView

3) use below code inside the onCreateView

    getDialog().setCancelable(false);
    getDialog().setCanceledOnTouchOutside(false);
mmlooloo
  • 18,937
  • 5
  • 45
  • 64