Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android:windowBackground="@null" to improve app speed

Tags:

I just read a blogpost by Romain Guy on how to speed up an app UI. He basically says that if your app uses opaque views you can set the background to @null in your Activity's style using:

<item name="android:windowBackground">@null</item>

Does this work? I was willing to test this using FPS as he did but I didn't find a clear way of getting that info.

I have read some threads saying you need to do it yourself. I am about to add a custom view that draws the FPS in the onDraw() method and calls invalidate() to get call all the time.

Although this works, I would like to know if there is a better way to analyse FPS in an application.

like image 465
Macarse Avatar asked Jun 27 '11 21:06

Macarse


1 Answers

That blogpost has a source code of samples. Check FpsImageView.java.

like image 136
jamapag Avatar answered Sep 21 '22 16:09

jamapag