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
windowinstance fromVieworWindowManager. But you can get theDisplayto which the View'swindowis been attached by calling this methodmyView.getDisplay()Edited -you can use
View.bringToFront();orView.bringChildToFront(View child);to reorder the z-index of views.