Skip to content

Commit

Permalink
feat: fixed key bar support image key_back_color
Browse files Browse the repository at this point in the history
  • Loading branch information
shitlime authored and goofyz committed May 19, 2024
1 parent a1e616d commit 560658f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/src/main/java/com/osfans/trime/ime/symbol/LiquidLayout.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package com.osfans.trime.ime.symbol

import android.annotation.SuppressLint
import android.content.Context
import android.graphics.drawable.GradientDrawable
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.setPadding
import com.osfans.trime.data.theme.ColorManager
Expand Down Expand Up @@ -66,12 +65,13 @@ class LiquidLayout(context: Context, service: TrimeInputMethodService, theme: Th
val root =
frameLayout {
background =
GradientDrawable().apply {
cornerRadius = theme.generalStyle.roundCorner.toFloat()
ColorManager.getColor("key_back_color")?.let { bg ->
setColor(bg)
}
}
ColorManager.getDrawable(
context,
key = "key_back_color",
border = theme.generalStyle.keyBorder,
borderColorKey = "key_border_color",
roundCorner = theme.generalStyle.roundCorner,
)
add(
text,
lParams(matchParent, wrapContent) {
Expand Down

0 comments on commit 560658f

Please sign in to comment.