Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3062] currentPage in scrollableView

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2012-04-09T14:44:08.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
Reporterprocess
AssigneeDevang Gandhi
Created2012-02-13T03:35:43.000+0000
Updated2016-03-08T07:48:06.000+0000

Description

Hello Here is the problem : - create a scrollableView - add an event listener to 'scroll' event - scroll to first view - delete all views - myScrollableView.currentPage = -1 instead of 0 ... myScrollableView.removeView(myScrollableView.views[0]); myScrollableView.removeView(myScrollableView.views[0]); myScrollableView.removeView(myScrollableView.views[0]); Ti.API.info(player.ui.mainView.currentPage); Thank you

Comments

  1. Devang Gandhi 2012-04-04

    Are you trying to do this, as i have done in the code attached?
    var win = Ti.UI.createWindow();
        
       var view1 = Ti.UI.createView({ backgroundColor:'#123' });
       var view2 = Ti.UI.createView({ backgroundColor:'#246' });
       var view3 = Ti.UI.createView({ backgroundColor:'#48b' });
        
       var scrollableView = Ti.UI.createScrollableView({
         views:[view1,view2,view3],
         showPagingControl:true
       });
       
       
       scrollableView.addEventListener('scroll',function(){
       scrollableView.removeView(scrollableView.views[0]);
       scrollableView.removeView(scrollableView.views[1]);	
       Ti.API.info(scrollableView.currentPage);
       });
        
       
       win.add(scrollableView);
       win.open();
  2. Devang Gandhi 2012-04-09

    posted a feedback to the answer

JSON Source