mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 22:37:38 +00:00
Added option to include simple view to MagiskDialog
This commit is contained in:
parent
fb2c292f35
commit
35475e1d25
@ -7,6 +7,7 @@ import android.graphics.drawable.ColorDrawable
|
|||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
import androidx.annotation.DrawableRes
|
import androidx.annotation.DrawableRes
|
||||||
import androidx.annotation.StringRes
|
import androidx.annotation.StringRes
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
@ -148,6 +149,11 @@ class MagiskDialog @JvmOverloads constructor(
|
|||||||
binding.apply(body)
|
binding.apply(body)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun applyView(view: View) = apply {
|
||||||
|
resetView()
|
||||||
|
this.binding.dialogBaseContainer.addView(view)
|
||||||
|
}
|
||||||
|
|
||||||
fun onDismiss(callback: OnDialogButtonClickListener) =
|
fun onDismiss(callback: OnDialogButtonClickListener) =
|
||||||
apply { setOnDismissListener(callback) }
|
apply { setOnDismissListener(callback) }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user