Verwendung folgendem Link Remove progress bar background in android progress bar wenn es voll plese nicht Progressbar machen sie die benutzerdefinierte verwenden, wie die benutzerdefinierte folgenden machen Alertdialog
public static AlertDialog getAlertProgress(Activity mActivity)
{
final AlertDialog alertDialog;
final AlertDialog.Builder builder;
LayoutInflater inflater = (LayoutInflater)mActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.process_layout,null,false);
AVLoadingIndicatorView avLoadingIndicatorView = (AVLoadingIndicatorView)layout.findViewById(R.id.progress_avi);
avLoadingIndicatorView.show();
builder = new AlertDialog.Builder(mActivity);
builder.setView(layout);
alertDialog = builder.create();
alertDialog.setCancelable(false);
alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
return alertDialog;
}
oder XML-Datei ist
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:background="@android:color/transparent"
>
//here i use the libery progress accordint to my project you can use progress bar here
<com.wang.avi.AVLoadingIndicatorView
android:background="@android:color/transparent"
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/progress_avi"
android:visibility="visible"
app:indicatorName="LineScaleIndicator"
app:indicatorColor="@color/bagintero2"/>
</LinearLayout>
</RelativeLayout>
oder Sie können es verwenden, wo Sie oder wollen, wenn Sie .. wollen für die Verwendung, wenn tun
Alertdialog alertdialog = Clasneme.getAlertprogress(activityName.this);
alertdialog.show;
oder wenn Sie wollen entlassen
alertdialog.dismiss;
wenn dies für Sie funktioniert ase up Abstimmung zu meinem answare .. – laxmikant
Sie können eine progressBar mit einem Text auf der rechten Seite verwenden, die besser sein sollte, als zu versuchen, einen Hintergrund hinter einem ProgressDialog zu entfernen –