Reputation: 3876
I have a scroll view which has a content height to auto
and inside of it i have a view which contain all the UI element i'm using
but my problem is when i set the height of the view to Ti.UI.SIZE
the scroll view not scrolled it's just scrolled in case of i add a fixed number e.g. 2000 to the child view height
Here is the code
var scrollView = Ti.UI.createScrollView({
contentWidth : 'auto',
contentHeight : 'auto',
backgroundColor : '#fff',
showVerticalScrollIndicator : false,
showHorizontalScrollIndicator : false,
height : "100%",
width : "100%",
top : 36.6
});
var view = Ti.UI.createView({
backgroundColor : '#fff',
borderRadius : 0,
height :Ti.UI.SIZE,
width : Ti.UI.FILL
});
i don't any extra space at the bottom of the view so how i can accomplish this ,and thanks in advance
Upvotes: 1
Views: 677
Reputation: 3876
i have fixed my problem with this
var padding_view = Ti.UI.createView({
backgroundColor : "transparent",
top : "36.6dp",
left : "11dp",
right : "11dp",
bottom:"0dp",
});
var scrollView = Ti.UI.createScrollView({
contentWidth : '100%',
contentHeight : 'auto',
backgroundColor : '#fff',
showVerticalScrollIndicator : false,
showHorizontalScrollIndicator : false,
top : "36.6dp",
bottom:"22dp",
});
var view = Ti.UI.createView({
backgroundColor : '#fff',
height :Ti.UI.SIZE,
width : Ti.UI.SIZE
});
Upvotes: 1
Reputation: 1021
Try It:
var scrollView = Ti.UI.createScrollView({
contentWidth : 'auto',
contentHeight : 'auto',
backgroundColor : '#fff',
showVerticalScrollIndicator : false,
showHorizontalScrollIndicator : false,
height: Titanium.UI.FILL,
width : "100%",
top : 36.6
});
var view = Ti.UI.createView({
backgroundColor : '#fff',
borderRadius : 0,
height :Ti.UI.SIZE,
width : Ti.UI.FILL
});
Upvotes: 0