zoukankan      html  css  js  c++  java
  • Android 解决启动页白屏或者黑屏的问题

    欢迎页启动的线程由于请求和处理的数据量过大而,导致欢迎页在出现之前界面上会有一个短暂的白色闪屏停留,当然白色闪屏的停留是因为 application 的主题样式android:theme=@style/AppTheme 使用了 Theme.Light 题导致的,Light 样式的 windowBackground、colorBackground、colorForeground 等属性的值均为 light 也就是白色偏亮,所以才会出现白色闪屏。

    下面是我的 APP 出现白色闪屏时样式引用的代码:

     <style name="startactivitytheme" parent="android:Theme.Light.NoTitleBar">
            <item name="android:windowFullscreen">true</item>
            <item name="android:windowNoTitle">true</item>
            <item name="android:windowBackground">@drawable/trip_bg_logo_iamge</item>
            <!-- All customizations that are NOT specific to a particular API-level can go here. -->
        </style>
    

      

     <!-- 启动页面 -->
            <activity
                android:name="com.xxx.xxx.xxx.activity.StartActivity"
                android:screenOrientation="portrait"
                android:theme="@style/startactivitytheme" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
    

      

  • 相关阅读:
    EhCacheManager篇
    CXF篇
    soap篇
    动态代理篇
    springmvc中使用interceptor拦截器
    hibernate用注解配置实体类的映射
    项目随笔之springmvc中freemark如何获取项目路径
    项目随笔-------第一篇
    springMVC前台传入字符串日期参数转化
    js获取当前日期方法
  • 原文地址:https://www.cnblogs.com/tony-yang-flutter/p/4193858.html
Copyright © 2011-2022 走看看