|
@@ -49,7 +49,7 @@ class MainModuleViewHolder(itemView: View, private val detailButtonListener: ((S
|
|
|
Config.LOTTO_APP_ID -> {
|
|
|
picasso
|
|
|
.load(R.drawable.ic_lotto_80)
|
|
|
- .placeholder(R.drawable.animal_seven)
|
|
|
+ .placeholder(R.drawable.ic_lotto_80)
|
|
|
.into(imgIcon)
|
|
|
}
|
|
|
Config.LOTTO_PLUS_APP_ID -> {
|
|
@@ -60,7 +60,7 @@ class MainModuleViewHolder(itemView: View, private val detailButtonListener: ((S
|
|
|
}
|
|
|
Config.COCK_FIGHT_APP_ID -> {
|
|
|
picasso
|
|
|
- .load(R.drawable.ic_logo_cock)
|
|
|
+ .load(R.drawable.ic_logo_big)
|
|
|
.placeholder(R.drawable.animal_seven)
|
|
|
.into(imgIcon)
|
|
|
|
|
@@ -82,6 +82,22 @@ class MainModuleViewHolder(itemView: View, private val detailButtonListener: ((S
|
|
|
|
|
|
backgroundModule.setBackgroundResource(R.drawable.apongbg)
|
|
|
}
|
|
|
+ Config.CARD_APP_ID -> {
|
|
|
+ picasso
|
|
|
+ .load(R.drawable.ic_card)
|
|
|
+ .placeholder(R.drawable.ic_card)
|
|
|
+ .into(imgIcon)
|
|
|
+
|
|
|
+ backgroundModule.setBackgroundResource(R.drawable.bg_card)
|
|
|
+ }
|
|
|
+ Config.SNK_APP_ID -> {
|
|
|
+ picasso
|
|
|
+ .load(R.drawable.ic_snk)
|
|
|
+ .placeholder(R.drawable.ic_card)
|
|
|
+ .into(imgIcon)
|
|
|
+
|
|
|
+ backgroundModule.setBackgroundResource(R.drawable.bg_snk)
|
|
|
+ }
|
|
|
else -> {
|
|
|
picasso
|
|
|
.load(R.drawable.ic_lotto_main)
|
|
@@ -102,29 +118,29 @@ class MainModuleViewHolder(itemView: View, private val detailButtonListener: ((S
|
|
|
} else if (item is SubModuleData) {
|
|
|
tvName.text = item.name
|
|
|
|
|
|
- try {
|
|
|
- val displayMetrics = itemView.context.resources.displayMetrics
|
|
|
- val pxWidth = displayMetrics.widthPixels
|
|
|
- val pxHeight = displayMetrics.heightPixels
|
|
|
- val dpWidth = pxWidth / displayMetrics.density
|
|
|
- val dpHeight = pxHeight / displayMetrics.density
|
|
|
+ val displayMetrics = itemView.context.resources.displayMetrics
|
|
|
+ val pxWidth = displayMetrics.widthPixels
|
|
|
+ val pxHeight = displayMetrics.heightPixels
|
|
|
+ val dpWidth = pxWidth / displayMetrics.density
|
|
|
+ val dpHeight = pxHeight / displayMetrics.density
|
|
|
|
|
|
- // high resolution pixel 14400
|
|
|
- var height = dpHeight * 0.5804f
|
|
|
+ // high resolution pixel 14400
|
|
|
+ var height = dpHeight * 0.5804f
|
|
|
|
|
|
- //low resolution
|
|
|
- if (pxWidth < 1000) {
|
|
|
- height = dpHeight * 0.2804f
|
|
|
- }
|
|
|
+ //low resolution
|
|
|
+ if (pxWidth < 1000) {
|
|
|
+ height = dpHeight * 0.2804f
|
|
|
+ }
|
|
|
|
|
|
- imgIcon.layoutParams.height = height.toInt()
|
|
|
- imgIcon.layoutParams.width = height.toInt()
|
|
|
+ imgIcon.layoutParams.height = height.toInt()
|
|
|
+ imgIcon.layoutParams.width = height.toInt()
|
|
|
|
|
|
+ try {
|
|
|
when (item.appId) {
|
|
|
Config.LOTTO_APP_ID -> {
|
|
|
picasso
|
|
|
.load(R.drawable.ic_lotto_80)
|
|
|
- .placeholder(R.drawable.animal_seven)
|
|
|
+ .placeholder(R.drawable.ic_lotto_80)
|
|
|
.into(imgIcon)
|
|
|
|
|
|
backgroundModule.setBackgroundResource(R.drawable.lottobg)
|
|
@@ -132,7 +148,7 @@ class MainModuleViewHolder(itemView: View, private val detailButtonListener: ((S
|
|
|
Config.LOTTO_PLUS_APP_ID -> {
|
|
|
picasso
|
|
|
.load(R.drawable.ic_lotto_plus)
|
|
|
- .placeholder(R.drawable.animal_seven)
|
|
|
+ .placeholder(R.drawable.ic_lotto_plus)
|
|
|
.into(imgIcon)
|
|
|
|
|
|
backgroundModule.setBackgroundResource(R.drawable.lottobg)
|
|
@@ -140,7 +156,7 @@ class MainModuleViewHolder(itemView: View, private val detailButtonListener: ((S
|
|
|
Config.YUKI_APP_ID -> {
|
|
|
picasso
|
|
|
.load(R.drawable.ic_yuki)
|
|
|
- .placeholder(R.drawable.animal_seven)
|
|
|
+ .placeholder(R.drawable.ic_yuki)
|
|
|
.into(imgIcon)
|
|
|
|
|
|
backgroundModule.setBackgroundResource(R.drawable.yukibg)
|
|
@@ -148,11 +164,20 @@ class MainModuleViewHolder(itemView: View, private val detailButtonListener: ((S
|
|
|
Config.APONG_APP_ID -> {
|
|
|
picasso
|
|
|
.load(R.drawable.ic_apong)
|
|
|
- .placeholder(R.drawable.animal_seven)
|
|
|
+ .placeholder(R.drawable.ic_apong)
|
|
|
.into(imgIcon)
|
|
|
|
|
|
backgroundModule.setBackgroundResource(R.drawable.apongbg)
|
|
|
}
|
|
|
+
|
|
|
+ Config.CARD_APP_ID -> {
|
|
|
+ picasso
|
|
|
+ .load(R.drawable.ic_card)
|
|
|
+ .placeholder(R.drawable.ic_card)
|
|
|
+ .into(imgIcon)
|
|
|
+
|
|
|
+ backgroundModule.setBackgroundResource(R.drawable.bg_card)
|
|
|
+ }
|
|
|
else -> {
|
|
|
picasso
|
|
|
.load(item.smallIcon)
|