Code example for FrameLayout

Methods: addView, setSystemUiVisibility, setVisibility

0
            if (inCustomView()) { 
                callback.onCustomViewHidden();
                return; 
            } 
            ((SherlockFragmentActivity) mContext).getSupportActionBar().hide();
            mCustomViewContainer.addView(view);
            mCustomView = view;
            mCustomViewCallback = callback;
            mCustomViewContainer.setVisibility(View.VISIBLE);
        } 
 
        @TargetApi(11) 
        @SuppressWarnings("deprecation") 
        private void hideUI() { 
            if (Build.VERSION.SDK_INT >= 16)
                mCustomViewContainer.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);
            else if (Build.VERSION.SDK_INT >= 14)
                mCustomViewContainer.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
            else 
                mCustomViewContainer.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
        } 
 
        @TargetApi(11) 
        @SuppressWarnings("deprecation") 
        private void showUI() {