Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2577] Android: TableView Does Not S

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:30.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M01
ComponentsAndroid
Labelsandroid, defect, release-1.6.0
ReporterRyan Asleson
AssigneeDon Thorp
Created2011-04-15T03:23:13.000+0000
Updated2011-04-17T01:59:30.000+0000

Description

Comments

  1. Ryan Asleson 2011-04-15

    Oops, sorry for the bad title, hit Enter before I wanted to.

    In Android 1.5.0 and in 1.5.0 update 1, a TableView with a single row does not display the table row. If another row is added, both rows will appear.

    See this thread in the Q&A:

    http://developer.appcelerator.com/question/76221/tableview-and-appendrow-displays-nothing-when-table-has-one-row"> http://developer.appcelerator.com/question/76221/tableview-and-appe...

  2. Bill Dawson 2011-04-15

    For QA: Fail case app.js:

       Titanium.UI.setBackgroundColor('#000');
       var win = Titanium.UI.createWindow({  
           title:'Test',
           backgroundColor:'#fff',
           fullscreen: false,
           exitOnClose: true
       });
       
       win.open();
       var tv =Ti.UI.createTableView({
           top: 0, left: 0, right: 0, height: 300,
           backgroundColor: 'yellow'
       });
       
       win.add(tv);
       
       tv.appendRow( Ti.UI.createTableViewRow({color: 'black', title: 'First Row'}));
       
       var btn = Ti.UI.createButton({
           top: 310, left: 20, right: 20, height: 40,
           title: 'Append row'
       });
       win.add(btn);
       btn.addEventListener('click',function(){
           tv.appendRow( Ti.UI.createTableViewRow({color: 'black', title: 'Appended Row'}));
       });
       

    If you run that in the non-fixed version of the sdk, when the window loads you'll see a yellow box which is supposed to be a tableview with one row in it. It won't have show any rows. Only when you click the button to append a new row will you finally see the first row (along with the one you just appended.)

    With the fixed version of the sdk, you'll see the first row right away when the window loads.

  3. Bill Dawson 2011-04-15

    (from [032be3e5d322c6dc792d6a72f67854fc308f8443]) [#2577 state:fixed-in-qa] set model dirty when appending first row https://github.com/appcelerator/titanium_mobile/commit/032be3e5d322c6dc792d6a72f67854fc308f8443"> https://github.com/appcelerator/titanium_mobile/commit/032be3e5d322...

  4. Thomas Huelbert 2011-04-15

    Titanium SDK version: 1.6.0 (01/04/11 08:01 e49700d). G1 (1.6) droid1 (2.2.1). saw the fail in 1.5.2 and the fix in 1.6.0.

    Verified iOS 4.2.1 ipod touch 4GT

JSON Source