1

How do I increase the font size for webiew in android? I have given the code below, but it's not working. Can anybody tell me how to do this?

blogWebView.getSettings().setDefaultFontSize(14);
Illidanek
  • 996
  • 1
  • 18
  • 32
mohan
  • 13,035
  • 29
  • 108
  • 178
  • 1
    http://stackoverflow.com/questions/3796176/android-webview-font-size-change try doing this with a WebSettings object. Regards, – Quentin DOMMERC Oct 31 '11 at 07:43

1 Answers1

1

U can use zoom control in webview. see below code

  FrameLayout mContentView = (FrameLayout) getWindow().

    getDecorView().findViewById(android.R.id.content);

    final View zoom = this.mWebView.getZoomControls();

    mContentView.addView(zoom, ZOOM_PARAMS);

    zoom.setVisibility(View.GONE);


  private static final FrameLayout.LayoutParams ZOOM_PARAMS =

    new FrameLayout.LayoutParams(

    ViewGroup.LayoutParams.FILL_PARENT,

    ViewGroup.LayoutParams.WRAP_CONTENT,

    Gravity.BOTTOM);


 webview.getSettings().setDefaultZoom(WebSettings.ZoomDensity.FAR)
Dhaval Khant
  • 2,467
  • 2
  • 16
  • 24