Java tutorial
package com.doge.dyjw; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView; import com.doge.dyjw.util.Log; public class AboutFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_about, container, false); return rootView; } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); WebView webView = (WebView) getActivity().findViewById(R.id.webView); String html = "<html><head><title></title></head><body style='margin:16px; background:#efefef;'>\n" + "<h1> Android App</h1>\n" + "<hr />\n" + "<p>\n" + "An Android application for students of NEPU to use the JiaoWuGuanLi system on Android.<br />\n" + "??\n" + "</p>\n" + "<p>\n" + "?" + getString(R.string.versionName) + "??<a href='http://weibo.com/hiy0u'>?</a>" + "APP<a href='http://dyjw.fly-kite.com/'>http://dyjw.fly-kite.com/</a><br />\n" + "APK<a href='http://dyjw.fly-kite.com/download/'>http://dyjw.fly-kite.com/download/</a><br />\n" + "??GPLv3???\n" + "</p>\n" + "<h1>?</h1>\n" + "<hr />\n" + "<p>\n" + "APPJsoup?????????\n" + "</p>\n" + "<h1></h1>\n" + "<hr />\n" + "<p>\n" + "??????<br />\n" + "??????????\n" + "</p>\n" + "<h1>??</h1>\n" + "<hr />\n" + "<p>\n" + "?<br />\n" + "APP????DogeFlyKite@gmail.com\n" + "</p>\n" + "<h1>??</h1>\n" + "<hr />\n" + "<p style='background:#dfdfdf;'>\n" + "GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007<br />\n" + "<br />\n" + "Copyright (C) 2015 Doge Studio<br />\n" + "<br />\n" + "This program comes with ABSOLUTELY NO WARRANTY.<br />\n" + "This is free software, and you are welcome to redistribute it under certain conditions.\n" + "</p>\n" + "<br />\n" + "</body>\n" + "</html>"; Log.d("", html); webView.getSettings().setDefaultTextEncodingName("utf-8"); webView.loadData(html, "text/html; charset=utf-8;", null); } }