最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Android編程中activity啟動(dòng)時(shí)出現(xiàn)白屏、黑屏問題的解決方法

 更新時(shí)間:2015年12月16日 15:40:45   作者:天使之翼  
這篇文章主要介紹了Android編程中activity啟動(dòng)時(shí)出現(xiàn)白屏、黑屏問題的解決方法,涉及Android針對activity啟動(dòng)設(shè)置的技巧,需要的朋友可以參考下

本文實(shí)例講述了Android編程中activity啟動(dòng)時(shí)出現(xiàn)白屏、黑屏問題的解決方法。分享給大家供大家參考,具體如下:

默認(rèn)情況下 activity 啟動(dòng)的時(shí)候先把屏幕刷成白色,再繪制界面,繪制界面或多或少有點(diǎn)延遲,這段時(shí)間中你看到的就是白屏,顯然影響用戶體驗(yàn),怎么消除呢?

在 Activity theme 設(shè)置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程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評論

昌平区| 德化县| 赣榆县| 田林县| 绵竹市| 洪洞县| 宣武区| 喜德县| 西华县| 丰镇市| 瑞丽市| 闽侯县| 新民市| 四会市| 汉阴县| 宣汉县| 夹江县| 泸西县| 大化| 大连市| 原阳县| 余庆县| 姚安县| 甘谷县| 吴旗县| 杭锦旗| 武功县| 威宁| 遵化市| 宁南县| 缙云县| 青浦区| 改则县| 南康市| 赣榆县| 科尔| 米林县| 廊坊市| 盐边县| 凤翔县| 上犹县|