Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1721] Android: Views inside tableviewrow forget their visibility state when scrolled back in to view

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-06-20T10:15:06.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.0
ComponentsAndroid
Labelsandroid, defect, qe-testadded, rplist, tableview
ReporterBill Dawson
AssigneeNeeraj Gupta
Created2011-04-15T03:00:28.000+0000
Updated2013-06-20T10:15:06.000+0000

Description

Simple failcase below. (Make sure you have KS_nav_ui.png in your Resources folder - it's there by default.) Click on the image in a row and the image will disappear. Scroll so the whole row is not visible, then scroll back -- the image will be visible again.


var win = Ti.UI.currentWindow;
var rows = [];
for (var i = 0 ; i < 20; i++) {
    var btn = Ti.UI.createButton({ backgroundImage: 'KS_nav_ui.png', left: 5});
    btn.addEventListener('click', function(e) {e.source.hide()});
    var row = Ti.UI.createTableViewRow();
    row.add(btn);
    row.add(Ti.UI.createLabel({text: 'Row ' + i, left: 50}));
    rows.push(row);
}

win.add(Ti.UI.createTableView({data: rows}));

Comments

  1. Bill Dawson 2011-04-15

    I put the wrong code in before. Fixed it.

  2. Don Thorp 2011-04-15

    If more tests are need see offer in http://developer.appcelerator.com/helpdesk/view/51341">HelpDesk 51341

  3. Alan Leard 2011-04-15

    Another Ticket Reference: http://developer.appcelerator.com/helpdesk/view/75521">http://developer.appcelerator.com/helpdesk/view/75521

    Also, objects that are animated into place also lose their state and move back after scroll.

    This app.js does not work (visibility and location reset after scroll): http://developer.appcelerator.com/s3/retrieve/attachments.helpdesk.appcelerator.com/75521/comment/362287/app.js"> http://developer.appcelerator.com/s3/retrieve/attachments.helpdesk....

    This one does by setting visibility instead of using hide and eliminating animate: http://developer.appcelerator.com/s3/retrieve/attachments.helpdesk.appcelerator.com/75521/comment/362303/app.js"> http://developer.appcelerator.com/s3/retrieve/attachments.helpdesk....

    Tested with 1.6 and APIs 2.2

  4. Junaid Younus 2012-08-16

    Tested using TiSDK 2.2.0v20120816015712 on a Samsung Galaxy S2, unable to reproduce the issue. Used the following code:
       var win = Ti.UI.createWindow({backgroundColor: 'white'});
       
       var rows = [];
       for (var i = 0 ; i < 50; i++) {
           var btn = Ti.UI.createButton({ backgroundImage: 'KS_nav_ui.png', left: 5, width: 20, height: 20});
           btn.addEventListener('click', function(e) {e.source.hide()});
           var row = Ti.UI.createTableViewRow();
           row.add(btn);
           row.add(Ti.UI.createLabel({text: 'Row ' + i, left: 50}));
           rows.push(row);
       }
       
       win.add(Ti.UI.createTableView({data: rows}));
       
       win.open();
       
    Ticket closed.
  5. Rima Umbrasas 2012-08-17

    Verified fixed with : Mobilesdk-2.2.0.v20120816212512 Titanium Studio, build: 2.1.1.201207271312 Devices: Galaxy S III Android version 4.0.4
  6. Dhirendra Jha 2013-06-20

    Reopening to update labels
  7. Dhirendra Jha 2013-06-20

    Tested with: SDK:3.1.2.v20130619101604 Appcelerator Studio: 3.1.1.201306131423 OS: OSX 10.7.5 Device:iPad mini(v 6.0), htc desire(v 4.0.3) Xcode: 4.6

JSON Source