Let's look at the display order of windows, how these types of windows are displayed in the screen
when it process requests a window from w m as w a mouse determines the display order for the windows
in order to facilitate the management of window display order.
The mobile phone screen can be virtually represented by the X, Y and Z axis, where the set axis is
perpendicular to the screen and points from the inside of the screen to the outside of the screen.
In this way, determining the display order of windows means determining that the window is on the Z
axis.
This ordering is called Z order.
The window type value, which we discussed earlier, is the basis for the Z order sorting.
We know that the type value of application window ranges from 1 to 99.
The child window is 1000, 2000, nine, 99 and the system window is 2000 to 2000 999.
In general, the larger the type value is, the Z order is sorted, which means that the higher value
is to the front of the screen.
That means closer to the user.
So in this way the system window will be always on top of the screen.
So if you have noticed system windows like for example, the system dialogs or the toast or the system
bars or these windows always resides on top of the application window or the child window.
So this was a simple explanation about how the windows, different types of windows in Android are sorted.
So in reality, the actual implementation of this order is much more complicated.
But for ease of understanding, you can imagine the display order as explained here.