Java Code Examples for android.webkit.WebView#WebViewTransport
The following examples show how to use
android.webkit.WebView#WebViewTransport .
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: ChatWindowView.java From chat-window-android with MIT License | 6 votes |
@Override public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) { webViewPopup = new WebView(getContext()); CookieManager cookieManager = CookieManager.getInstance(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { cookieManager.getInstance().setAcceptThirdPartyCookies(webViewPopup, true); } webViewPopup.setVerticalScrollBarEnabled(false); webViewPopup.setHorizontalScrollBarEnabled(false); webViewPopup.setWebViewClient(new LCWebViewClient()); webViewPopup.getSettings().setJavaScriptEnabled(true); webViewPopup.getSettings().setSavePassword(false); webViewPopup.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); addView(webViewPopup); WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj; transport.setWebView(webViewPopup); resultMsg.sendToTarget(); return true; }
Example 2
Source File: MainActivity.java From styT with Apache License 2.0 | 5 votes |
@Override public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) { WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj; transport.setWebView(view); resultMsg.sendToTarget(); return true; }
Example 3
Source File: Main2Activity.java From styT with Apache License 2.0 | 5 votes |
@Override public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) { WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj; transport.setWebView(view); resultMsg.sendToTarget(); return true; }
Example 4
Source File: BrowserActivity.java From browser with GNU General Public License v2.0 | 5 votes |
@Override /** * handles javascript requests to create a new window in the browser */ public void onCreateWindow(boolean isUserGesture, Message resultMsg) { if (resultMsg == null) { return; } if (newTab("", true)) { WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj; transport.setWebView(getCurrentWebView().getWebView()); resultMsg.sendToTarget(); } }
Example 5
Source File: Html5Activity.java From ClassSchedule with Apache License 2.0 | 5 votes |
@Override public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) { WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj; transport.setWebView(view); resultMsg.sendToTarget(); return true; }