File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
voice/src/main/kotlin/com/algolia/instantsearch/voice/ui Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 11package com.algolia.instantsearch.voice.ui
22
3- import android.os.Build
43import android.support.constraint.ConstraintLayout
5- import android.text.Html
4+ import android.support.v4. text.HtmlCompat
65import android.view.View
76import android.widget.ImageView
87import android.widget.TextView
@@ -41,11 +40,7 @@ class VoiceAndroidView(
4140 override fun setSuggestions (suggestions : Array <out String >) {
4241 suggestionsView?.let {
4342 val formattedSuggestions = suggestions.joinToString(" " ) { formatterSuggestion(it) }
44- val html = if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .N ) {
45- Html .fromHtml(formattedSuggestions, Html .FROM_HTML_MODE_LEGACY )
46- } else {
47- Html .fromHtml(formattedSuggestions)
48- }
43+ val html = HtmlCompat .fromHtml(formattedSuggestions, HtmlCompat .FROM_HTML_MODE_LEGACY )
4944 it.text = html
5045 }
5146 }
You can’t perform that action at this time.
0 commit comments