Fill the missing lines, so that the code will produce the same output as in the picture.
Spans
Background color
Report a typo
Fill in the gaps with the relevant elements
val text = "Background will be in yellow color"
val spanText = SpannableString(text)
val startOfSpan =
val endOfSpan =
val color = Color.YELLOW
val span = (color)
spanText.setSpan(span, , , Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
binding.spanTextView.text = spanTextCreate a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.