<@U3SPZ0L69> did you find a solution? passing the ...
# anko
j
@tania did you find a solution? passing the style in the constructor should do it, something like:
Copy code
button(R.style.BlueButtonStyle) {
    textSize = sp(14)
    textResource = R.string.save_search
}
additionally, you can take advantage of using
applyRecursively{}
to apply styles, because officially the function
style()
is deprecated, and internally it also uses
applyRecursively
Copy code
@Deprecated("Use applyRecursively(block) instead.", ReplaceWith("applyRecursively(style)"))
fun <T : View> T.style(style: (View) -> Unit): T = applyRecursively(style)