Android. Implementing of splash screen with animations - android

I know that there are 2 common methods of implementing splash screens:
Using activity and Timers
Using a Launcher Theme
Using a Launcher theme is the preferred way because I need splash while cold start.
But suppose I need to implement a splash screen with animated logo, text and background.
Is it possible using the Launcher Theme to create animated splash screen or animations is quite not possible in this method and I will have to create separate activity for my splash screen.
Please help me)

You could use Android's SplashScreenApi to launch your app.
This includes an into-app motion at launch, a splash screen showing your app icon, and a transition to your app itself. This provides a seamless transition into our app -
https://developer.android.com/guide/topics/ui/splash-screen

Related

How get rig of the starting non-seen activity?

I have an app where I used the dark theme. I have also added a splash screen where I have added an animation. The background of the SplashActivity is white. When I first start the app, I get a dark screen and then the splash screen is displayed. How to get rid of that dark screen and see directly the splash screen? Thanks
Its related to Cold Start. It happens when your app starts for the first time as explained in the android documentation. However to deal with it I prefer the solution of having background drawable and set it to app theme if your Splash screen is static but in your case as you are using animations you need to use mixture of both techniques i.e. setting the splash screen theme as drawable which is loaded during cold start and later on when it finishes you render your animated stuff.

SplashScreen Animation lag between activities

I want to make a SplashScreen before the main activity starts. I've been carefully replicating this tutorial but there are still problems.
In my code I have an animation in SplashActivity. But my MainActivity has so many elements to initialize that the animation in SplashScreen Activity is lagging a lot.
Is there any possible way to manage this? I tried to use runOnUIThread in the onCreate method of MainActivity, but that made the problem even worse.
actually with 4.4 OS Google is asking to do away with splash screens.
You are better off putting some dummy screen -> splash screen -> main activity. Here dummy screen with no have anything in it.
Provided you want splash screen with no action bar. If you add empty action bar to splash screen you can keep as it is
splash screen -> main activity.
Time lag is due to android takes time to start activity with no action bar at the start of the application.

Android : White screen when relaunch app

I have a problem of white screen when I relaunch background app.
I click home button and then I click on app logo, my application resume and sometimes I have a white screen.
Do you know what's happening please?
This is the time that your application takes starting, before first activity is displayed.
If you extended the application class, you can look at the onCreate method, if there is much code here.
You can minimize the effects, setting the default window background to a color or drawable in a theme:
<item name="android:windowBackground">#color/mycolor</item>

Why does ActionBar Compat not display my app's title?

My app is built with the support ActionBar to allow for a standard UI between Android 4.x and Android 2.3, and for the most part this works fine. However, the title is not displayed in the ActionBar when I first launch the app under Android 2.3.
If I rotate the device to landscape mode, then the title appears in the ActionBar. After rotating the device back to portrait mode, the title is still visible.
What could be causing this? When I launch a different Activity in the app, that Activity's label (as specified in AndroidManifest.xml) is correctly displayed in the ActionBar.
EDIT: I've tracked this down to a splash screen Activity that is launched from the main activity's onCreate method. I can probably work around this be rearchitecting the app to launch with the splash screen as its default launch activity and then launch the main activity, but are there any other workarounds?
Unfortunately, I don't think "remove the splash screen" will be acceptable.
As far as I can tell, this issue is a bug in Android 2.3. It seems like this problem was caused by my launch Activity starting another Activity (the splash screen) from its onCreate method. Moving the splash screen launch to onStart or onResume did not help to resolve this issue.
I was able to work around the issue by replacing the internals of my launch Activity with the splash screen and creating a new "real main Activity" that the splash screen Activity launches.
It was important to keep the same class as the launch Activity because the app has already been released, and changing the class of the launch Activity would break shortcuts for users who have already installed the app.

Show the splashscreen when return from background android app

Currently, the splash screen is not displayed only when the application is closed.
I want to showing the splash screen when my app is return from background.
You need to have the splash-screen displayed in onResume() method, as answered here: https://stackoverflow.com/a/4414191/1027204
In general splash screens are meant to display when an app is initially loaded with some background task to complete.So,splash screens are not always required when you return from apps menu.
Call your splash screen activity on onResume method of each activity through Intent.

Categories

Resources