Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (fail)
Viewing all articles
Browse latest Browse all 21

Android Scrollable View Problem with 3 views

$
0
0

Hello. I'm very nervous because I have to send a project tomorrow and, in Android, if I add more than two views to a ScrollableView, it fails!!!

This is an example.

var win = Titanium.UI.currentWindow;
win.backgroundColor = 'black';
 
var vA = Ti.UI.createView({
    backgroundColor: 'transparent',
    top:0,
    width:'100%',
    height: '100%',
    borderRadius:5,
});
 
var vB = Ti.UI.createView({
    backgroundColor: 'transparent',
    top:0,
    width:'100%',
    height: '100%',
    borderRadius:5,
});
 
var vC = Ti.UI.createView({
    backgroundColor: 'transparent',
    top:0,
    width:'100%',
    height: '100%',
    borderRadius:5,
});
 
 
var scrollView = Titanium.UI.createScrollableView({
    top:0,
    showPagingControl : true,
    views: [vA,vB,vC]
});
 
win.add(scrollView);
The window opens, but when I slide to the second page, the Apps fails and the execution stops. :(

But if I change the code like this:

var scrollView = Titanium.UI.createScrollableView({
    top:0,
    showPagingControl : true,
    views: [vA,vB]
});
It works!!! It's very weird. I need 3 views.

Somebody help me, please?

Thanks.


Viewing all articles
Browse latest Browse all 21

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>