Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19579] Use the Reveal Effect

GitHub Issuen/a
TypeTechnical task
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-10-01T01:57:44.000+0000
Affected Version/sRelease 5.0.1, Release 5.0.0
Fix Version/sRelease 5.1.0
ComponentsAndroid
Labelsandroid
ReporterChee Kiat Ng
AssigneeHieu Pham
Created2015-09-25T03:09:58.000+0000
Updated2015-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.

Comments

  1. Hieu Pham 2015-09-30

    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();
       
  2. Ashraf Abu 2015-10-01

    PR Merged.
  3. Manuel Lehner 2015-10-13

    This PR introduced a bug here https://github.com/appcelerator/titanium_mobile/commit/52808d394be162771f607db916a73f9c44363beb#diff-bec22e2efdd8b352a7754ea42f435dc7R755 as options may 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 NPE
       10-13 16:01:25.559: E/AndroidRuntime(4158): FATAL EXCEPTION: main
       10-13 16:01:25.559: E/AndroidRuntime(4158): Process: com.goyya.fde, PID: 4158
       10-13 16:01:25.559: E/AndroidRuntime(4158): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.HashMap.get(java.lang.Object)' on a null object reference
       10-13 16:01:25.559: E/AndroidRuntime(4158): 	at org.appcelerator.titanium.util.TiConvert.toBoolean(TiConvert.java:371)
       10-13 16:01:25.559: E/AndroidRuntime(4158): 	at org.appcelerator.titanium.proxy.TiViewProxy.handleShow(TiViewProxy.java:755)
       10-13 16:01:25.559: E/AndroidRuntime(4158): 	at ti.modules.titanium.ui.ActivityIndicatorProxy.handleShow(ActivityIndicatorProxy.java:86)
       10-13 16:01:25.559: E/AndroidRuntime(4158): 	at ti.modules.titanium.ui.ActivityIndicatorProxy.handleMessage(ActivityIndicatorProxy.java:64)
       10-13 16:01:25.559: E/AndroidRuntime(4158): 	at android.os.Handler.dispatchMessage(Handler.java:98)
       10-13 16:01:25.559: E/AndroidRuntime(4158): 	at android.os.Looper.loop(Looper.java:135)
       10-13 16:01:25.559: E/AndroidRuntime(4158): 	at android.app.ActivityThread.main(ActivityThread.java:5254)
       10-13 16:01:25.559: E/AndroidRuntime(4158): 	at java.lang.reflect.Method.invoke(Native Method)
       10-13 16:01:25.559: E/AndroidRuntime(4158): 	at java.lang.reflect.Method.invoke(Method.java:372)
       10-13 16:01:25.559: E/AndroidRuntime(4158): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
       10-13 16:01:25.559: E/AndroidRuntime(4158): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
       
  4. Manuel Lehner 2015-10-13

    Here is a PR with a fix: https://github.com/appcelerator/titanium_mobile/pull/7295
  5. Ashraf Abu 2015-10-14

    [~manuellehner] Nice catch! (y)
  6. Ashraf Abu 2015-10-14

  7. Lokesh Choudhary 2015-10-27

    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

JSON Source