android.webkit.WebChromeClient.CustomViewCallback Java Examples

The following examples show how to use android.webkit.WebChromeClient.CustomViewCallback. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BaseWebViewActivity.java    From android-project-wo2b with Apache License 2.0 6 votes vote down vote up
public void onShowCustomView(View view, CustomViewCallback callback)
{
	if (myCallback != null)
	{
		myCallback.onCustomViewHidden();
		myCallback = null;
		return;
	}

	long id = Thread.currentThread().getId();
	Log.I("WidgetChromeClient", "rong debug in showCustomView Ex: " + id);

	ViewGroup parent = (ViewGroup) mWebView.getParent();
	String s = parent.getClass().getName();
	Log.I("WidgetChromeClient", "rong debug Ex: " + s);
	parent.removeView(mWebView);
	parent.addView(view);
	myView = view;
	myCallback = callback;
	// chromeClient = this ;
}
 
Example #2
Source File: BrowserActivity.java    From browser with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onShowCustomView(View view, int requestedOrientation, CustomViewCallback callback) {
	if (view == null) {
		return;
	}
	if (mCustomView != null && callback != null) {
		callback.onCustomViewHidden();
		return;
	}
	try {
		view.setKeepScreenOn(true);
	} catch (SecurityException e) {
		Log.e(Constants.TAG, "WebView is not allowed to keep the screen on");
	}
	mOriginalOrientation = getRequestedOrientation();
	FrameLayout decor = (FrameLayout) getWindow().getDecorView();
	mFullscreenContainer = new FullscreenHolder(this);
	mCustomView = view;
	mFullscreenContainer.addView(mCustomView, COVER_SCREEN_PARAMS);
	decor.addView(mFullscreenContainer, COVER_SCREEN_PARAMS);
	setFullscreen(true);
	getCurrentWebView().setVisibility(View.GONE);
	if (view instanceof FrameLayout) {
		if (((FrameLayout) view).getFocusedChild() instanceof VideoView) {
			mVideoView = (VideoView) ((FrameLayout) view).getFocusedChild();
			mVideoView.setOnErrorListener(new VideoCompletionListener());
			mVideoView.setOnCompletionListener(new VideoCompletionListener());
		}
	}
	mCustomViewCallback = callback;
}
 
Example #3
Source File: BrowserActivity.java    From JumpGo with Mozilla Public License 2.0 4 votes vote down vote up
@Override
public synchronized void onShowCustomView(View view, CustomViewCallback callback) {
    int requestedOrientation = mOriginalOrientation = getRequestedOrientation();
    onShowCustomView(view, callback, requestedOrientation);
}
 
Example #4
Source File: BrowserActivity.java    From Xndroid with GNU General Public License v3.0 4 votes vote down vote up
@Override
public synchronized void onShowCustomView(View view, CustomViewCallback callback) {
    int requestedOrientation = mOriginalOrientation = getRequestedOrientation();
    onShowCustomView(view, callback, requestedOrientation);
}
 
Example #5
Source File: BaseWebViewActivity.java    From android-project-wo2b with Apache License 2.0 4 votes vote down vote up
@Override
public void onShowCustomView(View view, CustomViewCallback callback)
{
	this.mWebViewActivity.onShowCustomView(view, callback);
}
 
Example #6
Source File: CordovaWebView.java    From app-icon with MIT License 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #7
Source File: CordovaWebView.java    From countly-sdk-cordova with MIT License 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #8
Source File: CordovaWebView.java    From lona with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #9
Source File: CordovaWebView.java    From pychat with MIT License 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #10
Source File: CordovaWebView.java    From chappiecast with Mozilla Public License 2.0 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #11
Source File: CordovaWebView.java    From cordova-plugin-intent with MIT License 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #12
Source File: CordovaWebView.java    From a2cardboard with Apache License 2.0 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #13
Source File: CordovaWebView.java    From cordova-plugin-app-update-demo with MIT License 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #14
Source File: CordovaWebView.java    From BigDataPlatform with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #15
Source File: CordovaWebView.java    From keemob with MIT License 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #16
Source File: CordovaWebView.java    From keemob with MIT License 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #17
Source File: CordovaWebView.java    From ultimate-cordova-webview-app with MIT License 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #18
Source File: CordovaWebView.java    From xmall with MIT License 2 votes vote down vote up
/**
 * Deprecated in 4.0.0. Use your own View-toggling logic.
 */
@Deprecated
void showCustomView(View view, CustomViewCallback callback);
 
Example #19
Source File: UIController.java    From Xndroid with GNU General Public License v3.0 votes vote down vote up
void onShowCustomView(View view, CustomViewCallback callback, int requestedOrienation); 
Example #20
Source File: UIController.java    From Xndroid with GNU General Public License v3.0 votes vote down vote up
void onShowCustomView(View view, CustomViewCallback callback); 
Example #21
Source File: BrowserController.java    From browser with GNU General Public License v2.0 votes vote down vote up
void onShowCustomView(View view, int requestedOrientation, CustomViewCallback callback);