Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28447] Android: Add "imageTouchFeedback" to Ti.UI.ImageView

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2021-08-03T10:46:06.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.1.0
ComponentsAndroid
LabelsImageView, android, touch
ReporterJoshua Quick
AssigneeJoshua Quick
Created2021-05-14T05:48:51.000+0000
Updated2021-08-03T10:46:06.000+0000

Description

*Summary:* On Android, the [touchFeedback](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-touchFeedback) property applies ripple effect to a view's "background" when the view is touched. When applied to a Ti.UI.ImageView, this ripple effect can't be seen if the image is opaque (ie: not transparent) and completely covers the view. This is not a bug, but app developers would like the ability to apply a touch ripple effect to the foreground "image". *Feature Proposal:* Add the following properties to Ti.UI.ImageView... * imageTouchFeedback // boolean * imageTouchFeedbackColor // optional string When the new "imageTouchFeedback" property is set true, the ripple effect should be applied to the foreground image assigned via the "image" property. *Example Code:*
const window = Ti.UI.createWindow();
window.add(Ti.UI.createImageView({
	image: "https://raw.githubusercontent.com/appcelerator/titanium_mobile/master/tests/Resources/ExifRotate90.jpg",
	imageTouchFeedback: true,
	imageTouchFeedbackColor: "yellow",
	autorotate: true,
}));
window.open();
*Work-Around:* For older Titanium versions, you can apply a touch ripple effect via the "backgroundImage" instead. The downside with this is that images are not loaded asynchronously via this property and the EXIF orientation is ignored.

Comments

  1. Joshua Quick 2021-05-14

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/12814
  2. Ewan Harris 2021-08-03

    Merged

JSON Source