Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5648] MobileWeb: Property selectedBackgroundImage works incorrect in tableViewRow

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-08-19T07:14:42.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMobileWeb
Labelsn/a
ReporterMisha Vasko
AssigneeAndrew Kulinich
Created2011-08-18T02:21:05.000+0000
Updated2017-03-09T20:43:23.000+0000

Description

Property selectedBackgroundImage works incorrect in tableViewRow. selectedBackgroundImage stays as backgroundImage after deselecting the row. Example:

var win = Titanium.UI.currentWindow;
win.backgroundImage = '../images/tableview/brown_bg_482.png';


// data for tableview
var data = [

	{title:'Play Movie',backgroundImage:'../images/tableview/off_1.png', color:'black', font:{fontSize:16,fontWeight:'bold'},
			selectedBackgroundImage:'../images/tableview/on_1.png'},

	{title:'Camera',backgroundImage:'../images/tableview/off_2.png',color:'black', font:{fontSize:16,fontWeight:'bold'},
			selectedBackgroundImage:'../images/tableview/on_2.png'},

	{title:'Vibrate',backgroundImage:'../images/tableview/off_3.png',color:'black', font:{fontSize:16,fontWeight:'bold'},
			selectedBackgroundImage:'../images/tableview/on_3.png'},

	{title:'Orientation',backgroundImage:'../images/tableview/off_4.png',color:'black', font:{fontSize:16,fontWeight:'bold'},
		selectedBackgroundImage:'../images/tableview/on_4.png'},

	{title:'Photo Gallery',backgroundImage:'../images/tableview/off_1.png',color:'black', font:{fontSize:16,fontWeight:'bold'},
			selectedBackgroundImage:'../images/tableview/on_1.png'},

	{title:'Geo Location',backgroundImage:'../images/tableview/off_2.png',color:'black', font:{fontSize:16,fontWeight:'bold'},
			selectedBackgroundImage:'../images/tableview/on_2.png'},

	{title:'Accelerometer',backgroundImage:'../images/tableview/off_3.png',color:'black', font:{fontSize:16,fontWeight:'bold'},
			selectedBackgroundImage:'../images/tableview/on_3.png'},

	{title:'Sound',backgroundImage:'../images/tableview/off_4.png',color:'black', font:{fontSize:16,fontWeight:'bold'},
			selectedBackgroundImage:'../images/tableview/on_4.png'},

	{title:'Shake',backgroundImage:'../images/tableview/off_1.png',color:'black', font:{fontSize:16,fontWeight:'bold'},
			selectedBackgroundImage:'../images/tableview/on_1.png'},

	{title:'Email Client',backgroundImage:'../images/tableview/off_2.png',color:'black', font:{fontSize:16,fontWeight:'bold'},
			selectedBackgroundImage:'../images/tableview/on_2.png'},

	{title:'Save to Gallery',backgroundImage:'../images/tableview/off_3.png',color:'black', font:{fontSize:16,fontWeight:'bold'},
			selectedBackgroundImage:'../images/tableview/on_3.png'},

	{title:'Contacts',backgroundImage:'../images/tableview/off_4.png',color:'black', font:{fontSize:16,fontWeight:'bold'},
			 selectedBackgroundImage:'../images/tableview/on_4.png'}
];

// tableview object
var tableView = Titanium.UI.createTableView({
	backgroundColor:'transparent',
	data:data,
	separatorStyle:Ti.UI.iPhone.TableViewSeparatorStyle.NONE,
	top:10,
	width: 400,
});

var wrapperView = Titanium.UI.createView({backgroundColor:'transparent',width:300});

wrapperView.add(tableView);
win.add(wrapperView);

//win.add(tableView);

Comments

  1. Lee Morris 2017-03-09

    Closing ticket as fixed.

JSON Source