Adjust the real webview resolution for Android TV

818 views
Skip to first unread message

marcop...@gmail.com

unread,
Feb 9, 2016, 4:11:25 AM2/9/16
to android-webview-dev
Hi to all,
I'm developing an hybrid app in Android TV (in particular for Sony Bravia device) with a WebView that has a resolution 1280x720. 

If I choose this resolution with viewport in the header of webview (https://developer.chrome.com/multidevice/webview/pixelperfect) for example:
<meta name="viewport" content="width=1920, initial-scale=1">

or setting the layout inside a relative layout in this way:
<tv.customviews.AdvancedWebView
    android:id="@+id/advancedWebView"
android:layout_width="1280px"
android:layout_height="720px"
android:visibility="invisible"/>

In both cases I get a small webview in the upper left side with the right resolution, and the jquery effects seem smooth.

If I choose this layout:
<tv.customviews.AdvancedWebView
android:id="@+id/advancedWebView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible"/>

The WebView is perfectly fullscreen but the images images (I think it's not the real resolution) and jquery effects are too slowing.

I use also this settings:
// wide modality
webSettings.setUseWideViewPort(true);
webSettings.setLoadWithOverviewMode(true);

I don't know what else I can do. I hope you can give some helps.

Thank you,
Marco
Reply all
Reply to author
Forward
0 new messages