Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16145] Android: Animation issue when setting borderColor & borderWidth on a Ti.UI.View

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2014-09-10T07:38:10.000+0000
Affected Version/sRelease 3.2.0, Release 3.2.1
Fix Version/sRelease 3.3.0, Release 3.4.0
ComponentsAndroid
Labelsmodule_animation, parity, qe-testadded, supportTeam
ReporterEduardo Gomez
AssigneeIngo Muschenetz
Created2014-01-08T01:33:27.000+0000
Updated2014-10-14T00:54:48.000+0000

Description

Issue description

When animating a view with a border on android, the animations are clipped to the bounds of the border. It appears that the border becomes the new 'parent' of the view, rather than the window that owns it.

Steps to reproduce:

1. Launch application using Titanium SDK 3.2 on an Android device 2. Swipe down on each of the rectangles and observe behaviour. 3. Run once again on iOS simulator to notice parity

Sample code

(function() {

	var myAppWindow = Ti.UI.createWindow({
		backgroundColor : 'white'
	});

	var view1 = Ti.UI.createView({
		width : 100,
		height : 100,
		left : 20,
		top : 50,
		backgroundColor : "blue",
		borderColor : "black",
		borderWidth : 5
	});

	var view2 = Ti.UI.createView({
		width : 100,
		height : 100,
		right : 20,
		top : 50,
		backgroundColor : "red"
	});

	view1.addEventListener('swipe', function(e) {
		if (e.direction === "down") {
			var moveDownAnimation = Ti.UI.createAnimation({
				top : 150,
				duration : 500,
				autoreverse : true
			});
			view1.animate(moveDownAnimation);
		}
	});

	view2.addEventListener('swipe', function(e) {
		if (e.direction === "down") {
			var moveDownAnimation = Ti.UI.createAnimation({
				top : 150,
				duration : 500,
				autoreverse : true
			});
			view2.animate(moveDownAnimation);
		}
	});

	myAppWindow.add(view1);
	myAppWindow.add(view2);

	myAppWindow.open();
})(); 

Comments

  1. jithinpv 2014-09-10

    Issue reproduces in Titanium SDK version 3.2.3.GA, 3.2.0.GA Cannot reproduce in Titanium SDK version 3.4.0 master, 3.3.0.GA Titanium Studio, build: 3.3.0.201407100905 Titanium Command-Line Interface CLI version 3.3.0, Android device : Motorola Moto G, Android version : 4.4.4 iOS simulator : iPhone Retina (3.5-inch), iOS 7.0.3
  2. Priya Agarwal 2014-09-11

    Verified with environment: Appcelerator Studio:3.4.0.201409101253 Sdk:3.4.0.v20140910235714 alloy:1.5.0-rc titanium:3.4.0-rc titanium-code-processor:1.1.1 acs:1.0.16 npm:1.3.2 OS:Maverick(10.9.4) xcode: Xcode6GMSeed Device:iPhone5c(v8.0),Nexus7(v4.4.4) Animation working same in both ios and android Hence closing the issue.

JSON Source