-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
51 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
app/src/main/java/com/fogplix/anime/dialogs/MyProgressDialog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,35 @@ | ||
package com.fogplix.anime.dialogs; | ||
|
||
import android.app.Activity; | ||
import android.app.Dialog; | ||
import android.widget.TextView; | ||
|
||
import com.fogplix.anime.R; | ||
|
||
public class MyProgressDialog { | ||
|
||
private final Dialog dialog; | ||
private final TextView progressTV; | ||
|
||
public MyProgressDialog(Activity activity) { | ||
dialog = new Dialog(activity); | ||
dialog.setContentView(R.layout.dialog_my_progress); | ||
progressTV = dialog.findViewById(R.id.progressTV); | ||
} | ||
|
||
public void setMessage(String text) { | ||
progressTV.setText(text); | ||
} | ||
|
||
public void setCancelable(boolean cancelable) { | ||
dialog.setCancelable(cancelable); | ||
} | ||
|
||
public void show() { | ||
dialog.show(); | ||
} | ||
|
||
public void dismiss() { | ||
dialog.dismiss(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters