Using shared elements transition between activities with different orientations
G

1

6

I have an Activity A which is permanently set in landscape orientation and an Activity B without any predefined orientation.

If I start activity B from activity A and phone rotation is in a landscape angle, shared element transition works properly and activity B starts in landscape orientation as expected. The problem occurs if the phone rotation is in a portrait angle, during the start of Activity B. Then, Activity B starts in portrait orientation (as expected) but no transition happens.

Has anyone faced this problem problem before? Any help would be appreciated. This is how activity B is called from Activity A:

Intent mIntent = new Intent(context, ActivityB.class); ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(this, sharedView,sharedViewTransitionName); startActivity(mIntent,options.toBundle());

Gerhan answered 16/5, 2015 at 10:2 Comment(0)
P
0

You can check out this library for activity and fragment transitions for pre lollipop devices. This supports scene transitions

   dependencies {
    compile 'com.albinmathew:PreLollipopTransition:1.1.2'

}

https://github.com/albinmathew/PreLollipopTransition

Phanerogam answered 28/5, 2015 at 9:40 Comment(1)
cant add dependencies file...!!Crowboot

© 2022 - 2024 — McMap. All rights reserved.