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

iOS: ScrollView - last view not positioned correctly when set of views placed on scrollview with horizontal layout

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Invalid
    • Affects Version/s: Release 3.0.0, Release 3.1.0
    • Component/s: iOS
    • Labels:
    • Environment:

      Tested with Titanium Studio:2.1.2.201208301612
      Tested with Titanium SDK: 2.2.0.v20120831200114
      iOS Device: iPad 2 (5.1),iOS Simulator
      OS: Mac OSX 10.8

      Description

      Last view not positioned correctly when set of views placed on scrollview with horizontal layout.

      This is not a regression.It even occurs on 2.1.1.GA

      Steps to Reproduce:

      1. Run and install the app on to device.
      2. Rotate the device in other orientation.(On iOS simulator the issue is seen even without rotation)

      Expected Result:
      There will be a grid in which a View of 5 colours (red,blue,pink,white and black) will appear.

      Actual Result:
      Last view not positioned correctly.

      aap.js

      var win = Ti.UI.createWindow();
      win.open();
       
          
      var scrollView = Ti.UI.createScrollView({
          contentHeight:'auto',
          contentWidth:0,
          layout:'horizontal',
          backgroundColor: 'green'
      });
      win.add(scrollView);
         
      var colors = ['red', 'blue', 'pink', 'white', 'black'];
          
      var max = 120;
      for(var i = 0; i < max; i++){
          var view = Ti.UI.createView({
              backgroundColor: colors[i%colors.length],
              borderColor:'gray',
              borderWidth:4,
              height: 100,
              left: 10,
              width: 100,
              top: 10
          });
           
          view.addEventListener('click', function(_event){
              scrollView.remove(_event.source);
          });
          scrollView.add(view);
      }
      win.add(view);
      

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              nchhabra Neha Chhabra
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code