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

Android: scrollableView addView() causes exception

    Details

      Description

      {html}<div><p>Environment: ubuntu 9.10, Titanium 1.5.X of 27th Nov, Google
      2.2.</p>
      <p>The following code demonstrates that <code>addView()</code> of
      scrollableView causes an exception. I have attached a clean project
      that includes the following code and the assets required. <a href=
      "https://gist.github.com/718285">This</a> is the exception
      output.</p>
      <p><strong>app.js:</strong></p>
      <pre>
      <code>var window = Ti.UI.createWindow({});

      var parentView = Ti.UI.createView({
      backgroundColor:'blue'
      });

      window.add(parentView);

      var cardSlider = Ti.UI.createScrollableView({
      backgroundColor: '#aaa'
      });

      for(var i=0, ilen=5; i<ilen; i++){
      Ti.API.info('Adding: /card/'i'.png');
      var screenView = Ti.UI.createView({});

      var image = Ti.UI.createImageView({ // backgroudImage used to allow image to be scaled on android backgroundImage: '/card/'+i+'.png', width: 222, height: 168 });
      screenView.add(image);
      cardSlider.addView(screenView);
      }

      parentView.add(cardSlider);

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

        Attachments

          Activity

            People

            • Assignee:
              dthorp Don Thorp
              Reporter:
              pdowsett Paul Dowsett
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration