Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Android Module

$
0
0

I am new to Android module development and am trying to develop a WebView module which will extend the android.webkit.WebView by adding customised context menu, etc.

I am now at the pretty early stage that I can successfully create the proxy and can invoke it from JS.

But whenever the WebView is created, it switch me to the device's native web browser App but not open the webview within my App.

Here's the snippet in my proxy:

private class ExtendedWebView etends TiUIView
{
    public ExtendedWebView(TiViewProxy proxy){
        super(proxy);
        ....        
        WebView webview = new WebView(proxy.getActivity());
        webview.loadUrl("http://google.com");
        setNativeView(webview);
    }
 
    public TiUIView createView(Activity activity)
    {
        TiUIView view = new ExtendedWebView(this);
        view.getLayoutParams().autoFillsHeight = true;
        view.getLayoutParams().autoFillsWidth = true;
        return view;
    }
 
    ....
}
How can I fix this?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



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