-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCircularProgressBar.java
More file actions
33 lines (25 loc) · 976 Bytes
/
Copy pathCircularProgressBar.java
File metadata and controls
33 lines (25 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.hossain.zakaria.firebasephotoapp.utils;
import android.content.Context;
import androidx.appcompat.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import com.hossain.zakaria.firebasephotoapp.R;
public class CircularProgressBar {
private Context context;
private AlertDialog alertDialog;
public CircularProgressBar(Context context) {
this.context = context;
}
public AlertDialog setCircularProgressBar() {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
if (inflater != null) {
View view = inflater.inflate(R.layout.progress_bar_circular, null);
builder.setView(view);
builder.setCancelable(false);
alertDialog = builder.create();
alertDialog.show();
}
return alertDialog;
}
}