Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-15049

Android: TableView row UI is not getting updated if table or row have height set to Ti.UI.SIZE

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Release 3.1.1, Release 3.1.2, Release 3.1.3, Release 3.2.0, Release 3.2.1
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Titanium Mobile SDK, Android 4.1.2,4.2.2

      Description

      Description of the problem

      When trying to update a label inside a TableViewRow, if the row (or the table itself) have height set to Ti.UI.SIZE, the text of the label cannot be changed.

      Steps to reproduce

      Use the following code; clicking on a window it should update the text of the row itself to 'After...', but this only works once.

      var win = Ti.UI.createWindow({
      	backgroundColor : 'black'
      });
       
      var table = Titanium.UI.createTableView({
      	// COMMENT THE NEXT LINE AND EVERYTHING WORKS
      	height : Ti.UI.SIZE
      });
       
      function addRow(ii) {
      	var row = Titanium.UI.createTableViewRow({
      		width : '100%',
      		height : 100
      	});
       
      	var label = Ti.UI.createLabel({
      		text : 'Before ' + ii
      	});
       
      	row.add(label);
       
      	row.openDetails = function(e) {
      		alert(label.text);
      		label.text = 'After ' + ii;
      	};
       
      	return row;
      }
       
      var rows = [];
      for (var i = 0; i < 10; i++) {
      	rows.push(addRow(i));
      }
       
      table.setData(rows);
       
      table.addEventListener('click', function(e) {
      	e.row.openDetails();
      });
       
      win.add(table);
       
      win.open();
      

      Same code works fine with SDK 3.1.0

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                msamah Ashraf Abu (Inactive)
                Reporter:
                anigam Ashish Nigam
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-17340
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration