In my app (general construction described below), I have a custom dialog, built of a bunch of views and a blur-background view.
There are two ways to open that dialog:
- Clicking a button inside the app triggers the method that opens this dialog.
- A notification is shown when the dialog can be opened, and in the notification, there's a button that opens the app and is also supposed to open the dialog (By calling a
BroadcastReceiver
that lives in the same fragment as the dialog, and in theBroadcastReceiver
I call the method that opens the dialog).
The first method works - clicking the button opens the dialog when it's supposed to.
The second, however, opens the app but not the dialog (To clarify - opening the dialog means changing its views visibility to View.VISIBLE
).
To check what goes wrong, I used a Toast
message that shows the visibility of the dialog every time the method that opens the dialog gets called. The Toast
message shows "VISIBLE
", so that means the Views visibility is set to View.VISIBLE
indeed - but the dialog is not shown, nor the blur-background.
General Construction: The app has multiple Fragments
, stored inside a view pager, inside the MainActivity
and the dialog lives in the main fragment.
Might Be Relevant: when clicking the notifications button, the app opens, but the notification panel stays fully opened. The Toast
message shows behind the notification panel.
Why doesn't the dialog show?
And how can I fix it?
from Android: View Visibility set to View.VISIBLE but View is not Visible
No comments:
Post a Comment