You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to control if it's cancelable. For my needs, I quickly changed show() to return the DialogFragment so I could set isCancelable like so...
val alert = AlertView("Title", "Message", AlertStyle.DIALOG)
var dialog = alert.show(this)
dialog.isCancelable = false
fun show(activity: AppCompatActivity) : android.support.v4.app.DialogFragment {
var result : android.support.v4.app.DialogFragment
when (style) {
AlertStyle.BOTTOM_SHEET -> {
val bottomSheet = BottomSheetFragment(title, message, actions, style, theme)
bottomSheet.show(activity.supportFragmentManager, bottomSheet.tag)
result = bottomSheet
}
AlertStyle.IOS -> {
val bottomSheet = BottomSheetFragment(title, message, actions, style, theme)
bottomSheet.show(activity.supportFragmentManager, bottomSheet.tag)
result = bottomSheet
}
AlertStyle.DIALOG -> {
val bottomSheet = DialogFragment(title, message, actions, theme)
bottomSheet.show(activity.supportFragmentManager, bottomSheet.tag)
result = bottomSheet
}
}
return result
}
Thank you for the project.
The text was updated successfully, but these errors were encountered:
It would be nice to control if it's cancelable. For my needs, I quickly changed show() to return the DialogFragment so I could set isCancelable like so...
Thank you for the project.
The text was updated successfully, but these errors were encountered: