Android splash screen / launch screen also shows when keyboard is resizing - android

I have a blue image as splash screen for startup.
However inside my app when an open keyboard is closed it shows the background imagine of the splash screen for a brief second which looks very weird.
windowSoftInputMode is set to
android:windowSoftInputMode="adjustResize"
I think adjustResize is right.
What could I do to solve the problem? Why is the splash screen even in the background?

No clue if you do this already, but for activities like a splash screen where you only use it once and returning isn't wanted, remember to call finish(). If you finish the activity, it will not be in the activity stack. Try adding finish() after the intent that takes you away from the 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.

Pause on App Launch with AppCompatActivity for preview screen before splash screen appears

Since switching to AppcompatActivity, when the app is launched there is a long pause for the preview screen prior to the splash screen launching. The launcher activity theme is Theme.AppCompat.Light.NoActionBar and adding true only causes a black screen to appear instead of the drawable in android:windowBackground within the style but it still hangs for about 10 seconds before the splash screen appears. There is no real work done in the application class within onCreate so no idea what's causing the long pause. The Splash Activity appears after the long pause at the beginning and when degugging, the oncreate of the splash activity is not triggered until the 10 seconds is over. Thanks
It's not good how you start the thread of the splash activity. It blocks all the Ui elements. Try this instead https://github.com/alessandroargentieri/AuctionExample/blob/master/app/src/main/java/argentieri/alessandro/crossoverauction/SplashActivity.java

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.

Changing Activity screen when the app is not running

How can i change the screen of an activity when pressing any button on an android phone that takes one away from the running app.
I'm trying to get a blank screen to show up on the "recents" screen, instead of a snapshot of the app.
You can use this option and check if it helps you meet your need.
android:excludeFromRecents="true"
Add this to your activities in the application manifest if you do not want the app to be shown in the recent apps list. One drawback is that you would not be able to resume the app from the Recents list. Not sure if this is what you need.
The other way is to have a 'Blank Activity', which you start when your actual activity pauses. You can then finish the 'Blank Activity' on its Resume. This way, you will have your app shown on the Recents list, but with a blank screen.
You can call finish() for activity but that will kill activity. I think that will leave blank screen. Or destroy(). Try both respond with results.
you might want to change the onpause() or onclose() functions of your app. they are the last thing android execute before leaving,therefor you can change the aspect off your app just before you leave it
EDIT :
Maybe if you create PopupWindow and set it to full screen, and color black when exiting no preview would be shown, but app would still be running (idea of user DjDexter5GH) in the onpause() and onclose() functions. therefgor,when you leave,a black(or whatever you want) screen is pushed in front
you can then close it in the onrestart(is it called this?)

Android: Splash screen issues

On my Android App, I have set up a splash screen. The splash screen opens when the app is opened and lasts for two seconds before it redirects to a login screen.
The issue I am having is that the splash screen displays once, and then re-directs to the login screen. BUT when I click on the app again it goes straight to the login screen ignoring the splash screen. Is there a reason for this? Does it automatically open on your last screen? Because then if I hit the back button when it opens on the login screen it DOES go back to the splash screen but then doesn't redirect to the login screen after 2 seconds.
Yes this is normal behavior. When you hit the back button after the second launch you are ending the app, thus your splash screen shows on the next launch. You will need to add an intent to your login activity's on resume method to launch your splash screen. Here is a on resume example. Android example which uses onResume, onStart and onRestart
Set clearTaskOnLaunch via the Android Manifest of your project to true. This will clear the task/stack history whenever the activity is launched.

Categories

Resources