title: How to set text size in WebView in android
body: <p>I am using <code>WebView</code> to justify text. I want to know- </p>
  
  <ol>
  <li><p>Is it possible to set the text size in <code>layout</code> file? As I want different text size for different screen sizes. </p></li>
  <li><p>And also one problem is first background appears then after 2 second text display. Is it possible to display text immediately?</p></li>
  </ol>
  
  <p><strong>Size of text is 7-8 lines</strong>.</p>
  
  <p>Code-</p>
  
  <pre><code>public class Main extends Activity {
  
         WebView mWebView;
  
         @Override
         public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);        
            mWebView = (WebView) findViewById(R.id.webview);
            String text = "&lt;html&gt;&lt;body&gt;"+"&lt;p align=\"justify\"&gt;"+getString(R.string.itext)+"&lt;/p&gt;"+"&lt;/body&gt;&lt;/html&gt;"; 
        mWebView .loadData(text, "text/html", "utf-8");
        mWebView .setBackgroundColor(Color.TRANSPARENT);
         }
  }
  </code></pre>
  
  <p>Xml-</p>
  
  <pre><code>  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:orientation="vertical" 
         android:layout_width="fill_parent"
         android:layout_height="fill_parent" 
         android:background="@drawable/light"&gt;
  
  &lt;WebView
      android:id="@+id/webview"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@android:color/transparent"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>