Skip to content

Instantly share code, notes, and snippets.

@AshuTyagi16
Created November 16, 2020 09:31
Show Gist options
  • Save AshuTyagi16/388648936ec4f2511a221d40674b20d6 to your computer and use it in GitHub Desktop.
Save AshuTyagi16/388648936ec4f2511a221d40674b20d6 to your computer and use it in GitHub Desktop.
private fun changeDrawableColor(holder: OutgoingChatViewHolder) {
holder.itemView.post {
ContextCompat.getDrawable(this, R.drawable.bg_round_corner_outgoing)
?.let { incomingBgDrawable ->
val color = animatedColor.with(getFloatRange(holder.itemView))
incomingBgDrawable.updateTint(color)
holder.itemView.tvOutgoingMessage.background = incomingBgDrawable
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment