【发布时间】:2017-11-12 20:57:23
【问题描述】:
我需要在我的应用程序中显示启动画面,但我不知道该怎么做。 我有一个 Main Activity,其中通过调用另一个类中的函数从服务器下载了一些图像,并且我希望在图像准备好显示之前显示初始屏幕屏幕。
这是我的代码:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_navigation_drawer);
//This is where the images are loaded
new ClasePeticionRest.CogerObjetosAleatoriosInicio(this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
谢谢!!
【问题讨论】:
-
1.显示启动画面。 2. 运行异步任务。 3. 在它的 postExecute() 上使图像可见并且启动视图消失。
标签: android splash-screen