Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Android] Implement XWalkView.setZOrderOnTop
Browse files Browse the repository at this point in the history
Use this API to control whether the XWalkView's surface is placed on top of its window.
Note this only works when XWalkPreferences.ANIMATABLE_XWALK_VIEW is false.

BUG=XWALK-3778,XWALK-3742
  • Loading branch information
axinging committed Mar 25, 2015
1 parent 4ec2530 commit 2c1d050
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,11 @@ public void setOverlayVideoMode(boolean enabled) {
}
}

public void setZOrderOnTop(boolean onTop) {
if (mContentViewRenderView == null) return;
mContentViewRenderView.setZOrderOnTop(onTop);
}

private native long nativeInit();
private static native void nativeDestroy(long nativeXWalkContent);
private native WebContents nativeGetWebContents(long nativeXWalkContent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,18 @@ void setOverlayVideoMode(boolean enabled) {
mContent.setOverlayVideoMode(enabled);
}

/**
* Control whether the XWalkView's surface is placed on top of its window.
* Note this only works when XWalkPreferences.ANIMATABLE_XWALK_VIEW is false.
* @param onTop true for on top.
* @since 5.0
*/
@XWalkAPI
public void setZOrderOnTop(boolean onTop) {
if (mContent == null) return;
mContent.setZOrderOnTop(onTop);
}

// Below methods are for test shell and instrumentation tests.
/**
* @hide
Expand Down

0 comments on commit 2c1d050

Please sign in to comment.