Black screen before Splash screen appear in android

前端 未结 7 1569
遇见更好的自我
遇见更好的自我 2020-11-30 20:22

We know that when the app do some long process like downloading some information from internet it could show a splash screen before loading the application and when the app

7条回答
  •  一个人的身影
    2020-11-30 21:06

    Add a theme with the background you are using to your application tag in the manifest file to prevent the black screen to be drawn.

    theme.xml

    
    
    
    
    

    AndroidManifest.xml

    ....
    
    ....
    

    Read why there is a black screen here On app launch, Android displays a simple preview window (based on your activity theme) as an immediate response to the user action. Then the preview window crossfades with your actual UI, once that has fully loaded. To ensure a smooth visual transition, your activity theme should match your full UI as closely as possible. The below image shows how the experience can be jarring if not handled properly.

提交回复
热议问题