Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25835] Android: Animation with border radius doesn't works properly

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-05-09T22:22:13.000+0000
Affected Version/sRelease 7.1.0, Release 7.0.2
Fix Version/sRelease 7.3.0
ComponentsAndroid
LabelsAndroid, animation, borderRadius
ReporterJorge Macias Garcia
AssigneeGary Mathews
Created2018-03-02T08:18:20.000+0000
Updated2018-11-09T13:16:48.000+0000

Description

Affects to 7.0.2, 7.1.RC Animating a view with border radius doesn't works properly. On iOS it works fine. Check attached demo to see code example.

Attachments

FileDateSize
animate.gif2018-03-02T10:15:57.000+000099721
app-bugAnimationWithBorderRadius.zip2018-03-02T08:15:13.000+00009207627
bug-animation-radius.gif2018-03-02T08:13:39.000+000051321
Screen Shot 2018-03-08 at 11.18.18 AM.png2018-03-08T19:18:46.000+000034180

Comments

  1. Michael Gangolf 2018-03-02

    The problem is that a View with a borderView will create a parent TiBorderWrapperView View. Now when animating properties it will animated them on the outer view and not the view inside the TiBorderWrapperView. When adding the following code:
       if (view instanceof TiBorderWrapperView) {
       	view = ((TiBorderWrapperView)view).getChildAt(0);
       }
       
    in [TiAnimationBuilder](https://github.com/appcelerator/titanium_mobile/blob/1150f8228f8d569d1ab397e381aa1f76032cc148/android/titanium/src/java/org/appcelerator/titanium/util/TiAnimationBuilder.java#L315) it will use the inner view. I think it is only the backgroundColor where the check for borderWrapper is needed. All other properties (opacity, position) are fine on the outer view. I'm setting up a PR
  2. Michael Gangolf 2018-03-02

    PR: https://github.com/appcelerator/titanium_mobile/pull/9900 !animate.gif!
  3. Lokesh Choudhary 2018-05-02

    FR Passed. Waiting for merge to be enabled.
  4. Lokesh Choudhary 2018-05-09

    PR Merged.
  5. Samir Mohammed 2018-06-12

    Closing ticket. Fix can be seen in SDK Version: 7.3.0.v20180607210411 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/9900
  6. Jorge Macias Garcia 2018-11-09

    It doesn't works fine with 7.5.0.v20181108182512 See the link with the test app: [Example](http://personales.upv.es/jormagar/gif/border_radius_animation_bg.gif)

JSON Source