|
@@ -15,6 +15,8 @@ import com.squareup.picasso.Picasso
|
|
|
|
|
|
class MainModuleViewHolder(itemView: View, private val detailButtonListener: ((String, String, Int) -> Unit)? = null) : BaseListViewHolder(itemView) {
|
|
|
private val picasso = Picasso.get()
|
|
|
+ private val LOTTO_APP_ID = "630780f0f635dd035329f5b7"
|
|
|
+ private val LOTTO_PLUS_APP_ID = "62e397edae71cfa8782aa3a0"
|
|
|
|
|
|
override fun bindView(item: BaseListItem) {
|
|
|
val imgIcon = itemView.findViewById<ImageView>(R.id.img_icon)
|
|
@@ -42,10 +44,26 @@ class MainModuleViewHolder(itemView: View, private val detailButtonListener: ((S
|
|
|
imgIcon.layoutParams.height = height.toInt()
|
|
|
imgIcon.layoutParams.width = height.toInt()
|
|
|
|
|
|
- picasso
|
|
|
- .load(item.smallIcon)
|
|
|
- .placeholder(R.drawable.animal_seven)
|
|
|
- .into(imgIcon)
|
|
|
+ when (item.appId) {
|
|
|
+ LOTTO_APP_ID -> {
|
|
|
+ picasso
|
|
|
+ .load(R.drawable.ic_lotto_80)
|
|
|
+ .placeholder(R.drawable.animal_seven)
|
|
|
+ .into(imgIcon)
|
|
|
+ }
|
|
|
+ LOTTO_PLUS_APP_ID -> {
|
|
|
+ picasso
|
|
|
+ .load(R.drawable.ic_lotto_plus)
|
|
|
+ .placeholder(R.drawable.animal_seven)
|
|
|
+ .into(imgIcon)
|
|
|
+ }
|
|
|
+ else -> {
|
|
|
+ picasso
|
|
|
+ .load(item.smallIcon)
|
|
|
+ .placeholder(R.drawable.animal_seven)
|
|
|
+ .into(imgIcon)
|
|
|
+ }
|
|
|
+ }
|
|
|
} catch (e: Exception) {
|
|
|
}
|
|
|
|
|
@@ -75,10 +93,26 @@ class MainModuleViewHolder(itemView: View, private val detailButtonListener: ((S
|
|
|
imgIcon.layoutParams.height = height.toInt()
|
|
|
imgIcon.layoutParams.width = height.toInt()
|
|
|
|
|
|
- picasso
|
|
|
- .load(item.smallIcon)
|
|
|
- .placeholder(R.drawable.animal_seven)
|
|
|
- .into(imgIcon)
|
|
|
+ when (item.appId) {
|
|
|
+ LOTTO_APP_ID -> {
|
|
|
+ picasso
|
|
|
+ .load(R.drawable.ic_lotto_80)
|
|
|
+ .placeholder(R.drawable.animal_seven)
|
|
|
+ .into(imgIcon)
|
|
|
+ }
|
|
|
+ LOTTO_PLUS_APP_ID -> {
|
|
|
+ picasso
|
|
|
+ .load(R.drawable.ic_lotto_plus)
|
|
|
+ .placeholder(R.drawable.animal_seven)
|
|
|
+ .into(imgIcon)
|
|
|
+ }
|
|
|
+ else -> {
|
|
|
+ picasso
|
|
|
+ .load(item.smallIcon)
|
|
|
+ .placeholder(R.drawable.animal_seven)
|
|
|
+ .into(imgIcon)
|
|
|
+ }
|
|
|
+ }
|
|
|
} catch (e: Exception) {
|
|
|
}
|
|
|
|