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

iOS: ScrollView: 'layout' to 'Horizontal' content is being cut-off

    Details

    • Sprint:
      Release 3.0.0

      Description

      Problem

      In ScrollView when we set 'layout' to 'Horizontal' content is being cut-off (iOS_iPad_MIDDLE.jpg) when it goes beyond the bottom of the device screen.

      The customer relies on a such layout content that should use 'layout' to 'Horizontal' in ScrollView UI element, growing up according the height contents dynamically.

      Stripped down simple sample

      function createBlock(color) {
       
      	var view = Ti.UI.createView({
      		backgroundColor : color,
      		width : 400,
      		height : 400,
      		borderColor : "white"
      	});
      	return view;
      }
       
      var currentWindow = Ti.UI.createWindow();
       
      var scrollView = Titanium.UI.createScrollView({
      	backgroundColor : 'red',
      	contentWidth : 'auto',
      	contentHeight : 'auto',
      	top : 0,
      	showVerticalScrollIndicator : true,
      	showHorizontalScrollIndicator : true,
      	layout:'horizontal'
      });
       
      var view = Ti.UI.createView({
      	width : 'auto',
      	height : 'auto',
      	layout : 'vertical'
      });
       
      view.add(createBlock("blue"));
      view.add(createBlock("orange"));
      view.add(createBlock("green"));
      view.add(createBlock("purple"));
      view.add(createBlock("gray"));
       
      scrollView.add(view);
       
      currentWindow.add(scrollView);
      currentWindow.open(); 
      

        Attachments

        1. iOS_iPad_MIDDLE.jpg
          55 kB
          Eduardo Gomez
        2. iOS_iPad_TOP.jpg
          56 kB
          Eduardo Gomez

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                egomez Eduardo Gomez (Inactive)
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration