Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2952] Android: backgroundSelectColor on row are not being recognized when a button is present

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Do
Resolution Date2020-01-09T18:50:16.000+0000
Affected Version/sRelease 2.0.1, Release 3.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsapi
ReporterRick Blalock
AssigneeEric Merriman
Created2011-04-15T03:33:37.000+0000
Updated2020-01-09T18:50:16.000+0000

Description

Tested with 1.6 SDK (Build from today - 1-26). Tested on an Android device running 2.2

Workaround is to create a view, apply backgroundSelectedColor to the view, add all row elements to the view. This works fine. It doesn't work if the button is the immediate child of the row.

Ticket here: http://developer.appcelerator.com/helpdesk/view/66071#c320941">http://developer.appcelerator.com/helpdesk/view/66071#c320941

Code to reproduce:


var mywin = Titanium.UI.createWindow({
    title: 'Test',
    backgroundColor: '#fff'
});

var mycolls = [];

for (var i = 0; i < 6; ++i) {

    var row = Ti.UI.createTableViewRow({
        height: 40,
        backgroundSelectedColor: '#AA0000'
    });

    var icost = Ti.UI.createButton({
        title: '$20',
        top: 18,
        right: 10,
        width: 60,
        height: 20,
        font: {
            fontSize: 12,
            fontFamily: 'Helvetica Neue'
        }
    });
    row.add(icost);

    mycolls.push(row);
}

var tview = Ti.UI.createTableView({
    data: mycolls
});
tview.addEventListener('click',
function(e) {
    Ti.API.info('**EVENT**:' + ' index=' + e.index + ', row=' + e.row + ', type=' + e.type +
    ', src=' + e.source);
});

mywin.add(tview);

mywin.open();

Comments

  1. Junaid Younus 2012-05-14

    Tested with 2.0.1GA2 on a Samsung Galaxy S2 (2.3.6), and the issue still exists.
  2. Federico Casali 2012-05-16

    Jira bug review - still reproducible on 2.1 CI
  3. Junaid Younus 2012-08-29

    Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120828153312, issue still valid.
  4. Alan Hutton 2018-08-03

    Occurs on : SDK : 7.3.0.v20180803101103 CLI : 7.0.4 Android Emulator OS 6.0
  5. Alan Hutton 2020-01-09

    It has been decided that this issue should be closed as “Won’t do.” This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. Updating, or creating code may not reproduce the issue reported, or be a valid test case. If community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.

JSON Source