Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4863] 'currentPage' setting does not work if scrollableView is added to a view

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-11-22T11:32:08.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sSprint 2011-39, Release 1.8.0
ComponentsiOS
Labelsmodule_scrollableview, qe-testadded
ReporterAnirudh Nagesh
AssigneeSabil Rahim
Created2011-08-01T15:53:12.000+0000
Updated2014-06-19T12:46:23.000+0000

Description

The 'currentPage' setting does not work if scrollableview is added to a view. It works if it is added to a window( as done in Kitchensink) Run the code snippet below to reproduce the issue.
Titanium.UI.setBackgroundColor('#000');
var win = Ti.UI.createWindow(
{
});

var view1 = Ti.UI.createView(
{
	backgroundColor:'red'
});

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

var scrollView = Titanium.UI.createScrollableView(
{
	views:[view1,view2],
	showPagingControl:true,
	pagingControlHeight:30,
	maxZoomScale:2.0,
	currentPage:1,
	height:340
});

var view = Ti.UI.createView(
{
});

view.add(scrollView);

win.add(view);
//win.add(scrollView); // this works!
win.open();
The view1 is set as active inspite of the setting currentPage = 1

Comments

  1. Anirudh Nagesh 2011-08-09

    Associated Helpdesk:

    http://appc.me/c/APP-994949
  2. Sabil Rahim 2011-09-28

    Pull pending #506
  3. Michael Pettiford 2011-11-21

    Tested with Ti Studio 1.0.7.201111182325 Ti Mob SDK 1.8.0.1.v20111121090256 iPhone 4S OS 5.0, iPad 2 OS 4.3.5 Expected behavior of the current page being 1 is shown

JSON Source