Get Cardview Background Color Programmatically

[Solved] Get Cardview Background Color Programmatically | Kotlin - Code Explorer | yomemimo.com
Question : get cardview background color programmatically

Answered by : ali-g

private val cardView: CardView = itemView.findViewById(R.id.card_view)
cardView.setCardBackgroundColor(ContextCompat.getColor(context, R.color.your_color))

Source : | Last Update : Sun, 27 Jun 21

Answers related to get cardview background color programmatically

Code Explorer Popular Question For Kotlin