add color highlighter to command templates screens

pull/1366/head
deniscerri 4 days ago
parent 14d71343de
commit 00512a2878
No known key found for this signature in database
GPG Key ID: 95C43D517D830350

@ -15,6 +15,7 @@ import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
import com.deniscerri.ytdl.R
import com.deniscerri.ytdl.database.models.CommandTemplate
import com.deniscerri.ytdl.util.Extensions.enableTextHighlight
import com.deniscerri.ytdl.util.Extensions.popup
import com.google.android.material.card.MaterialCardView
@ -56,6 +57,7 @@ class TemplatesAdapter(onItemClickListener: OnItemClickListener, activity: Activ
val content = card.findViewById<TextView>(R.id.content)
content.text = item.content
content.enableTextHighlight()
card.findViewById<TextView>(R.id.useInExtraCommands).apply {
isVisible = item.useAsExtraCommand

@ -230,6 +230,7 @@ object UiUtil {
val ok : Button = bottomSheet.findViewById(R.id.template_create)!!
val title : TextInputLayout = bottomSheet.findViewById(R.id.title)!!
val content : TextInputLayout = bottomSheet.findViewById(R.id.content)!!
content.editText!!.enableTextHighlight()
val preferredCommandSwitch : MaterialSwitch = bottomSheet.findViewById(R.id.preferredCommandTemplateSwitch)!!
val extraCommandsSwitch : MaterialSwitch = bottomSheet.findViewById(R.id.extraCommandsSwitch)!!
val extraCommandsAudio : CheckBox = bottomSheet.findViewById(R.id.checkbox_audio)!!

Loading…
Cancel
Save