Skip to content

Commit

Permalink
fix: incorrect filled items' background when fast scroll the clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiredPlanck committed Mar 31, 2024
1 parent e360c23 commit 281d31a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/src/main/java/com/osfans/trime/ime/symbol/FlexibleAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ abstract class FlexibleAdapter(theme: Theme) : RecyclerView.Adapter<FlexibleAdap
private val mKeyTextColor = ColorManager.getColor("key_text_color")
private val mKeyLongTextSize = theme.style.getFloat("key_long_text_size")
private val mLabelTextSize = theme.style.getFloat("label_text_size")
private val mBackground =
ColorManager.getDrawable(
key = "long_text_back_color",
borderKey = "key_border",
borderColorKey = "key_long_text_border",
roundCornerKey = "round_corner",
)

override fun onCreateViewHolder(
parent: ViewGroup,
viewType: Int,
): ViewHolder {
val binding = SimpleKeyItemBinding.inflate(LayoutInflater.from(parent.context))
binding.root.background = mBackground
binding.root.background =
ColorManager.getDrawable(
parent.context,
"long_text_back_color",
"key_border",
"key_long_text_border",
"round_corner",
)
binding.simpleKey.apply {
typeface = mTypeface
(mLongTextColor ?: mKeyTextColor)?.let { setTextColor(it) }
Expand Down

0 comments on commit 281d31a

Please sign in to comment.