-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcessingUI.java
More file actions
38 lines (31 loc) · 883 Bytes
/
ProcessingUI.java
File metadata and controls
38 lines (31 loc) · 883 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
34
35
36
37
38
package common.android.fiot.androidcommon;
import android.app.ProgressDialog;
import android.content.Context;
/**
* Progress dialog shows is processing
*
* Created by caoxuanphong on 12/3/16.
*/
public class ProcessingUI {
ProgressDialog progressDialog;
public void setMessage(String message) {
try {
progressDialog.setMessage(message);
} catch (Exception e) {
e.printStackTrace();
}
}
public void startProcessing(Context context) {
startProcessing(context, "Processing ...");
}
public void startProcessing(Context context, String message) {
progressDialog = ProgressDialog.show(context, "", message, true);
}
public void stopProcessing() {
try {
progressDialog.dismiss();
} catch (Exception e) {
e.printStackTrace();
}
}
}