David Papirov
David Papirov

Reputation: 121

Show an overlay on top of other android activity but both can get user interaction

I'm trying to show a Popup message covering a part of a activity below it, but still want to enable the user to interact with activity, without dismissing the popup.

For example: "No Internet" message, but a part of application still working.

It can be an activity, or a dialog, but the activities below it should still receive user clicks.

I succeed to achieve this by including the same XML in several activities and apply common logic; but want to make it an independent UI unit

Upvotes: 0

Views: 700

Answers (1)

patilmandar2007
patilmandar2007

Reputation: 322

You should use Snackbar for this purpose. For use of snackbar refer Adding an Action to a Message

OR

If you need to add a view independent of the application scope then you might try adding view directly to window like

Upvotes: 1

Related Questions