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

MobileWeb: TableView rowHeight does not get automatically calculated

    Details

      Description

      Problem description

      Steps to reproduce

      • Use the following code:

      var win1 = Titanium.UI.createWindow({
          navBarHidden : false,
          title : 'Test Window',
          backgroundColor : 'white',
          left : 0,
          top : 0
      });
       
      var tableView = Titanium.UI.createTableView({
          className : "session.row.class"
      });
       
      var rows = [];
       
      for (var d = 0; d < 20; d++) {
          var row = Ti.UI.createTableViewRow({
              hasChild : true
          });
       
          var name_label = Ti.UI.createLabel({
              text : "<b>Test title</b><br/>Testing<br/><i>This is just a label with some text</i>",
              top : 5,
              left : 5,
              width : 300,
              color : "black"
          });
       
          row.add(name_label);
       
          rows.push(row);
      }
       
      tableView.setData(rows);
      win1.add(tableView);
       
      win1.open();
      

      • run the code: the label is clipped;
      • setting the height to 'auto' or Ti.UI.SIZE, both for the label or the row, doesn't fix the problem (label becomes invisible if row.height is Ti.UI.SIZE);
      • changing rowHeight does not help as well;
      • label.size.height or row.size.height seem wrong even if they are called after the table is displayed on the screen.

        Attachments

          Activity

            People

            • Assignee:
              bhughes Bryan Hughes
              Reporter:
              dcassenti Davide Cassenti
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code