Added further documentation, fixed slight spacing issue on course_card.xml when icon is set to R.drawable.ic_empty

This commit is contained in:
Deniz Düzgören
2019-09-22 19:46:20 +02:00
parent 49eefe8131
commit 088aa90aa4
14 changed files with 163 additions and 54 deletions
@@ -130,6 +130,13 @@ internal class CardAdapter(private var mSubst: List<Subst>, private val prefs: S
else -> R.color.colorText
}
})
holder.iconView.visibility = if (icon == R.drawable.ic_empty) {
View.GONE
} else {
View.VISIBLE
}
holder.card.setCardBackgroundColor(ContextCompat.getColor(holder.iconView.context, cardBackgroundColour))
holder.iconView.setImageResource(icon)
holder.iconView.setColorFilter(textColor)