@newdancer

Как развернуть webview на весь экран?

Как развернуть webview на весь экран?
Есть активити:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<WebView
    android:id="@+id/webview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

<FrameLayout
    android:id="@+id/fullscreen_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:visibility="gone"/>

</FrameLayout>

В webview передаю iframe
String strframe = "<iframe src=\""+iframe_url+"\" width=\""+"100%"+"\" height=\""+"100%"+"\" frameborder=\"0\" allowfullscreen></iframe>";
        webView = (WebView) findViewById(R.id.webview);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.loadData(strframe, "text/html", "utf-8");

Содержимое отображается с отступами по краям. как вывести сразу на весь экран?
  • Вопрос задан
  • 1041 просмотр
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы