如何有效制作启动画面 [英] How to make a splash screen efficiently

查看:59
本文介绍了如何有效制作启动画面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的应用制作启动画面,以便在显示启动画面时可以加载一些数据.但是似乎有很多制作启动画面的方法.

I am trying to make splash screen for my app so that I can load some data in when I am showing the splash screen .But seems there are many way of making a splash screen.

1.使用布局进行新的活动并显示该活动一段时间,但是使用布局进行其他活动会使应用变重.

1.Make a new activity with a layout and show that activity for some time.But making another activity with a layout makes the app heavy.

2.进行一个没有布局的新活动,并制作一个闪屏,而不是显示为此处

2.Make a new activity with no layout and making a splash screen back ground instead as shown here

3.制作具有布局的片段,并将其显示为初始屏幕,如下所示这里

3.Make a fragment with a layout and show them as splash screen as shown here

在所有这些当中,这是制作启动画面的最佳方法.我可以制作一个初始屏幕,但我想使其轻而易举.

Among all these which is the best way of making a splash screen. I am able to make a splash screen but I want to make it light and easy.

推荐答案

1.使用布局进行新的活动并显示该活动一段时间,但是使用布局进行其他活动会使应用变重.

1.Make a new activity with a layout and show that activity for some time.But making another activity with a layout makes the app heavy.

在进行活动时,您可以使用Thread来显示初始屏幕.使Activity线程休眠几秒钟,并在休眠期间更新后台数据非常有效.

While making the activity, you use Thread to show the splash screen. Make the Activity thread sleep for few seconds and update background data during sleep is efficient.

这篇关于如何有效制作启动画面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆