diff --git a/app/src/main/java/com/topjohnwu/magisk/view/MagiskDialog.kt b/app/src/main/java/com/topjohnwu/magisk/view/MagiskDialog.kt index 105ec7c23..f4b698340 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/MagiskDialog.kt +++ b/app/src/main/java/com/topjohnwu/magisk/view/MagiskDialog.kt @@ -7,6 +7,7 @@ import android.graphics.drawable.ColorDrawable import android.graphics.drawable.Drawable import android.os.Bundle import android.view.LayoutInflater +import android.view.View import androidx.annotation.DrawableRes import androidx.annotation.StringRes import androidx.appcompat.app.AlertDialog @@ -148,6 +149,11 @@ class MagiskDialog @JvmOverloads constructor( binding.apply(body) } + fun applyView(view: View) = apply { + resetView() + this.binding.dialogBaseContainer.addView(view) + } + fun onDismiss(callback: OnDialogButtonClickListener) = apply { setOnDismissListener(callback) }