Dola TENG 2 роки тому
батько
коміт
970b6ef4de

+ 1 - 0
.idea/misc.xml

@@ -9,6 +9,7 @@
         <entry key="..\:/3-Work/Android/SBC_Main_Android/app/src/main/res/layout/fragment_report.xml" value="0.18802083333333333" />
         <entry key="..\:/3-Work/Android/SBC_Main_Android/app/src/main/res/layout/layout_fragment_main_yuki.xml" value="0.36666666666666664" />
         <entry key="..\:/3-Work/Android/SBC_Main_Android/app/src/main/res/layout/layout_main_module.xml" value="0.36666666666666664" />
+        <entry key="..\:/3-Work/Android/SBC_Main_Android/app/src/main/res/layout/layout_sub_module.xml" value="0.36666666666666664" />
         <entry key="..\:/3-Work/Android/Yuki-Mobile/app/src/main/res/layout/bet_detail_item.xml" value="0.33" />
         <entry key="..\:/3-Work/Android/Yuki-Mobile/app/src/main/res/layout/betting_detail.xml" value="0.36666666666666664" />
         <entry key="..\:/3-Work/Android/Yuki-Mobile/app/src/main/res/layout/fragment_play.xml" value="0.2807971014492754" />

+ 1 - 1
app/src/dev/java/com/khmer9/yuki/config/Config.kt

@@ -1,4 +1,4 @@
-package com.khmer9.yuki.config
+package com.khmer9.sbcmain.config
 
 object Config {
     const val BASE_URL = "http://playerapi.cf2888.net"

+ 3 - 3
app/src/main/java/com/khmer9/sbcmain/screen/main/MainFragment.kt

@@ -41,11 +41,11 @@ class MainFragment : BaseFragment(R.layout.layout_fragment_main_yuki) {
 
     private val LOTTO_PLUS_APP_ID = "62e397edae71cfa8782aa3a0"
     private val LOTTO_PLUS_DOWNLOAD = "https://www.dropbox.com/s/3rz6v50tjn6f2jg/Lottery-Mobile_devDebug_1.0.30-dev.apk?dl=1"
-    private val LOTTO_PLUS_PACKAGE = "com.sambath.sbc"
+    private val LOTTO_PLUS_PACKAGE = "com.sambath.lottoplus"
 
     private val COCK_FIGHT_APP_ID = "631c17831da02749e7e23f35"
-    private val COCK_FIGHT_DOWNLOAD = ""
-    private val COCK_FIGHT_PACKAGE = ""
+    private val COCK_FIGHT_DOWNLOAD = "https://www.dropbox.com/s/5hvduce4mgzi6bs/SBC-Mobile_devDebug_1.1.2-dev.apk?dl=1"
+    private val COCK_FIGHT_PACKAGE = "com.sambath.sbc"
 
     private val APONG_APP_ID = "631c1d1a0d213229fc5fd11a"
     private val APONG_DOWNLOAD = "https://www.dropbox.com/s/1dnq57w73egso9z/APONG_devDebug_1.0.1-dev.apk?dl=1"

+ 42 - 8
app/src/main/java/com/khmer9/sbcmain/screen/main/MainModuleViewHolder.kt

@@ -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) {
             }
 

BIN
app/src/main/res/drawable/ic_lotto_80.png


BIN
app/src/main/res/drawable/ic_lotto_plus.png