Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6427] Android: Ti.UI.TableView incorrectly orders row elements and fails to display post-initialization header properties

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2011-12-02T16:54:04.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2011-48, Release 1.8.0.1
ComponentsAndroid
Labelsbranch-v8, regression
ReporterDustin Hyde
AssigneeHieu Pham
Created2011-12-01T17:06:13.000+0000
Updated2011-12-05T15:10:01.000+0000

Description

Ti.UI.TableView incorrectly orders row elements and fails to display header property (when assigned after initialization) in all Android SDKs using TiMobile 1.8.0.1. In contrast, iOS (1.8.0.1) and all Android SDKs running 1.7.5 do not exhibit this behavior. Logs and screenshots attached. Steps to Reproduce: 1. Run code in new app. Use Android 1.8.0.1.
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({ title:'Win',backgroundColor:'#fff'});
var data = [];
data[0] = Ti.UI.createTableViewRow({hasChild:true,title:'Header should be Foo',header:'Foo'});
data[1] = Ti.UI.createTableViewRow({hasDetail:true,title:'Row 2'});
data[2] = Ti.UI.createTableViewRow({hasCheck:true,title:'Header should be Bar',header:'Bar'});
data[3] = Ti.UI.createTableViewRow({title:'Footer should be Bye',footer:'Bye'});
data[4] = Ti.UI.createTableViewRow();
data[4].header = "Blah";
data[4].title = "Header should be Blah";
var tableview = Titanium.UI.createTableView({data:data});
win.add(tableview);
win.open();
Expected Result: Rows should display in order. All rows with an explicit header should display the header. Actual Result: Rows are out of order. Rows with headers assigned after initialization do not display header.

Attachments

FileDateSize
android 1.7.5.png2011-12-01T17:06:13.000+000022760
android 1.8.0.png2011-12-01T17:06:13.000+000015206
iOS.png2011-12-01T17:06:13.000+000036219
log.txt2011-12-01T17:06:13.000+00001043

Comments

  1. Don Thorp 2011-12-04

    Updated priority to note why it should have been chosen to be fixed.
  2. Dustin Hyde 2011-12-05

    Bug fixed. Verified on: SDK: 1.8.0.1.v20111205011857 Runtimes: Android V8/Rhino Studio: 1.0.7.201112041107 OS: OS X Lion Devices Tested: Nexus One 2.2.2, Droid3 2.3.4, Slate 3.1, Emulator 4.0

JSON Source