Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25039] Android Table View Row Coloring issue

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2020-08-18T23:59:06.000+0000
Affected Version/sRelease 6.1.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
Reporterankur garha
AssigneeGary Mathews
Created2017-07-31T18:02:41.000+0000
Updated2020-08-18T23:59:06.000+0000

Description

Not able to change row color of Label added inside Table view row. Steps to reproduce this issue :-

Create a Table View with search bar

Add complex table view row with a thumb image and UI label

Register click event to toggle UI label colors.

You can make use of sample JS code attached below.

When using this code, search for 'e' in table view search bar and start clicking table view rows

*Expected* : It should change color as per code *Actual* : Sometimes its not changing the UI label color Please also find the snapshot attached below Operating System Name = Mac OS X Version = 10.12.2 Architecture = 64bit # CPUs = 4 Memory = 8589934592 Node.js Node.js Version = 6.3.1 npm Version = 3.10.3 Titanium CLI CLI Version = 5.0.14 Titanium SDK SDK Version = 6.1.2 Target Platform = android

Attachments

FileDateSize
FirstView.js2017-07-31T17:58:01.000+00002296
Screenshot_2017-07-31-23-26-42.png2017-07-31T18:00:30.000+000035147

Comments

  1. Sharif AbuDarda 2017-07-31

    I can reproduce the issue with the given code for Android 6.0.0 with SDK 6.1.0.GA. The color of row label is not changing to red always. For some row it does. others it doesn't. Thanks.
  2. Dominic Maricic 2017-09-22

    Any update on this? It looks like you were able to reproduce.
  3. ankur garha 2017-09-25

    This is happening more on Ti SDK 6.2.0 and Android 7.x
  4. ankur garha 2017-09-25

    Please try to fix this one asap, or lets us know if there is any workaround available for it. We are losing lots of customers who have upgraded to our latest release and Android 7.x
  5. Gary Mathews 2017-09-25

    I cannot reproduce the issue with the test case provided or my own. Here's another test case:
       var win = Ti.UI.createWindow({backgroundColor: 'gray'}),
           tableView = Ti.UI.createTableView(),
           tableData = [];
       
       for (var i = 0; i < 10; i++) {
           var row = Ti.UI.createTableViewRow({
                   height: Ti.UI.SIZE
               }),
               img = Ti.UI.createImageView({
                   image: 'android/appicon.png',
                   width: 50, height: 50
               }),
               lbl = Ti.UI.createLabel({
                   text: 'ROW #' + i,
                   color: '#FFF'
               });
           row.add([img, lbl]);
           tableData.push(row);
       }
       tableView.data = tableData;
       
       tableView.addEventListener('click', function(e) {
           var row = e.row;
           row.children[1].color = 'blue';
       });
       
       win.add(tableView);
       win.open();
       
    This has been fixed by https://github.com/appcelerator/titanium_mobile/pull/9415, try 6.2.2.GA?
  6. Dominic Maricic 2017-09-25

    Gary, are you saying you could reproduce it on versions before 6.2.1, just not after?
  7. Gary Mathews 2017-09-26

    [~lchoudhary] Could you take a look at reproducing this?
  8. Lokesh Choudhary 2017-09-26

    [~gmathews], I was not able to reproduce the issue. The row label changes color from black > red > green > black each time its clicked. Tried it with SDK 6.1.0.GA, 6.1.2.GA, 6.2.0.GA, 6.2.1.GA & 6.2.2.GA. Studio Ver: 4.9.1.201707200100 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.9 Appc CLI: 6.2.4 Ti CLI Ver: 5.0.14 Alloy Ver: 1.9.14 Node Ver: 7.10.1 Java Ver: 1.8.0_101 Android : 7.1.1 , 6.0
  9. Dominic Maricic 2017-10-05

    We found out more details on this. You can produce it a lot more if your device is set to high contrast mode on a device like the Note 8. The color change completely breaks.

JSON Source