Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7703] Android: Tables: Rows created with anonymous objects randomly styled

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Do
Resolution Date2020-01-09T21:33:35.000+0000
Affected Version/sRelease 2.0.0, Release 1.8.1, Release 3.1.0
Fix Version/sn/a
ComponentsAndroid
Labelsreprod
ReporterTim Poulsen
AssigneeUnknown
Created2012-02-16T18:48:45.000+0000
Updated2020-01-09T21:33:35.000+0000

Description

User is creating a table with anonymous rows and applying style settings (font & color) to just one of the rows.

Expected results

Only the explicitly styled row should be formatted. h3: Actual results Random rows are formatted. Additionally rows get randomly formatted as the table is scrolled or orientation changes. The problem doesn't exist when creating rows with explicit TableViewRow objects
var win = Ti.UI.createWindow ({
  backgroundColor : "#ff0"
});

var data = [];
// FAIL CASE:
for(var i=0;i<25;i++) {
  if(i===0) {
    data.push({title: 'Row '+i, color : "#090", font : {fontSize : 60, fontWeight : "bold"}}  );
  } else {
    data.push({title: 'Row '+i});
  }
}

/*
// THIS WORKS AS IT SHOULD:
for(var i=0;i<25;i++) {
  if(i===0) {
    data.push(
      Ti.UI.createTableViewRow({title: 'Row '+i, color : "#090", font : {fontSize : 60, fontWeight : "bold"}})
    );
  } else {
    data.push(
      Ti.UI.createTableViewRow({title: 'Row '+i})
    );
  }
}
*/

var table = Titanium.UI.createTableView ({
  data : data
});

win.add (table);
win.open();
This might be related to TIMOB-1193.

Attachments

FileDateSize
Screen Shot 2012-02-16 at 6.45.41 PM.png2012-02-16T18:48:45.000+000046656

Comments

  1. jithinpv 2013-03-19

    Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4 jithinpv
  2. Lee Morris 2017-07-05

    I am able to reproduce this issue with the following environment; Pixel (7.1) Studio 4.9.0.201705302345 Ti SDK 6.1.1 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131
  3. 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. 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