[TIMOB-19579] Use the Reveal Effect
| GitHub Issue | n/a |
|---|---|
| Type | Technical task |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2015-10-01T01:57:44.000+0000 |
| Affected Version/s | Release 5.0.1, Release 5.0.0 |
| Fix Version/s | Release 5.1.0 |
| Components | Android |
| Labels | android |
| Reporter | Chee Kiat Ng |
| Assignee | Hieu Pham |
| Created | 2015-09-25T03:09:58.000+0000 |
| Updated | 2015-10-27T00:14:23.000+0000 |
Description
Reveal animations provide users visual continuity when you show or hide a group of UI elements. The ViewAnimationUtils.createCircularReveal() method enables you to animate a clipping circle to reveal or hide a view.
master PR: https://github.com/appcelerator/titanium_mobile/pull/7255 testing steps:
var window = Ti.UI.createWindow({backgroundColor: "white"}); var view = Ti.UI.createView({top: 50, borderWidth: 5, borderRadius: 15, borderColor: "blue", width: 400, height: 600, backgroundColor: "red"}); var view2 = Ti.UI.createView({width: 100, height: 100, backgroundColor: "yellow"}); view.add(view2); var button = Ti.UI.createButton({title: "Hide/show view w/ circular animation"}); button.addEventListener("click", function(e) { if (view.visible) { view.hide({animated: true}); } else { view.show({animated: true}); } }); window.add(view); window.add(button); window.open();PR Merged.
This PR introduced a bug here https://github.com/appcelerator/titanium_mobile/commit/52808d394be162771f607db916a73f9c44363beb#diff-bec22e2efdd8b352a7754ea42f435dc7R755 as
optionsmay be null (see e.g. [here](https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/ActivityIndicatorProxy.java#L64)). This results in a NPEHere is a PR with a fix: https://github.com/appcelerator/titanium_mobile/pull/7295
[~manuellehner] Nice catch! (y)
Verified the implementation. Hide & show of the view uses the circular animation(reveal effect). Environment: Appc Studio : 4.4.0.201510231805 Ti SDK : 5.1.0.v20151022152020 Ti CLI : 5.0.5 Alloy : 1.7.18 MAC Yosemite : 10.10.5 Appc NPM : 4.2.1-6 Appc CLI : 5.1.0-38 Node: v0.10.37 Nexus 5 - Android 6.0