i add a view in the windowManager via mWindowManager.addview()
. Now i would like to know if it's possible to get the window
instance. their is myView.getWindowID()
and myView.getWindowToken()
but i can't find a way to retrieve from it the window instance
How to get the window instance from a view?
9.7k views Asked by zeus At
3
You cannot get a
window
instance fromView
orWindowManager
. But you can get theDisplay
to which the View'swindow
is been attached by calling this methodmyView.getDisplay()
Edited -you can use
View.bringToFront();
orView.bringChildToFront(View child);
to reorder the z-index of views.