android 一.界面背景的性能优化[

android<UI> 1.界面背景的性能优化[
通常我们会根据客户的需求,给我们的某一个Android的用户界面加上一个背景。当我们在添加背景的同时,其实我们可以将系统默认的背景给去掉,这样会节省更资源从而提高性能:
具体做法是创建res/values/theme.xml文件,然后在里面添加:
<resources>
    <style name="Theme.NoBackground" parent="android:Theme">
        <item name="android:windowBackground">@null</item>
    </style>
</resources>
最后在清单文件里面的activity里面加入:android:theme="@style/Theme.NoBackground"。