Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15901] iOS: Views not appearing on scrollableView

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-12-05T19:23:34.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 25, 2013 Sprint 25 API, Release 3.2.0, Release 3.3.0
ComponentsiOS
Labelsmodule_scrollableview, qe-3.2.0, qe-testadded, regression
ReporterPragya Rastogi
AssigneeVishal Duggal
Created2013-12-05T10:30:48.000+0000
Updated2014-02-11T08:56:53.000+0000

Description

Green, red, Blue view does not appear in 3.2 SDk. Hence it is a regression Steps To Reproduce: 1. Run the app using code below. 2. Scroll left and right in the colored area. 4. Press 'OFF', and scroll left and right in the colored area (Paging control appears) Actual: Green, red, Blue view are not visible in 3.2 SDK while in SDK:3.1.3.GA Views appear properly Expected: Colored area does not appear

var _window = Titanium.UI.createWindow({  
  backgroundColor:'#fff'
});
var views = [];
		
		function makeView(color) {
			return Ti.UI.createView({
				right: 0, left: 0, top: 0, bottom: 0,
				backgroundColor: color
			});
		};
		
		views.push(makeView("red"));
		views.push(makeView("green"));
		views.push(makeView("blue"));
		var scrollableView = Ti.UI.createScrollableView({
			bottom: "50dp", left: "10dp", right: "10dp", top: "50dp",
			views: views
		});
		_window.add(scrollableView);
		
		// Switch to toggle the showPagingControl property on the scrollable view.
		var showControlSwitch = Ti.UI.createSwitch({
			value: scrollableView.showPagingControl,
			enabled:true,
			title: "showPagingControl?",
			bottom: "5dp", height: "40dp", left: "10dp", width: "150dp"
		});
		_window.add(showControlSwitch);
		
		// Displays current value of showPagingControl property.
		// This should default to false.
		var showControlProperty = Ti.UI.createLabel({
			left: "160dp", text: "value: " + scrollableView.showPagingControl,
			bottom: "5dp", height: "40dp", right: "5dp"
		});
		_window.add(showControlProperty);
		
		showControlSwitch.addEventListener('change', function (e) {
		  scrollableView.showPagingControl = e.value;
		  showControlProperty.text = 'value: ' + scrollableView.showPagingControl;
		});
		
		 _window.open();

Comments

  1. Vishal Duggal 2013-12-05

    Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/5065 Additional pull against master https://github.com/appcelerator/titanium_mobile/pull/5067
  2. Vishal Duggal 2013-12-05

    Backport to 3_2_X https://github.com/appcelerator/titanium_mobile/pull/5066
  3. Vishal Duggal 2013-12-05

    Additional Test Case Testing instructions: 1. Run the code below 2. Turn the paging control on and off and verify the views resize correctly 3. Rotate the device/simulator and verify the views resize correctly (with paging control on and off) 4. Verify the behavior on each page of the scrollable view (not just the first page)
       var _window = Titanium.UI.createWindow({  
         backgroundColor:'#fff',
         orientationModes:[1,2,3,4]
       });
       var views = [];
                
       function makeView(color) {
           return Ti.UI.createView({
               right: 20, left: 20, top: 20, bottom: 20,
               backgroundColor: color
           });
       };
        
       views.push(makeView("red"));
       views.push(makeView("green"));
       views.push(makeView("blue"));
       var scrollableView = Ti.UI.createScrollableView({
           bottom: "50dp", left: "10dp", right: "10dp", top: "50dp",
           views: views,
           backgroundColor:'pink'
       });
       _window.add(scrollableView);
        
       // Switch to toggle the showPagingControl property on the scrollable view.
       var showControlSwitch = Ti.UI.createSwitch({
           value: scrollableView.showPagingControl,
           enabled:true,
           title: "showPagingControl?",
           bottom: "5dp", height: "40dp", left: "10dp", width: "150dp"
       });
       _window.add(showControlSwitch);
        
       // Displays current value of showPagingControl property.
       // This should default to false.
       var showControlProperty = Ti.UI.createLabel({
           left: "160dp", text: "value: " + scrollableView.showPagingControl,
           bottom: "5dp", height: "40dp", right: "5dp"
       });
       _window.add(showControlProperty);
        
       showControlSwitch.addEventListener('change', function (e) {
         scrollableView.showPagingControl = e.value;
         showControlProperty.text = 'value: ' + scrollableView.showPagingControl;
       });
        
        _window.open();
       
  4. Eric Merriman 2013-12-06

    Changed the component from Android to iOS
  5. Neha Mittal 2013-12-09

    Appcelerator Studio: 3.2.0.201312081316 SDK:3.2.0.v20131208204843 alloy: 1.3.0-beta acs: 1.0.10 npm: 1.3.2 titanium: 3.2.0-beta titanium-code-processor: 1.1.0-beta Xcode:5.0.2 OS: Mac OSX 10.9 Device: iphone5(V7.0.4) Closing as fixed and verified. Observed that Colored area(Green,red,Blue) are now visible in the latest SDK build.

JSON Source