Android Splash Screen before black screen

后端 未结 2 1816
一整个雨季
一整个雨季 2021-01-14 19:15

I would like to display a splash screen while everything is initializing in the onCreate() method, yet components that I need to draw things to the screen are also initializ

2条回答
  •  不要未来只要你来
    2021-01-14 19:47

    Create a XML layout for this splash screen and set it as content view right after your super.onCreate():

    super.onCreate(savedInstanceState);
    setContentView (R.layout.splash_screen);
    

    That should be enough. It would display this splash screen until your setContentView(renderView) is called.

提交回复
热议问题