1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Web View com zoom

Discussion in 'Technology' started by Joel Messias Do, Aug 2, 2020.

  1. Tenho uma web view sendo carregada na tela (montado por um HTML interno) que as vezes abre com zoom e outras sem o zoom. Não quero que ela abra com zoom, preciso que ela abra na tela inteira!

    Aqui o trecho do layout

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:eek:rientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">

    <WebView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/webViewReport"
    android:layout_below="@+id/button_report"
    android:layout_alignParentBottom="true"
    android:layout_alignParentEnd="true"
    android:layout_alignParentStart="true" />

    </LinearLayout>


    Aqui carrego o HTML e jogo pro WV

    montaHTML();

    wv = (WebView) findViewById(R.id.webViewReport);
    ws = wv.getSettings();
    ws.setJavaScriptEnabled(true);
    ws.setSupportZoom(true);
    ws.setDefaultTextEncodingName("utf-8");
    wv.loadData(html, "text/html; charset=utf-8", "UTF-8");

    Login To add answer/comment
     

Share This Page