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

feat(android): animate color #11658

Merged
merged 2 commits into from Apr 28, 2020
Merged

feat(android): animate color #11658

merged 2 commits into from Apr 28, 2020

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Apr 25, 2020

merge after #11646

Since the other PR #11646 is already approved I've used it as the master to this PR since it changing the same file.

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

Being able to animate the color value.

Ti.UI.setBackgroundColor('white');
var win = Ti.UI.createWindow({
	backgroundColor: 'white'
});
var l = Ti.UI.createLabel({
	text: "test",
	color: "#000"
});
win.add(l);

setTimeout(function() {
	l.animate({
		color: "#ff0",
		duration: 1000,
		repeat: 10,
		autoreverse: true
	});
}, 1000);
win.open();

@build
Copy link
Contributor

build commented Apr 25, 2020

Messages
📖

💾 Here's the generated SDK zipfile.

📖 🎉 Another contribution from our awesome community member, m1ga! Thanks again for helping us make Titanium SDK better. 👍
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖

✅ All tests are passing
Nice one! All 6629 tests are passing.
(There are 709 skipped tests not included in that total)

Generated by 🚫 dangerJS against 41abf79

@m1ga
Copy link
Contributor Author

m1ga commented Apr 28, 2020

fixed the merge conflict and since #11646 is merged this one looks better now 😄

@sgtcoolguy
Copy link
Contributor

sgtcoolguy commented Apr 28, 2020

Sorry @m1ga don't mean to stomp on your commits here, but I had been working on a rebase and cleanup locally too... so I force-pushed that to your branch 😅

The unit test you have is nice - but ultimately I have to disable it because:

  • iOS seems to fire the animation complete immediately and not animate the color!
  • Animations don't update the view's properties that they affect!

Both are not your issue/fault. The latter has always bothered me. Ideally someday when an animation is done we'd push back the new values to the view's changed properties so querying them post-animation is correct.

/* eslint no-unused-expressions: "off" */
'use strict';
const should = require('./utilities/assertions');
const utilities = require('./utilities/utilities');
Copy link
Contributor

Choose a reason for hiding this comment

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

  • ⚠️ tests/Resources/ti.ui.label.addontest.js line 11 – 'utilities' is assigned a value but never used. (no-unused-vars)

@ssjsamir ssjsamir self-requested a review April 28, 2020 14:56
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

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

FR Passed: Able to see text animate and change colour using the test case above. PR can be merged once a CR is done.

Test Environment

MacOS Catalina: 10.15.5 Beta
Xcode: 11.4
Java Version: 1.8.0_131
Android NDK: 21.1.6273396-beta2
Node.js: 10.16.3
""NPM":"5.0.0-1","CLI":"8.0.0-master.10""
Pixel Xl 7.1.1 Sim

@m1ga
Copy link
Contributor Author

m1ga commented Apr 28, 2020

@sgtcoolguy no problem 👍 you'll make it work somehow 😄

@sgtcoolguy sgtcoolguy merged commit 4fa4e19 into tidev:master Apr 28, 2020
@m1ga m1ga deleted the animateColor branch August 7, 2020 07:54
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

4 participants