css - Android webview: difference between Samsung Note 2 and Nexus 5 ? -


i loading html file webview with:

webview.loadurl("file:///android_asset/webviewcontent/extrahelp/help.html"); 

this works fine on samsung note 2, not work on nexus 5. on nexus 5 error message related fonts.

unable open asset url: file:///android_asset/webviewcontent/extrahelp/opensans-regular-webfont.woff unable open asset url: file:///android_asset/webviewcontent/extrahelp/opensans-regular-webfont.ttf 

i expect 2 devices able find these fonts in browser. relevant css code is:

@font-face {     font-family: 'opensansregular';     src: url(opensans-regular-webfont.eot);     src: url(opensans-regular-webfont.eot?#iefix) format('embedded-opentype'),          url(opensans-regular-webfont.woff) format('woff'),          url(opensans-regular-webfont.ttf) format('truetype'),          url(opensans-regular-webfont.svg#opensansregular) format('svg');     font-weight: normal;     font-style: normal; } 

from http://developer.android.com

migrating webview in android 4.4

android 4.4 (api level 19) introduces new version of webview based on chromium. change upgrades webview performance , standards support html5, css3, , javascript match latest web browsers. apps using webview inherit these upgrades when running on android 4.4 , higher.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -