英文:
How to animate from splash screen to main screen on Android?
问题
我在这里的建议链接中,按照步骤设置了将闪屏界面定义为可绘制项,并将其设置为启动活动的主题。然而,正如预期的那样,转换有点突然。有人能否提供一种在转换过程中添加动画的方法?
英文:
I followed the advice here to setup my splash screen to be defined as a drawable and set as the theme for the launching Activity. However as expected the transition is a bit abrupt. Could someone suggest a way to animate the transition?
答案1
得分: 1
你所阅读的建议是创建启动屏幕的一个非常好的方法,因为我们避免了应用初始化时出现空白屏幕。
要创建活动/片段过渡,我认为除了创建SplashActivity/SplashFragment并在一定延迟后或在必要时加载数据后开始过渡之外,没有其他方法。
然而,我尚未将这两种方法结合起来,即在更改主题并在之后运行过渡。也许有一种方法可以将这两种方法结合起来,这样我们就可以找到一个最佳平衡点,即应用启动时没有空白屏幕,并且我们有过渡效果。
英文:
The advice you've read is a very good way for creating splash screen, because we're avoiding blank screen on app initialization.
To create the activity/fragment transition I think there is no other way than creating a SplashActivity/SplashFragment and starting the transition after some delay or when necessary data is loaded.
However I haven't combined those two approaches together, so changing the theme and running the transition after. Maybe there is a way to combine those two, so we can end up with sweet spot, where we don't have blank screen on app start + we have transition.
答案2
得分: 1
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论