-4

I am working on cab booking app.I need to open popup like ola as click on car, popup will display and if we click on another car in same popup values get update.

I am able to open popup but that popup will overlay on entire screen. i need to open popup and at the same time below popup screen also must be clickable.Like in ola dialog display and we can click below car category as well.

Please any one help me out.Thank you.

sunil
  • 796
  • 1
  • 8
  • 28

1 Answers1

0

By default when a Dialog is in foreground, nothing is 'clickable' on the activity behind it.
And when you click on the window outside of the Dialog, by default it dismisses the current Dialog.

On a Dialog like AlertDialog you can set this flag: FLAG_NOT_TOUCH_MODAL

For example:

mDialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL,
                        WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);

Also check this answer (achieves the same thing): https://stackoverflow.com/a/33853487/2686502

Community
  • 1
  • 1
jayeshsolanki93
  • 2,096
  • 1
  • 20
  • 37