-1

I am using this window zoom transition in my app. It is a zoom in/out animation that will show when the user switches between two activities. But its not working on gingerbread.

Please help me make it work on gingerbread. If not possible, please suggest some other code.

Thanks!

Chinmay Dabke
  • 5,070
  • 11
  • 40
  • 63

2 Answers2

2

Use ActivityOptionsCompat for backward compatibility to API 4

ActivityOptionsCompat options = ActivityOptionsCompat.makeScaleUpAnimation(view, 0, 0,view.getWidth(), view.getHeight());
ActivityCompat.startActivity(MainActivity.this, intent, options.toBundle());
Allen Chan
  • 4,041
  • 2
  • 19
  • 16
1

ActivityOptions is only available as from API 16, so it won't work on Gingerbread. See documentation. As an alternative, you could use overridePendingTransition from the Activity class which is available as from API 5. Maybe this example could help you ?

2Dee
  • 8,609
  • 7
  • 42
  • 53
  • I want to start the activity transition from the button position (As seen in the link provided in my question). overridePendingTransition won't help me. Thanks anyway! – Chinmay Dabke Feb 14 '14 at 10:37