load Content for Adaptive Screen - Android android.app

Android examples for android.app:Screen

Description

load Content for Adaptive Screen

Demo Code

import android.content.Context;
import android.webkit.WebSettings.LayoutAlgorithm;
import android.webkit.WebView;

public class Main {

  public static void loadContentAdaptiveScreen(Context mContext, WebView webview, String content) {
    final String mimeType = "text/html";
    final String encoding = "UTF-8";
    webview.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);

    webview.loadDataWithBaseURL("", content, mimeType, encoding, "");
  }/*from ww w  . j a va 2 s.co m*/

}

Related Tutorials