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

Android:contentWidth in scrollview not working properly when setting layout to horizontal for android

    Details

      Description

      Description

      When using a scrollview and setting layout to 'horizontal', I wish to scroll the content in a horizontal fashion, Setting contentWidth to Ti.UI.SIZE or Ti.UI.FILL or auto doesn't work unless I specify the specific contentWidth.

      This used to work properly in previous version sdk 3.1.3.GA

      Test Case

      var win = Ti.UI.createWindow({
        backgroundColor:'white'
      });
       
       
      function createRow(i) {
        var row = Ti.UI.createView({
          backgroundColor: 'white',
          borderColor: '#bbb',
          borderWidth: 1,
          width:40, height: 40,
          top: 0, left: 4
        });
        return row;
      }
       
      var scrollView = Ti.UI.createScrollView({
        bottom:120,
        layout: 'horizontal',
        contentWidth:'auto',
        contentHeight:50,
        height:50
      });
       
      for(var i = 0; i <= 20; i++){
      var row = createRow(i);
        scrollView.add(row);
      }
      win.add(scrollView);
       
      win.open();
      

      Expected Behaviour :
      It should allow to scroll horizontally

      Actual Behaviour :
      Its not allowing to scroll horizontally

      Note : If I set any specific contentWidth (any specific value) then it will allow me to scroll.

        Attachments

          Activity

            People

            • Assignee:
              hpham Hieu Pham
              Reporter:
              rsharma Rupesh Sharma
              Reviewer:
              Vishal Duggal (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration