RoundedAlertDialog

Fluent builder-style wrapper around AlertDialog to display rounded, fully customizable dialog overlays with optional scrollable container content.

Methods

RoundedAlertDialog addView(View view)

Embeds a custom child view into the dialog's scrollable container area, updating its visibility to VISIBLE.

RoundedAlertDialog setupLeftButton / setupRightButton(String text, [int color])

Displays action buttons at the bottom of the dialog with optional text color parameters.

void show() / void hide()

Generates and displays the dialog, or hides and dismisses the visible overlay window.

Usage Example

Inflated using R.layout.rounded_alert_dialog_layout. Requires a transparent window background (applied automatically in show()) to properly display the rounded card background.

JAVA
RoundedAlertDialog dialog = new RoundedAlertDialog(context)
    .setTitle("Confirm Action")
    .setupLeftButton("Cancel", Color.GRAY)
    .setupRightButton("Apply", Color.BLUE)
    .setupLeftButtonOnClick(v -> dialog.hide())
    .setupRightButtonOnClick(v -> processData());
dialog.show();