Tuesday, September 9, 2014

Webview when click on URL link stays inside webview

import android.webkit.WebView;(Alt-enter to add this)


 @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_item_detail, container, false);
        WebView myWebView =  ((WebView) rootView.findViewById(R.id.website_detail));
        // Show the dummy content as text in a TextView.
        if (mItem != null) {
            myWebView.loadUrl(mItem.website_url);
            myWebView.setWebViewClient(new WebViewClient());
        }

        return rootView;
    }


http://www.techotopia.com/index.php/An_Android_Studio_Master/Detail_Flow_Tutorial

http://developer.android.com/guide/webapps/webview.html#HandlingNavigation

No comments:

Post a Comment