
本文实例讲述了AndroID编程中activity启动时出现白屏、黑屏问题的解决方法。分享给大家供大家参考,具体如下:
默认情况下 activity 启动的时候先把屏幕刷成白色,再绘制界面,绘制界面或多或少有点延迟,这段时间中你看到的就是白屏,显然影响用户体验,怎么消除呢?
在 Activity theme 设置style 即可
<style name="Apptheme" parent="androID:theme.light.NoTitlebar"> <item name="androID:windowIsTranslucent">true</item> <item name="androID:windowNoTitle">true</item> <item name="androID:windowActionbar">false</item> <item name="androID:windowBackground">@androID:color/transparent</item> <!-- All customizations that are NOT specific to a particular API-level can go here. --> </style>
<application androID:name="com.skymobi.moposns.MyApplication" androID:allowBackup="true" androID:icon="@drawable/ic_launcher" androID:label="@string/app_name" androID:theme="@style/Apptheme" > <activity androID:name="com.skymobi.moposns.MainActivity" androID:label="@string/app_name" androID:screenorIEntation="portrait" > <intent-filter> <action androID:name="androID.intent.action.MAIN" /> <category androID:name="androID.intent.category.LAUNCHER" /> </intent-filter> </activity>
希望本文所述对大家AndroID程序设计有所帮助。
总结以上是内存溢出为你收集整理的Android编程中activity启动时出现白屏、黑屏问题的解决方法全部内容,希望文章能够帮你解决Android编程中activity启动时出现白屏、黑屏问题的解决方法所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)