在Java文件中:
Dialog dialog = new Dialog(Dashboard.this, R.style.FullHeightDialog);
dialog.setContentView(R.layout.progress_dialog);
dialog.show();
progress_dialog.xml
<?xml version="1.0" encoding="utf-8"?>
<com.xorin.ress.gprogressbar.SmoothProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pbar"
style="@style/GNowProgressBar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:indeterminate="true" />
输出如下:
我想显示当前没有显示的全宽中心进度条..
答案 0 :(得分:0)
使用ProgressDialog,如
Object localObject = new ProgressDialog(getParent());
((ProgressDialog) localObject).setTitle("");
((ProgressDialog) localObject).setMessage("Please wait...");
((ProgressDialog) localObject).setCancelable(true);
((ProgressDialog) localObject)
.setOnCancelListener(new DialogInterface.OnCancelListener() {
public void onCancel(
DialogInterface paramAnonymousDialogInterface) { }