My PIPActivity
has only one image view and I am entering in PIP mode in onCreate()
i.e PIPActivity
is there only to show image in PIP mode. Now when I am starting PIPActivity
there is some animation that slowly transitions into PIP mode. During this transition, the image is getting stretched weirdly. To avoid this how can stop the animation when entering PIP mode?
I have already tried
- In onCreate() calling overridePendingTransition(0, 0).
- Adding
Intent.FLAG_ACTIVITY_NO_ANIMATION
while launching activity. - Setting
<item name="android:windowAnimationStyle">@null</item>
in activity theme.
You may want to look at ActivityOptions and its various methods.
Or by using setExitTransition and/or setSharedElementExitTransition.
NOTE
Implement one of these in a launcher activity and NOT in PIPActivity.