Disabling background window rendering
In most games, developers generally lean toward full-screen modes. This may not seem obvious since we see no real difference visually, but the Android OS doesn't realize which applications are running in full-screen. What this means is that the background window will continue to be drawn underneath our application unless otherwise specified in the AndroidManifest.xml
. In this topic, we're going to cover how to disable background rendering to improve application FPS, mainly benefiting lower-end devices.
Getting ready...
The first thing we must do in order to stop the background windows from rendering is create a theme for our application. We will do this by adding a new xml file to our project's res/values/
folder, called theme.xml
.
Overwrite all code in the default xml file with the following code and save the file:
<?xml version="1.0" encoding="UTF-8"?> <resources> <style name="Theme.NoBackground" parent="android:Theme"> <...