title: Webview had to refresh a Website automaticly
body: <p>I am a beginner in Android Studio but I tried very hard to refresh the website but nothing worked. Is there maybe a simple code to solve my problem? please help !</p>
  
  <p>public class Motordrehzahl_App extends Activity {</p>
  
  <pre><code>private WebView myWebView;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_motordrehzahl__app);
  
      myWebView=(WebView) findViewById(R.id.activity_main_webview);
      WebSettings webSettings = myWebView.getSettings();
      webSettings.setJavaScriptEnabled(true);
      myWebView.loadUrl("http://www.google.com");
      refresh();
  </code></pre>
  
  <p><code>public void refresh()
      {
          while(true) {
              myWebView.clearView();
              myWebView.loadUrl("http://www.google.com");
          }
      }</code></p>