简体   繁体   English

单一活动中的飞溅方法显示无处不在的飞溅主题

[英]Splash approach in single activity shows everywhere splash theme

I use this approach in my single activity app - Splash-screen approach in single Activity app But everywhere in my layouts I see splash theme and this prevents me from working with views in Android Studio.我在我的单个活动应用程序中使用这种方法 - 单个活动应用程序中的闪屏方法但是在我的布局中的任何地方我都看到闪屏主题,这使我无法在 Android Studio 中使用视图。 Can someone help me with this?有人可以帮我弄这个吗?

Android 12 now has a SplashScreen API, which enables a new app launch animation for all apps when running on a device with Android 12 or higher. Android 12 now has a SplashScreen API, which enables a new app launch animation for all apps when running on a device with Android 12 or higher. This includes an into-app motion at launch, a splash screen showing your app icon, and a transition to your app itself, and for that, you don't need a Splash Activity.这包括启动时进入应用程序的动作、显示应用程序图标的启动屏幕以及到应用程序本身的过渡,为此,您不需要启动程序活动。

As for your app, you need to set the theme only for SplashActivity.至于您的应用,您只需为 SplashActivity 设置主题。 For other activity, set the theme to be the default one.对于其他活动,将主题设置为默认主题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM