package com.example.webviewtheme;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.webkit.WebView;
public class MainActivity extends Activity {
WebView webview1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webview1=(WebView)findViewById(R.id.webView1);
String rawHTML = "<HTML>"+
"<body style='color: #000000; background-color: #ffffff'><h1>Hello Android </h1></body>"+
"</HTML>";
webview1.setBackgroundColor(00000000);
webview1.loadData(rawHTML, "text/HTML", "UTF-8");
}
}
This is My code i want to set background color black and text white of webView i have tried to apply In Html But Unable to get Out put please help me how to set Night Mode in Webview text and backGround