Parental activity becomes invisible upon exit

I am using API Level 21 while testing the Nexus 6.

I have two actions: master + detail, each view has a fragment. When I select an item in the main list, it goes to the detailed view.

I have included view transitions in both the main and the detailed ones, for example:

    getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);

    Transition ts = new Slide(Gravity.RIGHT);
    ts.setDuration(2500);
    getWindow().setEnterTransition(ts);
    getWindow().setExitTransition(ts);

    getWindow().setAllowEnterTransitionOverlap(true);
    getWindow().setAllowReturnTransitionOverlap(true);

Transition adaptation works as expected, except for one thing: when I select an item, the parent activity is hidden as it transitions, so I don’t see it. When I click back, the detailed view goes over (not hidden), and the wizard goes over (not hidden). So why is the main view hidden when it transitions, and the transitions of the detail view to?

In Android Studio, I see several log messages, such as:

changeCanvasOpacity: opaque=true
changeCanvasOpacity: opaque=false
changeCanvasOpacity: opaque=false
changeCanvasOpacity: opaque=false

(master = > detail), - (detail = > master). , "opaque = true". , ( ).

?

" " ( 2) " " 1 : " INVISIBLE.".

, . ?

+4
3

, ActivityOptionsCompat.makeSceneTransitionAnimation. , activie: android:launchMode="singleInstance" , .

+2

onCreate target Activity, setContentView:

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        getWindow().setEnterTransition(null);
    }
+2

, , supportPostponeEnterTransition() supportStartPostponedEnterTransition(). , Glide .

0

All Articles