Builder
Creates a builder for an alert dialog that uses the default alert dialog theme.
The default alert dialog theme is defined by alertDialogTheme within the parent context
's theme.
Parameters
the parent context
Creates a builder for an alert dialog that uses an explicit theme resource.
The specified theme resource (themeResId
) is applied on top of the parent context
's theme. It may be specified as a style resource containing a fully-populated theme, such as Theme_AppCompat_Dialog, to replace all attributes in the parent context
's theme including primary and accent colors.
To preserve attributes such as primary and accent colors, the themeResId
may instead be specified as an overlay theme such as ThemeOverlay_AppCompat_Dialog. This will override only the window attributes necessary to style the alert window as a dialog.
Alternatively, the themeResId
may be specified as 0
to use the parent context
's resolved value for alertDialogTheme.
Parameters
the parent context
the resource ID of the theme against which to inflate this dialog, or 0
to use the parent context
's default alert dialog theme