Provides methods for showing common alerts.
More... |
static void | fixFontSize (@NonNull final Activity activity, @NonNull final AlertDialog dialog) |
| Sets the font size to a default DP value for the alert's message and buttons. More...
|
|
static void | fixFontSize (@NonNull final Activity activity, @NonNull final androidx.appcompat.app.AlertDialog dialog) |
| Sets the font size to a default DP value for the alert's message and buttons. More...
|
|
static void | showCustomAlert (@Nullable final String title, @NonNull final String message, @Nullable final DialogInterface.OnClickListener listener) |
| Shows a customizable alert dialog with an OK button. More...
|
|
static void | showCustomAlert (@Nullable final String title, @NonNull final String message, @Nullable final DialogInterface.OnClickListener listener, @Nullable final Activity activity) |
| Shows a customizable alert dialog with an OK button. More...
|
|
static void | showGenericErrorAlert (@Nullable final String title, @Nullable final DialogInterface.OnClickListener listener) |
| Shows an alert dialog with a customizable title and OK button that indicates an error has occurred. More...
|
|
static void | showGenericErrorAlert (@Nullable final String title, @Nullable final DialogInterface.OnClickListener listener, @Nullable Activity activity) |
| Shows an alert dialog with a customizable title and OK button that indicates an error has occurred. More...
|
|
static void | showWithFixedSizeText (@NonNull final Activity activity, @NonNull final AlertDialog dialog) |
| Shows the AlertDialog and sets the font size to a default DP value for the alert's message and buttons. More...
|
|
static void | showWithFixedSizeText (@NonNull final Activity activity, @NonNull final androidx.appcompat.app.AlertDialog dialog) |
| Shows the AlertDialog and sets the font size to a default DP value for the alert's message and buttons. More...
|
|
Provides methods for showing common alerts.
- Since
- 6.4
◆ fixFontSize() [1/2]
static void com.bigfishgames.bfglib.bfgutils.bfgAlertUtils.fixFontSize | ( | @NonNull final Activity | activity, | | | @NonNull final AlertDialog | dialog | | ) | | |
| inlinestatic |
Sets the font size to a default DP value for the alert's message and buttons. This prevents them from being scaled by the system font size set by the use in the accessibility settings. This method should be called from the UI thread.
- Parameters
activity | Activity hosting the dialog. |
dialog | AlertDialog to modify. |
- Since
- 6.8
◆ fixFontSize() [2/2]
static void com.bigfishgames.bfglib.bfgutils.bfgAlertUtils.fixFontSize | ( | @NonNull final Activity | activity, | | | @NonNull final androidx.appcompat.app.AlertDialog | dialog | | ) | | |
| inlinestatic |
Sets the font size to a default DP value for the alert's message and buttons. This prevents them from being scaled by the system font size set by the use in the accessibility settings. This method should be called from the UI thread.
- Parameters
activity | Activity hosting the dialog. |
dialog | AlertDialog to modify. |
- Since
- 6.8
◆ showCustomAlert() [1/2]
static void com.bigfishgames.bfglib.bfgutils.bfgAlertUtils.showCustomAlert | ( | @Nullable final String | title, | | | @NonNull final String | message, | | | @Nullable final DialogInterface.OnClickListener | listener | | ) | | |
| inlinestatic |
Shows a customizable alert dialog with an OK button. If this method is called from a non-UI thread, it will queue the alert display on the UI thread and immediately return.
- Parameters
title | Optional title. A null value will remove the title from the dialog. |
message | Text to display in the dialog body. |
listener | Optional listener for the OK buttons onClick event. |
◆ showCustomAlert() [2/2]
static void com.bigfishgames.bfglib.bfgutils.bfgAlertUtils.showCustomAlert | ( | @Nullable final String | title, | | | @NonNull final String | message, | | | @Nullable final DialogInterface.OnClickListener | listener, | | | @Nullable final Activity | activity | | ) | | |
| inlinestatic |
Shows a customizable alert dialog with an OK button. If this method is called from a non-UI thread, it will queue the alert display on the UI thread and immediately return.
- Parameters
title | Optional title. A null value will remove the title from the dialog. |
message | Text to display in the dialog body. |
listener | Optional listener for the OK buttons onClick event. |
activity | Optional non-bfgActivity to display the error dialog over |
◆ showGenericErrorAlert() [1/2]
static void com.bigfishgames.bfglib.bfgutils.bfgAlertUtils.showGenericErrorAlert | ( | @Nullable final String | title, | | | @Nullable final DialogInterface.OnClickListener | listener | | ) | | |
| inlinestatic |
Shows an alert dialog with a customizable title and OK button that indicates an error has occurred.
- Parameters
title | Optional title. A null value will remove the title from the dialog. |
listener | Optional listener for the OK buttons onClick event. |
◆ showGenericErrorAlert() [2/2]
static void com.bigfishgames.bfglib.bfgutils.bfgAlertUtils.showGenericErrorAlert | ( | @Nullable final String | title, | | | @Nullable final DialogInterface.OnClickListener | listener, | | | @Nullable Activity | activity | | ) | | |
| inlinestatic |
Shows an alert dialog with a customizable title and OK button that indicates an error has occurred. This version allows you to specify a non-bfgActivity to show the alert
- Parameters
title | Optional title. A null value will remove the title from the dialog. |
listener | Optional listener for the OK buttons onClick event. |
activity | Optional activity to show the dialog over (will default to the top bfgActivity) |
◆ showWithFixedSizeText() [1/2]
static void com.bigfishgames.bfglib.bfgutils.bfgAlertUtils.showWithFixedSizeText | ( | @NonNull final Activity | activity, | | | @NonNull final AlertDialog | dialog | | ) | | |
| inlinestatic |
Shows the AlertDialog and sets the font size to a default DP value for the alert's message and buttons. This prevents them from being scaled by the system font size set by the use in the accessibility settings. This method should be called from the UI thread.
- Parameters
activity | Activity hosting the dialog. |
dialog | AlertDialog to modify. |
- Since
- 6.8
◆ showWithFixedSizeText() [2/2]
static void com.bigfishgames.bfglib.bfgutils.bfgAlertUtils.showWithFixedSizeText | ( | @NonNull final Activity | activity, | | | @NonNull final androidx.appcompat.app.AlertDialog | dialog | | ) | | |
| inlinestatic |
Shows the AlertDialog and sets the font size to a default DP value for the alert's message and buttons. This prevents them from being scaled by the system font size set by the use in the accessibility settings. This method should be called from the UI thread.
- Parameters
activity | Activity hosting the dialog. |
dialog | AlertDialog to modify. |
- Since
- 6.8