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
{{ message }}
This repository has been archived by the owner on Jul 13, 2020. It is now read-only.
All the alert extension functions receive either String or a @StringResource messageResource: Int. The String version should be CharSequence so that we can pass SpannableString as a parameter.
So, just change this:
fun <D:DialogInterface> Context.alert(
factory:AlertBuilderFactory<D>,
message:String,
title:String? = null,
init: (AlertBuilder<D>.() ->Unit)? = null
): AlertBuilder<D> {
return factory(this).apply {
if (title !=null) {
this.title = title
}
this.message = message
if (init!=null) init()
}
}
To:
fun <D:DialogInterface> Context.alert(
factory:AlertBuilderFactory<D>,
message:CharSequence, // this line !!!!!!title:String? = null,
init: (AlertBuilder<D>.() ->Unit)? = null
): AlertBuilder<D> {
return factory(this).apply {
if (title !=null) {
this.title = title
}
this.message = message
if (init!=null) init()
}
}
The text was updated successfully, but these errors were encountered:
All the
alert
extension functions receive eitherString
or a@StringResource messageResource: Int
. The String version should be CharSequence so that we can passSpannableString
as a parameter.So, just change this:
To:
The text was updated successfully, but these errors were encountered: