We can refer to this article first, the first to open the article mentioned in the Overdraw function, so you can see the overdraw situation of the screen
http://hukai.me/android-performance-render/
Due to the wonderful design of our company (there is a near full screen drawerlayout!!! Content also and drawerlayout under the same content!!! Just typesetting not used!!! ), our app has always been very card!!!
Open the app a look, scared urine, almost the entire screen is red! That is, the situation of overdraw is very serious!!
Even hiding under the drawerlayout, the following content will still be drawn.
Especially with the use of new Android 5.0 components (although I'm not used to it), in the case of multiple layout overlays, it is possible to temporarily disappear by layout.setvisibility the lower layer (view.gone), Let them be visible again when they appear again.
In addition, in the Red Ocean, I found a magical phenomenon--fragment did not die!
We have a fragment in layout, each time call Fragmentmanager.replace replacement fragment
Through other people's article found that this is just the new fragment overlay on the old fragment above, click on the new fragment blank area can even point to the old fragment button.
The correct approach should be to use framelayout in layout and update each time through replace (r.id.framelayout_name,fragment) fragment
This will allow the old fragment to disappear completely.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Improve the efficiency of Android app UI