Displaying logo for few seconds at application start

后端 未结 7 1258
粉色の甜心
粉色の甜心 2021-02-08 07:13

I want to display a logo for few seconds before application starts and menu is visible. I want also to use some when it disappears. Should I create a new activity? Can I set it

7条回答
  •  无人及你
    2021-02-08 07:47

    Why? Users don't like to wait. However, if you need to wait because you're loading some data, you can:

    public void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
    
        /* Do some work in a new thread, calling setContentView at the end with your view */
    }
    

提交回复
热议问题