Android Studio ProgressDialog Hk
Merhaba
public class MainActivity extends Activity {
private WebView webView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webView = (WebView) findViewById(R.id.webView1);
webView.setWebViewClient(new WebViewClient() {
webView.loadUrl("http://www.siteadresi.com");
}
}
android ile webview uygulaması yapiyorum sayfa yüklendikten sonra
ProgressDialog bilgilendirme mesajı nasıl verebiliriz
public class MainActivity extends Activity {
private WebView webView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setJavaScriptEnabled(true);
final ProgressDialog progressDialog = ProgressDialog.show(this, "prototurk",
"Sayfa Yükleniyor...", true);
webView.setWebViewClient(new WebViewClient() {
public void onReceivedError(WebView view, int errorCode,
String description, String failingUrl) {
Toast.makeText(getApplicationContext(), "Sayfa Yüklenemedi!",
Toast.LENGTH_SHORT).show();
}
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
if (progressDialog.isShowing())
progressDialog.dismiss();
}
});
webView.loadUrl("https://www.prototurk.com");
} }
fazlasıyla işini görür