[TIMOB-27504] Android: touchFeedback / ripple does not work when tapped from child view
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-03-12T19:43:25.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.0.0 |
Components | Android |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Gary Mathews |
Created | 2019-10-25T17:43:53.000+0000 |
Updated | 2021-03-12T19:43:25.000+0000 |
Description
On Android, the
touchFeedback
property aka ripple does not work when tapped from child view. This is a common issue especially for list views, since Titanium now behaves very different to the native default behavior which handles ripple automatically. Please fix this basic issue.
See the below code for details. Expected: The ripple color is shown for all touches. Actual: It only applies the ripple when tapped on the view itself. Bubbling does also not work.
var win = Ti.UI.createWindow();
var myTemplate = {
childTemplates: [{
type: 'Ti.UI.Label',
bindId: 'title',
properties: {
left: 20
}
}]
};
var list = Ti.UI.createListView({
templates: {
'template': myTemplate
},
defaultItemTemplate: 'template',
sections: [
Ti.UI.createListSection({
items: [{
properties: {
backgroundColor: '#fff',
touchFeedback: true,
touchFeedbackColor: 'red',
height: 50,
itemId: 'my_cell'
},
title: {
text: 'My Title (click here)',
color: '#000'
}
}]
})
]
});
win.add(list);
win.open();
Attachments
File | Date | Size |
---|---|---|
bug.mov | 2019-10-25T18:17:25.000+0000 | 314483 |
[~hknoechel] I am able to reproduce in the emulator or on device configuration below. Axway Appcelerator Studio, build: 5.1.4.201909061933 macOS : 10.15 Node.js Version : 8.9.1 npm Version : 5.5.1 Appcelerator CLI : 7.1.1 Titanium CLI CLI Version : 5.2.1 node-appc Version : 0.2.49 Titanium SDKs : 8.2.0.GA Pixel 3a Android API 29 (device and emulator) Pixel 3a Android API 28 (emulator)
Alan (I cannot link others anymore btw): I attached an example video of the issue. If you click on the label, it does not apply the ripple. If you click on the free area around the label, it does. Tested on 8.2.0 as well as latest master.
[~hknoechel] Updated my finding. Clicked not exactly on the right area apparently, and touch overlapped. Thanks for the clarification.
master: https://github.com/appcelerator/titanium_mobile/pull/12440
FR Passed, waiting on Jenkins build.
merged to master, cherry-picked to 10_0_X for 10.0.0 target