41.5 Custom Transitions and TransitionSets in XML
While custom transitions can be implemented in code, it is often easier to do so via XML transition files using the <fade> and <changeBounds> tags together with some additional options. The following XML includes a single changeBounds transition:
<?xml version="1.0" encoding="utf-8"?>
<changeBounds/>
As with the code based approach to working with transitions, each transition entry in a resource file may be customized. The XML below, for example, configures a duration for a change bounds transition:
<changeBounds android:duration="5000" >
Multiple transitions may be bundled together using the <transitionSet> element:
<?xml version="1.0" encoding="utf-8"?>
<transitionSet
xmlns:android="http://schemas.android.com/apk/res/android" >
<fade
...