Code example for Window

Methods: getAttributes, setAttributes

0
        return null; 
    } 
 
    public void setFullscreen(boolean enabled) {
        Window win = mActivity.getWindow();
        WindowManager.LayoutParams winParams = win.getAttributes();
        final int bits = WindowManager.LayoutParams.FLAG_FULLSCREEN;
        if (enabled) {
            winParams.flags |=  bits;
        } else { 
            winParams.flags &= ~bits;
            if (mCustomView != null) {
                if (Build.VERSION.SDK_INT > 10) {
                    mCustomView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
                } 
            } else { 
                if (Build.VERSION.SDK_INT > 10) {
                    mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
                } 
            } 
        } 
        win.setAttributes(winParams);
    } 
 
    public Drawable getFaviconDrawable(Bitmap icon) {
        Drawable[] array = new Drawable[3];
        array[0] = new PaintDrawable(Color.BLACK);