Android : Scrolling is disabled? - javascript

In my android application i used some html pages with various details, it can be viewed perfectly in browser(i.e- we can scroll up & down). But the same page can't have scrolling option in android and it can't move (i.e- it became static)

Is it on android version 2.2 or lower...well then scroll bar don't work in that version. For that you'll have to use a plugin like iscroll. check here http://cubiq.org/iscroll
I know its pathetic that a basic feature like scroll is not working but its a bug in adroid.

Related

Android Smartbanner positioning

I am using this Script for adding the Android Smartbanner for linking my App:
https://github.com/ain/smartbanner.js
My Site is ismoker.eu
How can I put the Android Banner in the same way to the top of the Page like the IOS Banner? Here are the two banners which shows what I mean:
iOS Banner Mobile: http://prntscr.com/pdti5k
Android Banner (not outside the Page Div and not visible because Menu is fixed): http://prntscr.com/pdtipm
From smartbanner.js point of view there's no difference between how the banner is rendered on iOS and Android.
To fix the issue, try checking if:
meta tags for both Android and iOS are defined in the same fashion
there's no specifically added smartbanner--android CSS class in your application that prevents it from working similarly to iOS
If the above brings no resolution, define the smartbanner--android class in your CSS to push the smartbanner down as you need it. The behaviour is likely to be bound to your application's internal styling.

How can I keep an element on the bottom of the page when keyboard is opened on iOS and android?

I have a button in a webpage that I want at the bottom of the page. I want this button at the bottom of page no matter where scroll is. The problem is the standard css of bottom: 0px;position:fixed; does not work when the keyboard is up.
Right now we are using ion-footer-bar but that only keeps the button on top of the keyboard on android. When the keyboard gets pulled up for ios it does not get moved up. Anyone have any workarounds for this?
For applications using Cordova you can do the following:
This is due to the fact that on Android the WebView shrinks when the keyboard and on iOS it does not (by default). So iOS is you can put the following code somewhere in the initialization of your app and it should behave the same on iOS as it does on Android.
cordova.plugins.Keyboard.shrinkView(false);
This function does not work on Android, so you don't have to worry about it there.

JS Pan Gestures on Android Webview doesn't work

pan gesture / scrolling on a web view is not working on a WebView hosting jquery datatables table until a click on a table header is done.
Meaning, the user cannot scroll the table up and down and sideways, until he presses a table header (which sorts the table). This also happens on non-jquery-tables JS code – the WebView is not scrollable. Interesting thing to note, that when I attach a chrome debugger to the WebView, scrolling starts to work.
I’ve tested the same code on Android chrome browser with local and remote JS code – and scrolling works. So this leads me to think that there’s some kind of issue with the WebView itself.
I thought it might be a swipe gesture collision - but there is no swipe gesture defined (meaning the web view is standalone in the activity and there are no windows to swipe to).
Any ideas?
You should post your code, Android WebView has many options, I'll start testing:
webView.getSettings().setBuiltInZoomControls(true);
Also check that javascript is enable.
Hope this helps
Found out the issue.
Probably there's a bug on WebViews on KitKat (and smaller) versions on Android. On Lollipop things work fine.
My workaround for KitKat was to redraw the DOM:
setTimeout(function() {
var htmlString = $( '#content' ).html();
$('#content').html(htmlString);
}, 1000);
That somehow returned "focus" to the DOM and panning gesture works.

Is JqueryMobile layout run on both web and mobile

I make a website in php at backend and HTML,CSS at frontend.Now the requirement is to make it compatible for also mobile.I am thinking to use JqueryMobile but I am confuse that same layout work for both or make different for both.
Is layout make by JqueryMobile cover both ends?Is I make separately JqueryMobile layout?
According to the jQuery Mobile description:
jQuery Mobile is a HTML5-based user interface system designed to make responsive web sites and apps that are accessible on all smartphone, tablet and desktop devices.
Then, the same layout will work in both mobile and desktop browsers. Despite that, you should consider how your website looks in desktop browsers if you want to provide different functionalities in each platform.
See here.
jQuery mobile works for both mobile and desktop, but whether or not it looks good on mobile will also depend on your layout in CSS.

Javascript - Mobile Swipe Scrolling

I am trying to implement some type of touch based scrolling with Javascript. I have found a few options, this and this, but neither work on Windows Phone 7 devices. My website is primarily for my Windows Phone apps, so they will not work. Is there any way to do this?
Check out jQuery's Mobile UI. It has been built specifically for mobile devices. Plus you can also use it as a wrapper to present you content in a mobile friendly way.
http://jquerymobile.com/

Categories