1 Replies - 6129 Views - Last Post: 04 August 2011 - 09:34 PM

#1 cavo  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 12
  • Joined: 29-September 09

Android Development - Page scroll not working

Posted 03 August 2011 - 03:16 AM

I am developing a project using android 2.2 and I am using XUI to swipe between pages. However on certain pages where there is a lot of text I need the page to scroll down but this wont work. There seems to be some clash with XUI. When I remove XUI the page scrolls fine. Any suggestions? I am using the overflow: auto; tag but it still wont work
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>


<script src="xui.js" type="application/javascript" charset="utf-8"></script>
<script src="xui.swipe.js" type="application/javascript" charset="utf-8"></script>



<style type="text/css">
body {
	background-image: url('image');
	background-size: 100% auto;
	background-repeat: no-repeat;
	overflow: auto;
}

#zone-test {
	position: auto;
	overflow: auto;
	height: auto;
	width: auto;
}

#icon1 {
	position: fixed;
	top: 10px;
	left: 10px;
}

#icon2 {
	position: fixed;
	top: 10px;
	left: 70px;
}

#text {
	font-style: oblique;
	margin-top: 90px;
	margin-left: 30px;
	margin-right: 30px;
}

#text2 {
	margin-left: 30px;
	margin-right: 30px;
}
</style>

<script type="text/javascript">
        
        function openUrl(url)
        {
            window.location = url;
        }

            function init ()
            {
                
 
            x$("#zone-test").swipe(
            function(e, data){
            	 
                console.log('type:'+data.type+' deltaX:'+data.deltaX+' deltaY:'+data.deltaY+' distance:'+
                    data.distance+' delay:'+data.delay+' direction:'+data.direction  );
                    
                    switch (data.type){
                    
                    case ('direction'):
                        
                      
                    	  if(data.direction == "right"){
                    		  openUrl("file:///android_asset/www/meetingpeople.html", 0);
                    	  }
                    	 
                    	 
                   
                    	
                    }	
                    
                    
            }, {
            	
                swipeCapture: true,
                longTapCapture: false,
                doubleTapCapture: false,
                simpleTapCapture: false
                 
            }
            );


  

            }
            
            

            var _timer=setInterval(function(){
                if(/loaded|complete/.test(document.readyState)){
                    clearInterval(_timer)
                    init() // call target function
                }}, 10)

             
              
       
       
        
       </script>


</head>

<body>



	<div id="zone-test">

		<div id="icon1">
			<a href="file:///android_asset/www/Toc/contents/contents.html"><img
				src="image" width="55px" height="55px">
			</a> <br>
		</div>

		<div id="icon2">
			<a href="file:///android_asset/www/Toc/contents/english.html"><img
				src="image" width="55px" height="55px">
			</a> <br>
		</div>

		<div id="text">TEXT GOES HERE</div>
		<br>
		<div id="text2">TEXT GOES HERE.</div>
		<br>
	</div>
























</body>
</html>

Is This A Good Question/Topic? 0
  • +

Replies To: Android Development - Page scroll not working

#2 arvindthakur  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 133
  • Joined: 07-June 11

Re: Android Development - Page scroll not working

Posted 04 August 2011 - 09:34 PM

Well I have also the same problem from last two weeks.I googled this and I found this

My link


Thanks

Arvind
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1