[TIMOB-25661] Android: Glitchy rotation animation occurs with views with borders in Android 7.0 and above
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Reopened |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | Release 7.1.0 |
Components | Android |
Labels | n/a |
Reporter | Motiur Rahman |
Assignee | Joshua Quick |
Created | 2018-01-11T09:54:30.000+0000 |
Updated | 2020-08-17T19:12:38.000+0000 |
Description
I am using Circular progress widget(https://github.com/manumaticx/circularprogress), in that as per my project requirement I need to rotate the view for that I have added the below code:
var animation = Ti.UI.createAnimation({
duration : 0,
transform : Ti.UI.create2DMatrix().rotate(-90)
});
$.container.animate(animation);
this is working fine in all the Android and iOS devices except Android OS version 7. Please see the attachment file, Android 7 should work as like that.
If I just add this property *autoreverse : true* then the Circular view is showing but not the correct position.
*Actual Behaviour:* Android v7.0.0 Circular view and animation is not working properly.
*Expected Behaviour:* Need's to support the Android 7.0.0 as well.
Test Code:
I have attached the "App" folder please run it on Android 7.0.0 and other devices for the difference.
Let me know if you need anything else.
Attachments
File | Date | Size |
---|---|---|
actual.png | 2018-01-18T21:31:03.000+0000 | 52393 |
app.zip | 2018-01-11T09:51:27.000+0000 | 9301158 |
expected.png | 2018-01-18T21:31:03.000+0000 | 58423 |
Screen Shot 2018-01-11 at 3.26.00 PM.png | 2018-01-11T09:43:41.000+0000 | 42079 |
Screen Shot 2018-01-11 at 3.30.06 PM.png | 2018-01-11T09:43:54.000+0000 | 49428 |
master: https://github.com/appcelerator/titanium_mobile/pull/9751
7_0_X: https://github.com/appcelerator/titanium_mobile/pull/9752
FR Passed. Waiting for merge to get enabled.
Master PR merged.
Backport PR merged.
Verified the fix with SDK 7.1.0.v20180124063413 & 7.0.2.v20180123170142. Closing. Studio Ver: 5.0.0.201712081732 SDK Ver: 7.0.2.v20180123170142, 7.1.0.v20180124063413 OS Ver: 10.13.2 Xcode Ver: Xcode 9.2 Appc NPM: 4.2.11 Appc CLI: 7.0.1 Daemon Ver: 1.0.1 Ti CLI Ver: 5.0.14 Alloy Ver: 1.10.10 Node Ver: 8.9.1 NPM Ver: 5.5.1 Java Ver: 1.8.0_101 Devices: ⇨ google Pixel --- Android 7.1.1 ⇨ google Nexus 5 --- Android 6.0.1
This is a Google bug that was introduced in Android 7.0 (aka: API Level 24): https://issuetracker.google.com/issues/37123819
We are reverting the above code change in Titanium 7.0.2.GA. We're doing this because it's causing large views with borders to disappear (ie: fails to render) for other Titanium developers, such as the issue mentioned here: [TIMOB-25733] We have discovered that this is a bug on Google's end which was introduced as of Android 7.0 and it hasn't been fixed yet (as of the time of this comment). The Google bug report can be seen via the link below. It's an issue with circular clipping and animation. https://issuetracker.google.com/issues/37123819 [~morahman], I recommend that you use Titanium's Ti.UI.createActivityIndicator() feature instead. That will display the native animated circular progress indicator.
Note that we've added radial gradient support on Android as of Titanium 7.1.0. The radial gradient feature can be used to draw a solid circle or ring, which is what the app developer wants. This is a better solution than using rounded borders to "clip" the view into a circle, because the rounded clipping is what's buggy on Google's end. Also, radial gradient is hardware accelerated and can render faster as well. See... https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-backgroundGradient
Fixed in 7.1.0