Code example for FragmentActivity

Methods: getWindow, onAttachedToWindow

0
        actionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.nav_background));
    } 
     
    @Override 
    public void onAttachedToWindow() { 
        super.onAttachedToWindow(); 
        // Enable dithering, ie better gradients. 
        getWindow().setFormat(PixelFormat.RGBA_8888);
    } 
}