Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14063] Android: Slider touch events respond to their original location after transformation

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2013-07-03T15:10:16.000+0000
Affected Version/sRelease 3.1.0, Release 3.2.0
Fix Version/sn/a
ComponentsAndroid
LabelsAndroid, Titanium, mobilesdk
ReporterAshish Nigam
AssigneeIngo Muschenetz
Created2013-05-31T09:00:55.000+0000
Updated2013-07-24T07:12:10.000+0000

Description

Description

After transforming a slider, the touch events respond at the original position rather than the position resulting from the transformation. Further more, in the test case the slider is rotated 90 degrees, but sliding the slider returns it to the pre transformed position.

Sample Code

var win = Ti.UI.createWindow({
	backgroundColor : 'gray'
});


var slider = Titanium.UI.createSlider({
	min : 1,
	max : 10
});

slider.addEventListener("change",function(e){
	alert(e.value);
});

slider.addEventListener("touchstart",function(e){
	alert(e.value);
});

var t = Titanium.UI.create2DMatrix();
t = t.rotate(-90);
slider.setTransform(t);  //if i comment this then everything is working fine in original state

win.add(slider);

win.open();

Steps to reproduce

1: Create a sample project. 2: Copy paste the above code in app.js file. 3: Launch it in android device or simulator running android version 4.1.x or 4.2. 4: Now you can see that if transformation is applied no event is getting fired.

Comments

  1. Ingo Muschenetz 2013-07-03

    Resolving as duplicate of linked issue. Please follow along there.
  2. Shak Hossain 2013-07-24

    This issue can be closed. The customer implemented a work-around and they are Ok with that.

JSON Source