Dola TENG %!s(int64=2) %!d(string=hai) anos
pai
achega
d12e922411

+ 4 - 0
.idea/misc.xml

@@ -82,6 +82,10 @@
         <entry key="..\:/android/klaklouk-android/app/src/main/res/layout/app_bar.xml" value="0.25416666666666665" />
         <entry key="..\:/android/klaklouk-android/app/src/main/res/layout/fragment_cf_betting.xml" value="0.25416666666666665" />
         <entry key="..\:/android/klaklouk-android/app/src/main/res/layout/fragment_main.xml" value="0.25416666666666665" />
+        <entry key="..\:/android/klaklouk-android/app/src/main/res/layout/fragment_statement.xml" value="0.25416666666666665" />
+        <entry key="..\:/android/klaklouk-android/app/src/main/res/layout/item_report.xml" value="0.25416666666666665" />
+        <entry key="..\:/android/klaklouk-android/app/src/main/res/layout/item_table_report.xml" value="0.25416666666666665" />
+        <entry key="..\:/android/klaklouk-android/app/src/main/res/layout/item_table_statement.xml" value="0.25416666666666665" />
         <entry key="..\:/android/sbc-mobile-master/app/src/main/res/layout/invoice_print.xml" value="0.22826086956521738" />
         <entry key="app/src/main/res/layout/activity_main.xml" value="0.20516304347826086" />
         <entry key="app/src/main/res/layout/app_bar.xml" value="0.20516304347826086" />

+ 21 - 59
app/src/main/java/com/sambath/klaklouk_main/screen/main/cflive/statement/report/ReportListViewHolder.kt

@@ -3,7 +3,6 @@ package com.cocking.fight.screen.report
 import android.annotation.SuppressLint
 import android.graphics.Color
 import android.view.View
-import android.widget.ImageView
 import android.widget.TextView
 import androidx.core.content.ContextCompat
 import com.gdtlib.lib.adapter.BaseListItem
@@ -80,53 +79,41 @@ class ReportListViewHolder(
                 }
 
                 when (betType) {
-                    /*K.Meron -> {
-                        tvWinResult.setTextColor(Color.RED)
-                    }
-                    K.Wala -> {
-                        tvWinResult.setTextColor(Color.BLUE)
-                    }*/
-                    K.Tie -> {
+                    /*K.Cancel -> {
                         tvWinResult.setTextColor(
                             ContextCompat.getColor(
                                 itemView.context,
-                                R.color.draw
+                                R.color.cancel
                             )
                         )
                     }
-                    K.Cancel -> {
+                    else -> {
                         tvWinResult.setTextColor(
                             ContextCompat.getColor(
                                 itemView.context,
-                                R.color.cancel
+                                R.color.color_blue_800
                             )
                         )
-                    }
+                    }*/
                 }
                 tvResultName.text = item.resultName
                 when (item.resultName) {
-                    /*K.Meron -> {
-                        tvResultName.setTextColor(Color.RED)
-                    }
-                    K.Wala -> {
-                        tvResultName.setTextColor(Color.BLUE)
-                    }*/
-                    K.Tie -> {
+                    /*K.Cancel -> {
                         tvResultName.setTextColor(
                             ContextCompat.getColor(
                                 itemView.context,
-                                R.color.draw
+                                R.color.cancel
                             )
                         )
                     }
-                    K.Cancel -> {
-                        tvResultName.setTextColor(
+                    else -> {
+                        tvWinResult.setTextColor(
                             ContextCompat.getColor(
                                 itemView.context,
-                                R.color.cancel
+                                R.color.color_blue_800
                             )
                         )
-                    }
+                    }*/
                 }
                 val winLose = if (item.amountWin.isNullOrEmpty()) {
                     "0"
@@ -135,7 +122,12 @@ class ReportListViewHolder(
                 }
                 tvResultAmount.text = "$betCast=$winLose"
                 if (item.is_win == true) {
-                    tvResultAmount.setTextColor(Color.BLACK)
+                    tvResultAmount.setTextColor(
+                        ContextCompat.getColor(
+                            itemView.context,
+                            R.color.color_blue_800
+                        )
+                    )
                 } else {
                     tvResultAmount.setTextColor(Color.RED)
                 }
@@ -163,55 +155,25 @@ class ReportListViewHolder(
                 }
 
                 when (betType) {
-                    /*K.Meron -> {
-                        tvResultName.setTextColor(Color.RED)
-                    }
-                    K.Wala -> {
-                        tvResultName.setTextColor(Color.BLUE)
-                    }*/
-                    K.Tie -> {
+                    K.Cancel -> {
                         tvResultName.setTextColor(
                             ContextCompat.getColor(
                                 itemView.context,
-                                R.color.draw
+                                R.color.cancel
                             )
                         )
                     }
-                    K.Cancel -> {
+                    else -> {
                         tvResultName.setTextColor(
                             ContextCompat.getColor(
                                 itemView.context,
-                                R.color.cancel
+                                R.color.color_blue_800
                             )
                         )
                     }
                 }
             }
             is ReportThree -> {//Statement
-                val imgC1 = itemView.findViewById<ImageView>(R.id.img_c1)
-                val tvC2 = itemView.findViewById<TextView>(R.id.tv_c2)
-                val tvC3 = itemView.findViewById<TextView>(R.id.tv_c3)
-                val tvC4 = itemView.findViewById<TextView>(R.id.tv_c4)
-                tvC2.text = item.type
-                tvC3.text = item.date
-                when (item.type) {
-                    "BETTED" -> {
-                        imgC1.setImageResource(R.drawable.bet)
-                        if (item.amount < 0) {//lost
-                            tvC4.text = currencyFormat(item.amount.toInt())
-                            tvC4.setTextColor(Color.RED)
-                        } else {//win
-                            tvC4.text = currencyFormat(item.amount.toInt())
-                            tvC4.setTextColor(Color.BLUE)
-                        }
-                    }
-                    "WITHDREW" -> {
-                        imgC1.setImageResource(R.drawable.withdraw)
-                    }
-                    "DEPOSITED" -> {
-                        imgC1.setImageResource(R.drawable.deposit)
-                    }
-                }
             }
         }
     }

+ 0 - 3
app/src/main/java/com/sambath/klaklouk_main/screen/report/StatementFragment.kt

@@ -36,9 +36,6 @@ import java.text.SimpleDateFormat
 import java.util.*
 import java.util.concurrent.TimeUnit
 
-/**
- * A simple [Fragment] subclass as the second destination in the navigation.
- */
 class StatementFragment : BaseFragment(R.layout.fragment_statement) {
     private lateinit var adapterDep: ReportAdapter
     private lateinit var adapterWith: ReportAdapter

+ 6 - 4
app/src/main/res/layout/fragment_statement.xml

@@ -25,7 +25,8 @@
             android:layout_width="0dp"
             android:layout_height="match_parent"
             android:layout_weight="1"
-            android:orientation="vertical">
+            android:orientation="vertical"
+            android:visibility="gone">
 
             <com.google.android.material.textview.MaterialTextView
                 android:layout_width="match_parent"
@@ -48,7 +49,8 @@
             android:layout_width="0dp"
             android:layout_height="match_parent"
             android:layout_weight="1"
-            android:orientation="vertical">
+            android:orientation="vertical"
+            android:visibility="gone">
 
             <com.google.android.material.textview.MaterialTextView
                 android:layout_width="match_parent"
@@ -164,7 +166,7 @@
             android:layout_height="match_parent"
             android:layout_marginBottom="48dp"
             android:orientation="vertical"
-            android:visibility="visible">
+            android:visibility="gone">
 
             <androidx.cardview.widget.CardView
                 android:layout_width="match_parent"
@@ -565,7 +567,7 @@
             android:layout_height="match_parent"
             android:layout_marginBottom="48dp"
             android:orientation="vertical"
-            android:visibility="gone">
+            android:visibility="visible">
 
             <androidx.cardview.widget.CardView
                 android:layout_width="match_parent"