0

I'm trying to use overridePendingTransition() to animate the very first Activity - the one that gets created when the user launches the app. Is this possible?

Where should I call overridePendingTransition()? Tried right after super.onCreate() and right after super.onStart() , but it didn't work.

I would prefer to manage this at runtime, rather than setting the @anim in a custom style. Couldn't find anything. Is it possible?

natario
  • 24,954
  • 17
  • 88
  • 158

1 Answers1

0

from experience all I will say is it will not WORK to make it work you need to use a workaround, which is create a transparent launcher activity, carrying the app name and everything without a View (that is do not set content view) and make it transparent as I said with this code this.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); and immediately call your "in real life splash screen or launcher activity", and put this.overridePendingTransition(R.anim.grow_from_middle,R.anim.shrink_to_middle); in its onresume() (anywhere you prefer, I prefer this) and voila you have it..

budi
  • 6,351
  • 10
  • 55
  • 80
Elltz
  • 10,730
  • 4
  • 31
  • 59
  • what about performance? I feel like this could really show things down. – natario Dec 28 '14 at 09:49
  • Let's say I "think" :) Anyway I was talking about launching times rather than system performance. Gonna try on some old device and let you know. – natario Dec 28 '14 at 10:07