[TIMOB-19580] Customize Activity Transitions
GitHub Issue | n/a |
---|---|
Type | Technical task |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-11-03T07:09:36.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.2.0 |
Components | Android |
Labels | notable |
Reporter | Chee Kiat Ng |
Assignee | Srikanth Sombhatla |
Created | 2015-09-25T03:11:29.000+0000 |
Updated | 2016-03-03T12:44:22.000+0000 |
Description
Activity transitions in material design apps provide visual connections between different states through motion and transformations between common elements. You can specify custom animations for enter and exit transitions and for transitions of shared elements between activities.
Can be divided into transition types
1. Content transition: Activity enter and exit transition.
2. Shared element transition: Transition between elements in different activities to give a seamless experience. Mostly used for master-detail.
PR: https://github.com/appcelerator/titanium_mobile/pull/7371 Use the following app.js code to test. This is an extension to tableviews example code with activity transitions added. Requires Android 5.0 and above.
PR Merged. Please note that on Android 5.0 onwards with this fix, opening a window will default to a cross-fading transition to move forward to support more Material capabilities. See: http://developer.android.com/training/material/animations.html#Transitions {quote} the default cross-fading transition is activated between the entering and exiting activities. {quote}
[~ssombhatla] Having errors running this code:-
Issue is with using empty shared element pairs which is causing problem in Android 6.0 whereas working in Android 5.0. Applied fixed common for both versions. PR https://github.com/appcelerator/titanium_mobile/pull/7382 Use the above mentioned code for testing.
PR Merged. Please note that on Android 5.0 onwards with this fix, opening a window will default to a cross-fading transition to move forward to support more Material capabilities when you use
addSharedElement
. Otherwise, it uses the normal transition. See: http://developer.android.com/training/material/animations.html#Transitions {quote} the default cross-fading transition is activated between the entering and exiting activities. {quote}PR https://github.com/appcelerator/titanium_mobile/pull/7445 merged for Doc update.
Verified the implementation of custom activity transitions & they work as expected. Closing. Environment: Appc Studio : 4.5.0.201601262138 Ti SDK : 5.2.0.v20160202005354 Ti CLI : 5.0.6 Alloy : 1.7.33 MAC Yosemite : 10.10.5 Appc NPM : 4.2.3-1 Appc CLI : 5.2.0-239 Node: 4.2.2 Nexus 6P - Android 6.0