zoukankan      html  css  js  c++  java
  • 启动应用的白屏问题解决方案

    今天登录公司邮箱看到的这一个小技巧,还没有试过,先存下来~

    ============================================================================================

    首先要尽量减少在Application里面处理的操作,尽量减少,下面是具体处理白屏的方法:
    1.HomeActivity是启动页(启动页具体是指类似淘宝,网易云音乐之类的第一个出现的页面),如果当前应用没有启动页的话,请写一个过渡用的Activity(代码内直接在oncreate里面跳转你的主页就行,没有启动页的情况下,不要在首页里面加上透明theme,会出现很多问题),
    单独设置下这个activity的theme属性:
    <activity
        android:name=".activity.HomeActivity"
        android:exported="true"
        android:launchMode="singleTop"
        android:screenOrientation="portrait"
        android:theme="@style/HomeTheme">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
    
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    homeTheme是继承自你的主theme

    会把白屏的情况变成透明的。

  • 相关阅读:
    工程的创建
    scrapy框架简介和基础应用
    移动端数据爬取
    Python网络爬虫之图片懒加载技术、selenium和PhantomJS
    验证码处理
    Python网络爬虫之requests模块
    Python网络爬虫之三种数据解析方式
    Python网络爬虫之requests模块
    scrapy
    基于XML的AOP配置
  • 原文地址:https://www.cnblogs.com/wangmengran/p/7541658.html
Copyright © 2011-2022 走看看