Skip to content Skip to sidebar Skip to footer

Starting Activity On Condition Produces A Flicker On Screen

I have a UI-less MainActivity, which holds certain logic to determine if the user is already logged in or not. If the user is logged in, I am starting HomeActivity and if not, then

Solution 1:

You can try setting FLAG_ACTIVITY_NO_ANIMATION on the intent

intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);

and/or call overridePendingTransition(0, 0) after calling finish()

You could also replace the activities with Fragments - have the MainActivity with a fullscreen scontainer that you replace with a login Fragment or a Home Fragment.

Post a Comment for "Starting Activity On Condition Produces A Flicker On Screen"