Code example for FrameLayout

Methods: removeView

0
    public void onPause() { 
        Log.d(DEBUG_TAG, "onPause");
        super.onPause(); 
 
        if (webView != null) {
            mWebViewContainer.removeView(webView);
        } 
    } 
 
    @Override 
    public void onActivityCreated(Bundle savedInstanceState) {
        Log.d(DEBUG_TAG, "onActivityCreated");
 
        mWebViewContainer = (FrameLayout)getView().findViewById(R.id.webViewContainer);
        mProgressContainer = getView().findViewById(R.id.progressContainer);
 
        if (webView == null) {
            webView = new WebView(getBrowserActivity());
            initWebView(); 
            loadActivitiesPage(); 
        }