Create a true splash screen

前端 未结 7 554
误落风尘
误落风尘 2020-12-09 05:21

How can I make a true splash screen in Android? I don\'t want timers or delays. Just a splash screen that is shown until your application has loaded.

相关标签:
7条回答
  • 2020-12-09 06:20

    Its not that hard; you just create a view which you will use as your splashscreen (one that has simple layout and not requires lots of measuring), set that as the content for the activity using setContentView;

    Then call setContentView on the activity again with the complex layout which takes a while to build. You can even use Asynctask to load data before you call setContent the second time with your complex layout. That depends on wether you are bound by data loading or view building.

    0 讨论(0)
提交回复
热议问题