Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6588] Android: View with borderRadius is not rotated correctly

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterMichael Gangolf
AssigneeAbir Mukherjee
Created2020-08-15T16:32:20.000+0000
Updated2020-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

FileDateSize
Screenshot_20200815-182943.png2020-08-15T16:31:02.000+000018399

Comments

  1. Joshua Quick 2020-08-17

    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.
  2. Michael Gangolf 2020-08-17

    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

JSON Source