Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): fixes background color animation with borders #11053

Merged
merged 3 commits into from Sep 9, 2019

Conversation

ypbnv
Copy link
Contributor

@ypbnv ypbnv commented Jul 16, 2019

JIRA: https://jira.appcelerator.org/browse/TIMOB-27237

Description:
Fixes animating a view's background color always starting from a wrong color. It used the TiBorderWrapper's background color (which is null) as a starting color for the animation.

Note: No unit test, since this is a visual bug.

Test case:
app.js

var win = Ti.UI.createWindow({
	layout : 'vertical',
	width : Ti.UI.FILL,
	height : Ti.UI.FILL
});

var label = Ti.UI.createLabel({
	top : 20,
	width :'80%',
	font : {
		fontSize : 14
	},
	text : 'Should go from blue to black',
	textAlign : 'center',
	color : 'white',
	backgroundColor : 'blue',
	borderRadius : 20
});

var label2 = Ti.UI.createLabel({
	top : 20,
	width :'80%',
	font : {
		fontSize : 14
	},
	text : 'Should go from blue to black',
	textAlign : 'center',
	color : 'white',
	backgroundColor : 'blue'
});

label.addEventListener('click',function() {
	label.animate({
		backgroundColor : '#000',
		duration : 10000
	});
	label2.animate({
		backgroundColor : '#000',
		duration : 10000
	});
});

win.add(label);
win.add(label2);
win.open();

The view with rounded corners should not flicker and start the backgroundColor animation from a wrong color.

fixes animating a view's background color always starting from a wrong color
@ypbnv ypbnv added this to the 8.2.0 milestone Jul 16, 2019
@ypbnv ypbnv requested a review from garymathews July 16, 2019 14:33
@build build requested a review from a team July 16, 2019 15:02
@build
Copy link
Contributor

build commented Jul 16, 2019

Messages
📖

💾 Here's the generated SDK zipfile.

📖

✅ All tests are passing
Nice one! All 4336 tests are passing.
(There are 471 tests skipped)

📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.

Generated by 🚫 dangerJS against f003d46

Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: PASS

@keerthi1032
Copy link
Contributor

FR passed. Background color animation works as expected on labels.

Test Environment:
Operating System
Name = Mac OS X
Version = 10.14.5
Architecture = 64bit
Node.js
Node.js Version = 10.16.0
npm Version = 6.9.0
Titanium CLI
CLI Version = 5.2.1
Titanium SDK
SDK Version = local sdk 8.2.0.v20190716103730
Device =Samsungs s5 android 6
Emulator = Pixel xl andorid 9. nexus 6p android 6
Studio -5.1.3.201907112159
CLI -7.1.0-24

@keerthi1032 keerthi1032 merged commit 86b3699 into tidev:master Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants