android-browser

test for overflow-y:auto returning true on android < 3 even though it doesnt work

佐手、 提交于 2019-12-08 01:08:52
问题 im developing a webapp for android. At a place i need to find whether overflow-y:auto is supported or not in the browser because i need to scroll a div. But tests for this return true in android < 3 , telling that its supported, but when used it doesnt work the way its expected, i.e., the div with overflow-y:auto doesnt scroll. Is there any credible way to see if this property is supported in a browser. i wrote this test using modernizr, but it always returns true, meaning that its supported.

How to disable highlighting of a canvas on tap for Nexus Galaxy?

眉间皱痕 提交于 2019-12-07 13:40:08
问题 I'm writing a web app that uses an HTML5 canvas and testing on a Nexus Galaxy. When the user taps on the canvas, it highlights teal for a second, even though I am calling preventDefault() on the touchstart event. I have also tried some CSS rules. How do I disable this brief highlighting? 回答1: Setting the CSS rule -webkit-tap-highlight-color to transparent on the canvas seemed to do the trick for me. Note that I also did preventDefault and stopPropagation, so one of those might have had an

Log <GATE-M>DEV_ACTION_COMPLETED</GATE-M> seems to delay execution on Android

半腔热情 提交于 2019-12-07 03:29:14
问题 I've recently noticed that my app has the occasional LAG. and by LAG I mean it can take up to 40 seconds, depends if I use Wifi or mobile data... I load a page url, and then load js for execution: webView = (WebView) view.findViewById(R.id.WebView); webView.setWebViewClient(new WebViewClient() { @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { logDebug("Loading URL: " + url); super.onPageStarted(view, url, favicon); } @Override public boolean

How to make :checked work on Android Browser?

元气小坏坏 提交于 2019-12-06 18:28:09
问题 I'm trying to make a form that has a list of default options, and which can also expand to show a couple of exta options. I do this with the following CSS code: .myForm .moreOpts {display:none;} .myForm #more:checked +*+ .moreOpts {display:block;} with the following HTML: <form action="#" class="myForm"> <ul> <li> <input type="checkbox" id="pref-1" name="pref-1" value="1"> <label for="pref-1">Foo</label> </li> <li> <input type="checkbox" id="pref-2" name="pref-2" value="2"> <label for="pref-2

How to open external URL in default browser and all internal links in WebView Android?

ぃ、小莉子 提交于 2019-12-06 15:33:00
问题 I am using WebView in my page and using local file assets to displaying in WebView but in main HTML page external website (not local) and I want to open just that link in default Browser on the users device This is my code in 'onCreate' method WebView v; v=(WebView) rootView.findViewById(R.id.webView1); v.getSettings().setJavaScriptEnabled(true); WebViewClient vc= new WebViewClient(); v.setWebViewClient(vc); v.loadUrl("file:///android_asset/home.html"); When I run the application the internal

How to Avoid Loading Local Page in New Tab on Default Android Browser

独自空忆成欢 提交于 2019-12-06 15:31:47
I want to do the opposite of this: Android Browser: open several URLs, each on new window/tab (programmatically) In there, the answer was to use b.putBoolean("new_window", true); but what is the equivalent for same tab or same window? For some reason I'm only having this issue on tablets (tested on 3.1 and 4.0.3). We open URLs correctly on the same window or same tab on phones. Please don't tell me to use a webview, what I'm trying to do is do things in the background while a user is browsing on the default Android browser. Thanks. Okay I found the fix. Basically, phones running 2.3 and lower

Add bookmark to chrome browser on Android

给你一囗甜甜゛ 提交于 2019-12-06 10:53:07
问题 Is it possible to add a bookmark (by code) to Google chrome browser Android? Does anyone knows how? 回答1: Yes it is possible, I can do it. If you're familiar with content providers both default and chrome provide bookmarks content providers so we can use these to change/insert bookmarks easily. ContentValues values = new ContentValues(); values.put(Browser.BookmarkColumns.TITLE, "Yahoo Inc."); values.put(Browser.BookmarkColumns.URL, "http://www.yahoo.com"); values.put(Browser.BookmarkColumns

test for overflow-y:auto returning true on android < 3 even though it doesnt work

守給你的承諾、 提交于 2019-12-06 10:35:16
im developing a webapp for android. At a place i need to find whether overflow-y:auto is supported or not in the browser because i need to scroll a div. But tests for this return true in android < 3 , telling that its supported, but when used it doesnt work the way its expected, i.e., the div with overflow-y:auto doesnt scroll. Is there any credible way to see if this property is supported in a browser. i wrote this test using modernizr, but it always returns true, meaning that its supported. Modernizr.addTest('overflowauto', function(){ var bool = false; var testProp = "overflow-y"; var

Not able to get SAMSUNG S4 native browser history

自作多情 提交于 2019-12-06 05:13:56
问题 I am accessing the browser history from device native browser. I use following code - Cursor cur = getContentResolver().query(Browser.BOOKMARKS_URI, new String[] { Browser.BookmarkColumns.URL }, null, null, BookmarkColumns.DATE + " DESC"); It works fine in all devices, but in SAMSUNG S4 Cursor returns null. I find that in devices where i get proper response, Browser package is 'com.android.browser' but in S4 device it is 'com.sec.android.app.sbrowser'. Is that the issue? But this is native

Values for document.readyState in Android 2.3 browser?

大城市里の小女人 提交于 2019-12-06 02:09:44
I found out that once the document has loaded, then in the Android 2.3.5 browser, the value of document.readyState is "loaded" instead of the standard "interactive" . Where are the possible values of document.readyState documented for the Android 2.3 browser? 来源: https://stackoverflow.com/questions/13348029/values-for-document-readystate-in-android-2-3-browser