Based upon Romain Guy\'s blog post Android Performance Case Study when talking about Overdraw he says this:
Removing the window background: the backgroun
Just move getWindow().setBackgroundDrawable(null)
down, until anywhere after setContentView(R.layout.main)
; e.g.:
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
getWindow().setBackgroundDrawable(null);
}
The setContentView(...)
call propagates setting the content on the window the activity is attached to and probably overrides the change you meant to made with setBackgroundDrawable(null)
.
Result: