*This a regression. It broke in 5.4.0.GA.Works fine in 5.3.1.GA.*
Steps to reproduce:
1. Use the code below in your app.js & build for android device/emulator.
var _window = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var data = [];
for (var i = 0; i < 10; i++) {
var tvr = Ti.UI.createTableViewRow({
title: 'test ' + i,
hasChild: true,
// backgroundSelectedImage:'/KS_nav_ui.png',
backgroundSelectedColor: 'red',
height:'30',
focusable:true
});
data.push(tvr);
}
var tv = Ti.UI.createTableView({
data: data,
separatorColor:'black'
});
_window.add(tv);
_window.open();
2. After the app launches press & hold on any of the tableviewrows.
Actual results:
1. The background color for the tableview row does not turn red or if the the backgroundSelectedImage property is used image does not appear when you touch the table view row.
Expected results:
1. The background color for the tableview row should turn red as long as you hold your finger on the screen.
2. As soon as you lift your finger the red color should go back to the default white or window background color.
Ref:
http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableViewRow-property-backgroundSelectedColor
http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableViewRow-property-backgroundSelectedImage
master: https://github.com/appcelerator/titanium_mobile/pull/8579
Tested with this environment: NPM Version: 2.15.9 Node Version: 4.5.0 Mac OS: 10.12.1 Appc CLI: 6.1.0 Appc CLI NPM: 4.2.8 Titanium SDK version: 6.1.0.v20170103080657 Appcelerator Studio, build: 4.8.1.201612050850 Xcode 8.2 Android Device 6.0.1 Android Emulator 6.0.1_x86 Testing was done on both Device and Emulator with the demo code above. On the device, the app worked as expected. On the Emulator, however, the row did not stay consistently red while the mouse button was pressed. Occasionally, the row flickered red after the mouse button was released. The attached clip "TIMOB-24058.mov" shows the behavior. The circle around the cursor shows when the mouse is pressed down.
[~amukherjee] I cannot reproduce the issue on emulator.
[~gmathews],
backgroundSelectedColor
works now butbackgroundSelectedImage
does not. I do not see the image when I click on the row. Studio Ver : 4.9.0.201704240654 SDK Ver : 6.1.0.v20170502132103 OS Ver : 10.12.3 Xcode Ver : Xcode 8.3.2 Appc NPM : 4.2.9 Appc CLI : 6.2.0 Ti CLI Ver : 5.0.12 Alloy Ver : 1.9.11 Node Ver : 6.10.1 Java Ver : 1.8.0_101 Devices : google Nexus 6P --- Android 7.1.1 google Nexus 5 --- Android 5.1.1[~lchoudhary] Working fine on both emulator and device, you need to hold down a row to see the background:
[~gmathews], Checked again. Me & [~smohammed] can't see the image when we hold down on a tableviewrow. Checked with 6.1.0.v20170505162105.
[~lchoudhary] Images placed in
Resources/android
should be accessible. *EXAMPLE*If this is an issue, it is a separate issue from this ticket.
[~gmathews], It was user error, I can see the
backgroundSelectedImage
fromResources/android/
as well.Verified the fix.
backgroundSelectedColor
&backgroundSelectedImage
can be seen when tableviewrow is tapped & held. Closing. Studio Ver: 4.9.0.201705110256 SDK Ver: 6.1.0.v20170514022959 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.2 Appc NPM: 4.2.9 Appc CLI: 6.2.1 Ti CLI Ver: 5.0.13 Alloy Ver: 1.9.11 Node Ver: 6.10.1 Java Ver: 1.8.0_101 Devices: ⇨ oneplus A0001 --- Android 6.0.1