[TIMOB-4863] 'currentPage' setting does not work if scrollableView is added to a view
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2011-11-22T11:32:08.000+0000 |
| Affected Version/s | Release 1.7.2 |
| Fix Version/s | Sprint 2011-39, Release 1.8.0 |
| Components | iOS |
| Labels | module_scrollableview, qe-testadded |
| Reporter | Anirudh Nagesh |
| Assignee | Sabil Rahim |
| Created | 2011-08-01T15:53:12.000+0000 |
| Updated | 2014-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
Associated Helpdesk:
http://appc.me/c/APP-994949Pull pending #506
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