Android exit transition excludeTarget not working inside android.support.v4.widget.DrawerLayout -
i have activity includes viewpager 3 fragments. first tab, calling activty , trying exclude toolbar , tab bar exit transition.
if (build.version.sdk_int >= 21) { getactivity().getwindow().setexittransition(new slide(gravity.left).excludetarget(r.id.toolbar,true)); pair<view, string> pair1 = pair.create((view) matcvr, matcvr.gettransitionname()); pair<view, string> pair2 = pair.create((view)mattxt, mattxt.gettransitionname()); activityoptionscompat options = activityoptionscompat.makescenetransitionanimation(getactivity(),pair1,pair2); activitycompat.startactivity(getactivity(), matintent, options.tobundle()); }
the issue excludetarget seems not working , whole view sliding left. have tried addtarget below including viewpager alone.but in case, default fade animation happening.
getactivity().getwindow().setexittransition(new slide(gravity.left).addtarget(r.id.viewpager));
has faced issue? appreciated.
update
the issue appears when have views inside
android.support.v4.widget.drawerlayout / android.support.design.widget.appbarlayout
we need make android:transitiongroup="false" explicitly parent views.
Comments
Post a Comment