Ensure the IME is rendered above the surface when we z-order the surface to be on top.
This commit is contained in:
@@ -319,8 +319,14 @@ public class SurfaceView extends View {
|
|||||||
* <p>Calling this overrides any previous call to {@link #setZOrderMediaOverlay}.
|
* <p>Calling this overrides any previous call to {@link #setZOrderMediaOverlay}.
|
||||||
*/
|
*/
|
||||||
public void setZOrderOnTop(boolean onTop) {
|
public void setZOrderOnTop(boolean onTop) {
|
||||||
mWindowType = onTop ? WindowManager.LayoutParams.TYPE_APPLICATION_PANEL
|
if (onTop) {
|
||||||
: WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
|
mWindowType = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
|
||||||
|
// ensures the surface is placed below the IME
|
||||||
|
mLayout.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
|
||||||
|
} else {
|
||||||
|
mWindowType = WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
|
||||||
|
mLayout.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user