bfgutils.bfgAlertUtils Class
Provides methods for showing common alerts. More...
Static Public Member Functions | |
| 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... | |
Detailed Description
Provides methods for showing common alerts.
- Since
- 6.4
Member Function Documentation
◆ fixFontSize() [1/2]
| 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]
| 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]
| 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]
| 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]
| 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.