How to change the z-order of window added via WindowManager?
Asked Answered
A

0

6

Is it possible to specify the z-order of each window ? in the image below each editText are in their own window added via WindowManager. as you can see i have a z-order problem

enter image description here

like you see on the picture, the last window added seam to take the higher z-order. So the only way out i find to put a window at the higher z-order is to remove the view from windowManager and then immediately add it again. It's not very optimal solution, because visually the view disappear and reappear on the screen

Affettuoso answered 28/5, 2017 at 20:13 Comment(8)
Have u try to add the views into WindowManager in the inversed order ?Fabyola
It seems to me that the popup's window is added to the attached EditText' windows.Fabyola
yes, the popup's window is added to the attached editText, but the problem is that other window have an higher z-order, so i must find a way (on focusing) to set the z-order of the window containing the EditText to be the highestAffettuoso
> set the z-order of the window containing the EditText to be the highest Changing the window type of the Window LayoutParams will solve that ?Fabyola
you can not change the window type when the window is already added :( you must first remove it, and then add it back again and this cause an ugly flick (edit disappear and reappear) :(Affettuoso
U can use WindowManager.updateViewLayout to change the window type ?Fabyola
no, not when the view is already added to the windowManager :( because else i have a error "try to update the window type of an already added window"Affettuoso
Let us continue this discussion in chat.Fabyola

© 2022 - 2024 — McMap. All rights reserved.