0
任何人都知道如何插入ProgressDialog,將顯示每個點擊鏈接;進入這個webview?WebView與ProgressDialog,並關閉
public class ChatreaMainActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
[...]
WebView engine = (WebView) findViewById(R.id.web_engine);
engine.loadUrl("file:///android_asset/www/index.html");
engine.getSettings().setJavaScriptEnabled(true);
[...]
我試了一下,它根本不會解僱。
WebView engine = (WebView) findViewById(R.id.web_engine);
engine.loadUrl("file:///android_asset/www/index.html");
engine.getSettings().setJavaScriptEnabled(true);
progressBar = ProgressDialog.show(ChatreaMainActivity.this, "", "Loading Page...");
}
}
public void onPageFinished(WebView view, String url)
{
if (progressBar.isShowing())
{
progressBar.dismiss();
}
由於它的作品! :) – xDragonZ