1 year ago
#386072
Lukas Hanacek
android dialog and windows
This is pretty specific question outside of knowledge of common Android App creation, I need someone with deeper insight to be able to actually answer this.
In general the question is like this: When you create and show dialog, where can it be found in the view tree ? Can I get list of windows ? Below I will try to give more details.
If you create dialog under dialogFragment then everything is alright, you can find its layout in getWindow().getDecorView(), you can get the instance of the dialog using FragmentManager. It all works.
But if you create dialog directly not inside of fragment API it is not inside of the Activity's window.getDecorView().
Actually the dialog.getWindow() and activity.getWindow() returns different instances of window.
I tried to get some more info from window().getWindowManager() but I did not find there any collection of windows I could obtain.
So far it seems that dialog created the old way directly without dialogFragment is held outside of public API, its instance and its window.
Am I missing something ?
android
dialog
android-windowmanager
0 Answers
Your Answer