I have a issue about Android WebView.
It's OK on Android version gingerbread.
But ICS is not OK.
I just tried change element using $.post.
after that, stop the screen and graphic was broken.
after touching the screen, screen changes OK.
how can I fix this issue?
plz help me.
I Just use simple JQuery code.
$.get("pages/somepage.html", function(data) {
var text = '<div>'+data+'</div>';
$('.content').html(text); });
I think this issue from difference between 2.3.3 and 4.0.3 webview.
I don't know what it is. I guess web engine or webkit something.
Related
WebView successfully renders html page even if the screen is off on android version pre 8.0/8.1 But it doesn't on Android 8.1. I wonder why? Maybe somebody could give me a hint how can I affect on this behaviour.
Any help would be very appreciated!
Probably, WebSettings.setOffscreenPreRaster(true) is what you're looking for.
I'm using Modernizr for fallbacks to CSS Animation but it seems to think that the browser in Android 2.3.5 has support for animations. This means that users get stuck on a page.
I setup a little webpage to test mobile device support. Despite a basic animation not working, the test still passed.
$(document).ready(function(){
if ($('html').hasClass('cssanimations'))
{
alert('I have CSS Animation Support');
}
});
Does anyone know why this is?
According to this post, Android 2.3 supports animating one property at a time. Give that a shot? Here's the test in Modernizr suggesting that Android is crazy.
Maybe there's some magic I don't know about with scrolling on Android?
I've got a website that works fine in IE7, IE8, IE9, FireFox, Chrome, AND Safari on desktop. It also works fine in Safari on iPhone.
However, one of my Android 2.3.7 friends informs me that he has Opera and the default browser on his Android. In both of those browsers, the scrollable view doesn't end at the bottom of the page. When you get to the very end where the dark grey footer ends, you can go right past it and see solid cream-colored background going on for miles of scrolling!!
I have NO IDEA what could cause this!
Can anyone throw me a bone here?
Here's the site for anyone who might have Android 2.3.7 or another version of Android to test. Like I said, happens in both default AND opera browsers.
http://wwwa1nbkclientsitecom.zippysites.com/
UPDATE: I removed the overflow-y property from the HTML style tag in the stylesheet. I had another Android 2.* user test it. Its still broken. And now my next guess is that this might be broken due to the fancy floating menu at the top. Early versions of Android only had partial support for position: fixed
I'll try disabling the position: fixed menu and get it tested again.
UPDATE 2: I got it tested. Its still broken. I'm presently installing Google's Android SDK for the Emulator functionality. It'll let me specify old versions of Android to test. If I narrow down the problem, I'll post the answer here. Until then, if anyone has an idea of what's going on, please post your idea!
It works fine for me in the latest version of Chrome on an Android 4.0.4 tablet.
However, I think the problem may lie with the other browsers' interpretation of overflow-y: scroll; on your <html> tag.
Try removing that property. You shouldn't need it on the <html> tag anyway.
It was the dynamic google map in the footer. It had nothing to do with my page layout or style. Everything I did was fine. Removing the dynamic google map fixed it. SOLUTION: Replace with a STATIC google map. Its kind of bad to be using dynamic map embedded in page for a mobile device anyway.
I've been writing a small app that basically loads its content from locally stored HTML and CSS into a WebView. I initially started this when I had a device running Android 2.3 and had no issues. I recently got a Galaxy Nexus but the CSS doesn't appear to load in ICS.
I read something that suggested enabling hardware acceleration would help but it does nothing. I'm now at a complete loss. Javascript seems to load fine so, combined with it working well on 2.3, suggests it's not the way I'm loading the CSS.
Has anybody seen anything similar? The app is unusable without some touch-friendly CSS.
Thanks in advance.
Edit: Ideally, I need this to work on all versions of android from 2.2+. Not sure if it makes a difference but I thought it might be relevant.
Found the issue! It turns out that there is a rather big bug in the browser for ICS and presumably Honeycomb based on a test. In the logcat I get the following error: Unknown chromium error: -6. Removing the querystring solves the issue (although screws up my functionality). There is a bug report for it here if anyone else is having the same issues.
This is same problem as mentioned at: Links sometimes not working in WebView
Hoever the solution provided in there doesn't work for me.
After playing around little bit, I noticed the link start working after scrolling the screen or if the orientation is changed.
Looks like something is freezing the screen and is getting unlocked after scrolling or if the orientation is changed.
Any idea what could be wrong ?
thx
Found something more:
I am using the WebView inside a tab. I noticed the problem is gone if the tab is not used at all.
I had this issue with specifically android 4.0.4 the only hack I've been able to come up with is to flip to landscape if the android version is 4.0.4, I posted the problem in Xamarin's forums and have had no response in over a year. The C# I use in "OnCreate":
if (Build.VERSION.Release == "4.0.4")
{
RequestedOrientation = Android.Content.PM.ScreenOrientation.Landscape;
}