I can get the ProgressDialog to show, but I cannot get it to stop after the WebView has been loaded. All I need is a simple refresh button for it.
Here is the working code so far:
public class Quotes extends Activity implements OnClickListener{
WebView webview;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webview = (WebView) findViewById(R.id.scroll);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("http://www.dgdevelco.com/quotes/quotesandroid.html");
View refreshClick = findViewById(R.id.refresh);
refreshClick.setOnClickListener(this);
}
public void onClick(View v){
switch(v.getId()){
case R.id.refresh:
ProgressDialog.show(Quotes.this, "", "Loading...", true);
webview.reload();
}
}
}
I just can't figure it out. I've looked everywhere but nothing seems to work.