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): Allow touch feedback for image and gradient backgrounds #10986

Closed
wants to merge 8 commits into from

Conversation

ypbnv
Copy link
Contributor

@ypbnv ypbnv commented Jun 20, 2019

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

Description:
Touch feedback property is now available for views with an image or a gradient backgrounds.

No unit tests since this is a visual improvement.

Test case:

var win = Ti.UI.createWindow({ layout: 'vertical'}),
	button = Ti.UI.createButton({ top: 10,
				backgroundImage: '<your-image-here>',
				touchFeedback: true,
				touchFeedbackColor: 'blue' }),
	button2 = Ti.UI.createButton({ top: 10,
				backgroundColor: 'yellow',
				touchFeedback: true,
				touchFeedbackColor: 'green'}),
	button3 = Ti.UI.createButton({ top: 10,
				backgroundGradient: { type: 'linear',
				startPoint: { x: '0%', y: '50%' },
				endPoint: { x: '100%', y: '50%' },
				colors: [ { color: 'red', offset: 0.0},
					{ color: 'blue', offset: 0.25 },
					{ color: 'red', offset: 1.0 } ],
				},
				touchFeedback: true,
				touchFeedbackColor: 'blue'}),
	button4 = Ti.UI.createButton({ top: 10,
				title: 'Change colors'});

win.add([button, button2, button3, button4]);

button4.addEventListener('click', function () {
	button.touchFeedbackColor = 'yellow';
	button2.touchFeedbackColor = 'red';
	button3.touchFeedbackColor = 'green';
});
win.open();

Touch feedback property is now available for views with an image or a gradient backgrounds.
@ypbnv ypbnv added this to the 8.2.0 milestone Jun 20, 2019
@ypbnv ypbnv requested a review from garymathews June 20, 2019 15:34
@build build requested review from a team June 22, 2019 04:03
@build
Copy link
Contributor

build commented Jun 22, 2019

Warnings
⚠️

🔍 Can't find junit reports at ./junit.*.xml, skipping generating JUnit Report.

⚠️

Commit dca33bd56ee8fce747c77066f95160026fd8e41d has a message "feat(android): Allow touch feedback for image and gradient backgrounds

Touch feedback property is now available for views with an image or a gradient backgrounds." giving 1 errors:

  • subject must not be sentence-case, start-case, pascal-case, upper-case
Messages
📖

🚨 This PR has one or more commits with warnings/errors for commit messages not matching our configuration. You may want to squash merge this PR and edit the message to match our conventions, or ask the original developer to modify their history.

Generated by 🚫 dangerJS against a71c489

@jquick-axway jquick-axway self-requested a review June 25, 2019 02:41
@jquick-axway jquick-axway modified the milestones: 8.2.0, 8.3.0 Jul 19, 2019
@sgtcoolguy sgtcoolguy removed this from the 8.3.0 milestone Dec 10, 2019
@garymathews garymathews added this to the 9.1.0 milestone Apr 9, 2020
nativeView.setBackgroundColor(bgColor);
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think removing this block of code will cause a regression where you can no longer change a view's backgroundColor dynamically anymore because setBackgroundColor() won't get called.

@jquick-axway
Copy link
Contributor

Closing in favor of PR #11795 .

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