Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Scrollview not scrolling mobile web

$
0
0

Hi. I am using Titanium Studio 3.2.1.201402041146 on OSX.

No matter what I try to do I can't get this to scroll when testing on mobile web (in a browser). Here is the code:

var win = Titanium.UI.currentWindow;
 
win.open();
 
var titleview = Ti.UI.createView({
    backgroundColor: '#222',
    top: 40,
    height: 50
});
var headingText = Ti.UI.createLabel({
    text: 'Temp Heading',
    top: 20,
    color: '#fff'
});
titleview.add(headingText);
 
var tbl_data = [];
 
for (var i = 0; i < 100; i++) {
 
    var row = Ti.UI.createTableViewRow({
        height: 30, 
        backgroundColor: "#EF597B"
    });
 
    var view = Ti.UI.createView({
        left : 0,
        width : "100%"
    });
    var lblTest = Ti.UI.createLabel({
        font:{fontFamily:'Helvetica Neue',fontSize:14},
        text:"The quick brown fox jumped over the lazy old dog!!!!!!!!", 
        left:10
    });
    view.add(lblTest);
    row.add(view);
    tbl_data.push(row);
}
 
var table = Titanium.UI.createTableView({
    data:tbl_data,
    height:'auto',
    scrollable: true,
    backgroundColor: 'transparent',
    separatorColor:'#fff',
    headerView: titleview
});
 
var scrollView = Titanium.UI.createScrollView({
    contentWidth:'auto',
    contentHeight:'auto',
    top:0,
    showVerticalScrollIndicator:true,
    showHorizontalScrollIndicator:true,
    scrollingEnabled:true,
    scrollType: 'vertical'
});
 
scrollView.add(table);
win.add(scrollView);
If anybody could steer me in the right direction it would be much appreciated.

Cheers.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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