[AC-6588] Android: View with borderRadius is not rotated correctly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Michael Gangolf |
Assignee | Abir Mukherjee |
Created | 2020-08-15T16:32:20.000+0000 |
Updated | 2020-08-17T19:41:30.000+0000 |
Description
A view with borderRadius is not correctly turning the right container/outerView:
!Screenshot_20200815-182943.png|thumbnail!
*Code:*
var win = Ti.UI.createWindow({title: 'Demo App',backgroundColor: "#aaa"});
var view = Ti.UI.createView({
height: 100,width: 100,backgroundColor: "#f00",top: 40,
rotation: 45
});
var view2 = Ti.UI.createView({
top: 180,height: 100,backgroundColor: "#00f",width: 100,
rotation: 45,
borderRadius: 10
});
var view3 = Ti.UI.createView({
top: 320,height: 100,backgroundColor: "#ff0",width: 100,
rotation: 45
});
win.add(view);
win.add(view2);
win.add(view3);
win.open();
*Expected result:*
The blue view should be rotated by 45deg and show round corners.
*Setup:*
Ti SDK 9.1.0.RC
Android 10 (Pixel 4)
Attachments
File | Date | Size |
---|---|---|
Screenshot_20200815-182943.png | 2020-08-15T16:31:02.000+0000 | 18399 |
This issue has been raised before as can be seen by the "duplicate" ticket links. This is actually a bug on Google's end with circular clipping and animation. Please see... https://issuetracker.google.com/issues/37123819 How about an alternative solution? I recommend that you use Titanium's
MaskedImage
instead. It's hardware accelerated on Android and works on iOS too. Please see ticket [TIMOB-17363] for examples.I always forget the MaskedImage for those parts. I thought since the "borderRadius" views have an other and inner view it is just rotating the wrong one. Thanks again (y) I'll change it in my code