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

tableview with dynamic row height causes really bad flickering

    Details

      Description

      {html}<div><p>When calling setData on a tableview that has rows with a dynamic
      height the ui flickers. Basically it seems to be drawing everything
      on top of each other and then stretching the rows vertically to
      accommodate the dynamic height. This causes the ui to flicker
      really bad... and on the actual device you see the squished text
      and then the expansion - looks horrible. Below is the code to
      reproduce. Just click the Refresh button.</p>
      <p>Ti Dev 1.2.2 and Ti Mobile 1.6.1 with iOS 4.2</p>
      <pre>
      <code>function applyData(tableView) {
      var data = [];
      for (var i=0;i<20;i++) {
      var rowView = Ti.UI.createTableViewRow({ height:'auto', layout:'vertical' });
      for (var j=0;j<3;j++) {
      var label = Ti.UI.createLabel({ text:"Row i" + i + "j" + j, height:'auto', top:5, left:5 });
      rowView.add(label);
      }
      data.push(rowView);
      }
      tableView.setData(data);
      }

      var window = Ti.UI.createWindow({
      title:"Funky Table Example",
      modal:true
      });

      var funkyTable = Ti.UI.createTableView();
      applyData(funkyTable);
      window.add(funkyTable);

      var refreshButton = Ti.UI.createButton({
      title:"Refresh"
      });

      refreshButton.addEventListener("click", function(e) {
      applyData(funkyTable);
      });

      window.rightNavButton = refreshButton;

      window.open();</code>
      </pre></div>{html}

        Attachments

          Activity

            People

            • Assignee:
              rseagraves Reggie Seagraves
              Reporter:
              brian Brian
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration