소스 검색

+ add logout function

Dola TENG 2 년 전
부모
커밋
daca5cee38

+ 1 - 0
.idea/misc.xml

@@ -8,6 +8,7 @@
         <entry key="..\:/3-Work/Android/SBC_Main_Android/app/src/main/res/layout/activity_main.xml" value="0.36666666666666664" />
         <entry key="..\:/3-Work/Android/SBC_Main_Android/app/src/main/res/layout/activity_splash.xml" value="0.3523550724637681" />
         <entry key="..\:/3-Work/Android/SBC_Main_Android/app/src/main/res/layout/app_bar.xml" value="0.36666666666666664" />
+        <entry key="..\:/3-Work/Android/SBC_Main_Android/app/src/main/res/layout/content_main.xml" value="0.3582427536231884" />
         <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" />

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

@@ -6,19 +6,19 @@ object Config {
 
     const val MAIN_PACKAGE = "com.khmer9.cock8888main"
 
-    const val YUKI_APP_ID = "630478c22983a591133f0492"
+    const val YUKI_APP_ID = "6352d61f2d019b50a96a0db3"
     const val YUKI_DOWNLOAD = ""
     const val YUKI_PACKAGE = "com.khmer9.yuki_kd"
 
-    const val LOTTO_APP_ID = "630780f0f635dd035329f5b7"
+    const val LOTTO_APP_ID = "6352d38fd3d45ebbe6d7402f"
     const val LOTTO_DOWNLOAD = ""
     const val LOTTO_PACKAGE = "com.khmer9.lotto"
 
-    const val LOTTO_PLUS_APP_ID = "62e397edae71cfa8782aa3a0"
+    const val LOTTO_PLUS_APP_ID = "6352d5061142ebb1094ad212"
     const val LOTTO_PLUS_DOWNLOAD = ""
     const val LOTTO_PLUS_PACKAGE = "com.sambath.lottoplus"
 
-    const val COCK_FIGHT_APP_ID = "631c17831da02749e7e23f35"
+    const val COCK_FIGHT_APP_ID = "6352bea201f35a55af67fd18"
     const val COCK_FIGHT_DOWNLOAD = ""
     const val COCK_FIGHT_PACKAGE = "com.sambath.sbc"
 

+ 44 - 19
app/src/main/java/com/khmer9/cflivemain/screen/main/MainModuleViewHolder.kt

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

BIN
app/src/main/res/drawable/bg_card.jpg


BIN
app/src/main/res/drawable/bg_snk.jpg


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


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


BIN
app/src/main/res/drawable/lottobg.jpg


+ 1 - 0
app/src/main/res/layout/activity_login.xml

@@ -4,6 +4,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@color/colorPrimary"
     tools:context=".screen.login.LoginActivity">
 
 

+ 1 - 0
app/src/main/res/layout/activity_splash.xml

@@ -4,6 +4,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@color/colorPrimary"
     tools:context=".screen.splash.SplashScreenActivity">
 
     <ImageView

+ 1 - 1
app/src/main/res/layout/app_bar.xml

@@ -12,7 +12,7 @@
         android:layout_width="match_parent"
         android:layout_height="?attr/actionBarSize"
         android:layout_gravity="center_vertical"
-        android:background="@color/colorToolbar"
+        android:background="@color/colorPrimary"
         app:popupTheme="@style/PopupOverlay">
 
         <androidx.constraintlayout.widget.ConstraintLayout

+ 1 - 0
app/src/main/res/layout/content_main.xml

@@ -3,6 +3,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@color/colorPrimaryDark"
     app:layout_behavior="@string/appbar_scrolling_view_behavior">
 
     <FrameLayout

+ 1 - 1
app/src/main/res/layout/layout_sub_module.xml

@@ -4,7 +4,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:layout_gravity="center_vertical"
-    android:background="@color/new_background"
+    android:background="@color/colorPrimaryDark"
     android:orientation="vertical"
     tools:context=".screen.main.MainFragment">
 

+ 2 - 2
app/src/main/res/values/colors.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <color name="colorPrimary">#334a9f</color>
-    <color name="colorPrimaryDark">#253e99</color>
+    <color name="colorPrimary">#d46200</color>
+    <color name="colorPrimaryDark">#424242</color>
     <color name="colorPrimaryLight">#1776cf</color>
     <color name="colorAccent">#03DAC5</color>
     <color name="black_overlay">#3700B3</color>

+ 12 - 4
app/src/prod/java/com/khmer9/lotto/config/Config.kt

@@ -6,11 +6,11 @@ object Config {
 
     const val MAIN_PACKAGE = "com.khmer9.cflivemain"
 
-    const val LOTTO_PLUS_APP_ID = "62e397edae71cfa8782aa3a0"
+    const val LOTTO_PLUS_APP_ID = "6352d5061142ebb1094ad212"
     const val LOTTO_PLUS_DOWNLOAD = "https://www.dropbox.com/s/k8dm0nmjot4x5dj/Lottery-Mobile_prodDebug_1.0.30.apk?dl=1"
     const val LOTTO_PLUS_PACKAGE = "com.sambath.lottoplus_cflive"
 
-    const val LOTTO_APP_ID = "630780f0f635dd035329f5b7"
+    const val LOTTO_APP_ID = "6352d38fd3d45ebbe6d7402f"
     const val LOTTO_DOWNLOAD = "https://www.dropbox.com/s/upt3rvabia3x8n0/Khmer9_Lotto_prodDebug_1.0.4.apk?dl=1"
     const val LOTTO_PACKAGE = "com.khmer9.lotto_cflive"
 
@@ -18,11 +18,19 @@ object Config {
     const val APONG_DOWNLOAD = "https://www.dropbox.com/s/o1or451rrumodzc/APONG_prodDebug_1.0.12.apk?dl=1"
     const val APONG_PACKAGE = "com.sambath.apong_cflive"
 
-    const val YUKI_APP_ID = "630478c22983a591133f0492"
+    const val YUKI_APP_ID = "6352d61f2d019b50a96a0db3"
     const val YUKI_DOWNLOAD = "https://www.dropbox.com/s/pecro0717clzksz/Khmer9_Yuki_prodDebug_1.0.1.apk?dl=1"
     const val YUKI_PACKAGE = "com.khmer9.yuki_cflive"
 
-    const val COCK_FIGHT_APP_ID = "631486275967907d6780cba6"
+    const val COCK_FIGHT_APP_ID = "6352bea201f35a55af67fd18"
     const val COCK_FIGHT_DOWNLOAD = "https://www.dropbox.com/s/6gfkf8cct5c58rs/SBC-Mobile_prodDebug_1.1.2.apk?dl=1"
     const val COCK_FIGHT_PACKAGE = "com.sambath.sbc_cflive"
+
+    const val CARD_APP_ID = "kd855"
+    const val CARD_DOWNLOAD = ""
+    const val CARD_PACKAGE = ""
+
+    const val SNK_APP_ID = "snk"
+    const val SNK_DOWNLOAD = ""
+    const val SNK_PACKAGE = ""
 }