Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (webview)
Viewing all articles
Browse latest Browse all 680

Extending TiWebView

$
0
0

Hello all,

I'm trying to modify a TiWebView in an external module. What I'm trying to accomplish is to disable the

settings.setSupportMultipleWindows(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
which are set in the original TiWebView creation.

I created a module and try to add this line:

import ti.modules.titanium.ui.WebViewProxy;
and then use this function:
public TiWebView returnWebview(TiWebView view) {
 
    WebSettings settings = view.getSettings();
 
    settings.setSupportMultipleWindows(false);
    settings.setJavaScriptCanOpenWindowsAutomatically(false);
 
    return view;
}
Unfortunately, when I try to import the .ui.WebViewProxy it gives the error

'The import ti.modules.titanium.ui cannot be resolved'

Any help on this? Or any other methods of changing a web view? Without having to build the entire source?

Regards,

Ron


Viewing all articles
Browse latest Browse all 680

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>