jovmit
01/26/2017, 8:01 AMbutton(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
@Deprecated("Use applyRecursively(block) instead.", ReplaceWith("applyRecursively(style)"))
fun <T : View> T.style(style: (View) -> Unit): T = applyRecursively(style)