Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26663] Android: touchFeedbackColor doesn't work if view has a transparent backgroundColor and a border

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2021-03-15T07:35:08.000+0000
Affected Version/sRelease 8.0.0, Release 7.5.0
Fix Version/sRelease 10.0.0
ComponentsAndroid
LabelsTi.SDK, android, touchfeedback
Reporterpritish.george
AssigneeGary Mathews
Created2018-12-15T08:57:47.000+0000
Updated2021-03-15T07:35:08.000+0000

Description

The code below illustrates the bug. I have added a border radius to the second view so that it is visible and can be clicked on. The same behaviour can also be observed without border radius
var win = Ti.UI.createWindow({
	backgroundColor : 'black'
});

var vwWithBgColor = Ti.UI.createView({
	top : 50,
	width : 200,
	height : 100,
	backgroundColor : 'red',
	touchFeedback : true,
	touchFeedbackColor : 'blue'
});
win.add(vwWithBgColor);

var vwWithoutBgColor = Ti.UI.createView({
	top : 200,
	width : 200,
	height : 100,
	backgroundColor : 'transparent',
	touchFeedback : true,
	touchFeedbackColor : 'blue',
	borderColor : 'red',//included bordercolor so that the view is visible
});
win.add(vwWithoutBgColor);

win.open();

Attachments

FileDateSize
TouchFeedbackTest.js2021-03-09T03:33:19.000+00003565

Comments

  1. Sharif AbuDarda 2018-12-17

    Hello, I was able to reproduce the issue with the sample code provided. SDK 7.5.0.GA. Moving TIMOB. Thanks.
  2. Michael Gangolf 2019-01-19

    You can't reset the touchFeedbackColor at runtime if the view has a border. Might be worth looking at when changing the transparentBackground color bug. This box will show a feedbackColor when you run it for the first time
       var win = Ti.UI.createWindow({
       	backgroundColor: 'black'
       });
       
       var vwWithBgColor = Ti.UI.createView({
       	top: 50,
       	width: 200,
       	height: 100,
       	backgroundColor: 'red',
       	touchFeedback: true,
       	touchFeedbackColor: 'blue',
       	borderColor:"yellow"
       });
       win.add(vwWithBgColor);
       
       vwWithBgColor.addEventListener("click", function() {
       	// removes the color completely
       	vwWithBgColor.touchFeedbackColor = '#' + Math.floor(Math.random() * 16777215).toString(16);
       })
       
       win.open();
       
    but after the click it won't show another color
  3. Gary Mathews 2021-02-11

    master: https://github.com/appcelerator/titanium_mobile/pull/12446
  4. Samir Mohammed 2021-03-10

    FR Passed, waiting on Jenkins builld.
  5. Christopher Williams 2021-03-10

    merged to master and 10_0_X for 10.0.0 target

JSON Source