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

webview can't scroll to bottom

$
0
0

I have a webview loading local html, I can't sroll to the bottom of the html.On ipad I can see the bottom but as soon as I release the scroll It goes up and hide the bottom of content. here is my code :

myapp.win.openDetail = function(lien) {
    lien = lien || "http://www.google.fr";
    var detail = Titanium.UI.createView({
        width : '100%',
        height : myapp.globals.hauteurDevice,
        top:0,
        left : '-100%'
    });
 
    var animation = Titanium.UI.createAnimation();
    animation.left = 0;
    animation.duration = 1000;
    var animationFermeture = Titanium.UI.createAnimation();
    animationFermeture.left = '-100%';
    animationFermeture.duration = 1000;
 
    var webview = Titanium.UI.createWebView({
        url : lien,
        width : myapp.globals.largeurDevice-10,
        height: Ti.UI.SIZE,
        top:50,
        botom:0,
        left : 5,
        backgroundColor : '#262626'
    });
    var ligneBoutons = Titanium.UI.createView({
        layout : 'horizontal',
        height : 50,
        width: myapp.globals.largeurDevice,
        top:0,
        right : 0,
        backgroundColor : '#121212'
    });
 
 
    // bouton prev
    var boutonPrev = Titanium.UI.createImageView({
        image: '/images/btnPrev.png',
        top : 5,
        right : 2,
        height : 40,
        width : 40
    });
    ligneBoutons.add(boutonPrev);
    // bouton next
    var boutonNext = Titanium.UI.createImageView({
        image: '/images/btnNext.png',
        top : 5,
        right : 2,
        height : 40,
        width : 40
    });
    ligneBoutons.add(boutonNext);
    // bouton fermer
    var boutonFermer = Titanium.UI.createImageView({
        image: '/images/btnFermer.png',
        top : 5,
        right : 2,
        height : 40,
        width : 40
    });
    boutonFermer.addEventListener('click', function(e) {
        detail.animate(animationFermeture,function(){ myapp.win.remove(detail);});
    });
    ligneBoutons.add(boutonFermer);
    detail.add(ligneBoutons);
    detail.add(webview);
    detail.animate(animation);
 
 
    myapp.win.add(detail);
 
};
I tried everything I can think of. Thx

Sylvain


Viewing all articles
Browse latest Browse all 7655

Trending Articles



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