android - Common practices for splash screens -


i have "splash screen" in sense when launch app, dummy activity splashactivity has no ui launched. in activity, validate settings , if valid, show main view. if not valid, show login view.

the implementation of makes sense , kind of idea of dummy splash screen handle logic of showing activity.

but question comes fact transition launch intended activity abrupt , not smooth. notice screen goes white, , black, , goes intended activity. there way make transition smoother? maybe dummy activity approach not correct? coming ios development, have appdelegate class handles logic before view displayed , transition quite smooth.

tldr: how should approach starting activity based on logic? in dummy activity have now, or there way? if using dummy activity, how make transition smooth possible.

how make transition smooth possible.

simple, add flag intent this:

intent newintent = new intent(getbasecontext(), otheractivity.class); newintent.addflags(intent.flag_activity_no_animation); startactivity(newintent); 

or override pending transition right after starting new activity , before other lifecycle calls:

overridependingtransition(0, 0); 

how should approach starting activity based on logic? in dummy activity have now, or there way?

to honest not use 2 activities compensate 1 main activity , multiple fragments (say, login , content fragment) accommodate needs. can read more fragments here.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -