Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6116] Android: ScaleX/ScaleY with borderRadius leads to strange results

GitHub Issuen/a
TypeNew Feature
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2019-03-01T22:32:02.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsandroid, borderRadius, scale
ReporterMichael Gangolf
AssigneeShak Hossain
Created2019-01-27T19:21:23.000+0000
Updated2019-03-01T22:32:03.000+0000

Description

Scaling a view with borderRadius > 0 leads to strange results. The top left corner is not as round as the other corners. !20190127_201854.gif!
var win = Ti.UI.createWindow({
	backgroundColor: '#fff'
});

var view = Ti.UI.createView({
	width: 100,
	height: 100,
	borderRadius: 10,
	backgroundColor: "#f00"
});

win.add(view);

var scale = 1;
var fact = 0.01;

win.addEventListener("open", function() {
	setInterval(function() {
		scale += fact;

		view.scaleX = scale;
		view.scaleY = scale;
		if (scale > 3) {
			fact *= -1;
		}
		if (scale < 1) {
			fact *= -1;
		}
	}, 10);

})
win.open();

Titanium SDK 7.5.1.RC Android 7.0.1 (HTC A9)

Attachments

FileDateSize
20190127_201854.gif2019-01-27T19:19:41.000+0000387116

Comments

  1. Sharif AbuDarda 2019-02-01

    Hello [~michael], I have tested with SDK 7.5.1.v20190108052418 and 7.5.1.v20190124152315, in Android 8.1.0 device (Nokia 6). I wasn't able to reproduce the issue that can be seen here. I also tested in emulators, the result is same, working as expected. Is this only happening to your HTC device there? or this is reproducible to any other device? Let us know. Thanks.
  2. Michael Gangolf 2019-02-02

    Hi [~sdarda]. I was able to test it on a Moto G2 and a Galaxy A5. Both devices were working fine! I don't have another HTC phone to test if it is device specific or just my phone (guess I need a new one :) ).
  3. Sharif AbuDarda 2019-02-12

    Hello [~michael], I believe this is a specific device issue. I tested on Samsung Galaxy J2 Prime (6.0.1) with SDK 7.5.1.v20190124152315. It works fine. I also don't have htc device to verify my hypothesis :).

JSON Source