mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-20 00:55:20 +01:00
Utilize parseAsHtml KTX extension
This commit is contained in:
parent
4d873e59f0
commit
6200a7f291
11 changed files with 36 additions and 80 deletions
|
@ -23,7 +23,7 @@ import android.os.Build
|
|||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.text.HtmlCompat
|
||||
import androidx.core.text.parseAsHtml
|
||||
import androidx.core.view.isVisible
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.VersionUtils
|
||||
|
@ -77,10 +77,8 @@ class PermissionActivity : AbsMusicServiceActivity() {
|
|||
private fun setupTitle() {
|
||||
val color = ThemeStore.accentColor(this)
|
||||
val hexColor = String.format("#%06X", 0xFFFFFF and color)
|
||||
val appName = HtmlCompat.fromHtml(
|
||||
"Hello there! <br>Welcome to <b>Retro <span style='color:$hexColor';>Music</span></b>",
|
||||
HtmlCompat.FROM_HTML_MODE_COMPACT
|
||||
)
|
||||
val appName = "Hello there! <br>Welcome to <b>Retro <span style='color:$hexColor';>Music</span></b>"
|
||||
.parseAsHtml()
|
||||
binding.appNameText.text = appName
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue