2
我正在使用Phonegap與我的Android項目,我無法看到進度條這裏是我的代碼。進度條未顯示Phonegap/Android
我的主類inherites的DroidGap類
this.getWindow().requestFeature(Window.FEATURE_PROGRESS);
getWindow().setFeatureInt(Window.FEATURE_PROGRESS,
Window.PROGRESS_VISIBILITY_ON);
final Activity MyActivity = this;
this.appView.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress) {
// Make the bar disappear after URL is loaded, and changes
// string to Loading...
MyActivity.setTitle(" Please wait");
MyActivity.setProgress(progress * 100); // Make the bar
// disappear after URL
// is loaded
// Return the app name after finish loading
if (progress == 100)
MyActivity.setTitle(R.string.app_name);
}
});
this.appView.setWebViewClient(new WebViewClient() {
@Override
public void onReceivedError(WebView view, int errorCode,
String description, String failingUrl) {
// Handle the error
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
什麼也沒有發生任何的想法,如果我嘗試了一個簡單的WebView它正常工作一樣...
從哪裏可以得到整個dropdgap.java? – jonney 2013-06-19 15:22:07