I am having some trouble understanding the difference between these two Window flags and am not 100% certain when each needs to be used and why.
The docs for Window.FEATURE_ACTIVITY_TRANSITIONS say:
Enables Activities to run Activity Transitions either through sending or receiving ActivityOptions bundle created with
makeSceneTransitionAnimation(Activity, Pair[])ormakeSceneTransitionAnimation(Activity, View, String).
And the docs for Window.FEATURE_CONTENT_TRANSITIONS say:
Flag for requesting that window content changes should be animated using a
TransitionManager.The
TransitionManageris set usingsetTransitionManager(TransitionManager). If none is set, a defaultTransitionManagerwill be used.
The documentation states that the following Window methods require the FEATURE_ACTIVITY_TRANSITIONS flag to be enabled, but say nothing about whether or not the FEATURE_CONTENT_TRANSITIONS needs to be enabled as well (note that according to the source code, FEATURE_ACTIVITY_TRANSITIONS is true and FEATURE_CONTENT_TRANSITIONS is false for material-themed applications by default):
get{Enter,Exit,Return,Reenter}Transition()set{Enter,Exit,Return,Reenter}Transition()getSharedElement{Enter,Exit,Return,Reenter}Transition()setSharedElement{Enter,Exit,Return,Reenter}Transition()getTransitionBackgroundFadeDuration()setTransitionBackgroundFadeDuration()
In other words, it seems like based on this information FEATURE_ACTIVITY_TRANSITIONS is the feature flag that applications will need to enable in order to use Lollipop's new Activity Transition APIs. What confuses me, however, is that this article from the Android Developers site states that enabling the FEATURE_CONTENT_TRANSITIONS is required in order to implement custom activity transitions.
So here are my questions:
- What is the difference between these two flags? What is the difference between an "activity transition" and a "content transition" in this context?
- Why is
FEATURE_ACTIVITY_TRANSITIONSenabled andFEATURE_CONTENT_TRANSITIONSdisabled by default? When is enabling theFEATURE_CONTENT_TRANSITIONSflag actually required? - Would it ever make sense to sense to disable
FEATURE_ACTIVITY_TRANSITIONSand enableFEATURE_CONTENT_TRANSITIONS? Or doesFEATURE_CONTENT_TRANSITIONSrequireFEATURE_ACTIVITY_TRANSITIONSto be enabled as well?
Thanks!