|
@@ -15,8 +15,9 @@ class BetsDetailListViewHolder(itemView: View, private val printButtonListener:
|
|
|
val txtTime: TextView = itemView.findViewById(R.id.txt_time)
|
|
|
val txtAmount: TextView = itemView.findViewById(R.id.txt_amount)
|
|
|
val txtType: TextView = itemView.findViewById(R.id.txt_type)
|
|
|
+ val txtTotalCast: TextView = itemView.findViewById(R.id.txt_totalcast)
|
|
|
|
|
|
- /*val fightNo = "#" + item.no.toString()
|
|
|
+ val fightNo = "#" + item.no.toString()
|
|
|
try {
|
|
|
var datetime = item.time.split(" ")
|
|
|
var time = datetime[1]
|
|
@@ -27,19 +28,18 @@ class BetsDetailListViewHolder(itemView: View, private val printButtonListener:
|
|
|
}
|
|
|
|
|
|
txtFightBet.text = fightNo
|
|
|
- txtAmount.text = item.amount
|
|
|
+ txtAmount.text = "${item.totalAmount}"
|
|
|
|
|
|
try {
|
|
|
- val amount = item.amount.split("=")
|
|
|
- val winLose = amount[1].trim().toInt()
|
|
|
- if (winLose == 0) {
|
|
|
+ if (item.totalAmountWin < 0) {
|
|
|
txtAmount.setTextColor(Color.RED)
|
|
|
} else {
|
|
|
txtAmount.setTextColor(Color.rgb(48, 63, 159))
|
|
|
}
|
|
|
} catch (e: Exception) {
|
|
|
}
|
|
|
- txtType.text = item.betting*/
|
|
|
+ txtType.text = item.betType.name
|
|
|
+ txtTotalCast.text = "${item.totalCast}"
|
|
|
}
|
|
|
|
|
|
is BettingDetailYukiData -> {
|
|
@@ -47,6 +47,7 @@ class BetsDetailListViewHolder(itemView: View, private val printButtonListener:
|
|
|
val txtTime: TextView = itemView.findViewById(R.id.txt_time)
|
|
|
val txtAmount: TextView = itemView.findViewById(R.id.txt_amount)
|
|
|
val txtType: TextView = itemView.findViewById(R.id.txt_type)
|
|
|
+ val txtTotalCast: TextView = itemView.findViewById(R.id.txt_totalcast)
|
|
|
|
|
|
val fightNo = "#" + item.no.toString()
|
|
|
try {
|
|
@@ -71,8 +72,44 @@ class BetsDetailListViewHolder(itemView: View, private val printButtonListener:
|
|
|
}
|
|
|
} catch (e: Exception) {
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
txtType.text = item.betType.name
|
|
|
+ txtTotalCast.text = "-"
|
|
|
+ }
|
|
|
+
|
|
|
+ is BettingDetailLottoPlusData -> {
|
|
|
+ val txtFightBet: TextView = itemView.findViewById(R.id.txt_fight_no)
|
|
|
+ val txtTime: TextView = itemView.findViewById(R.id.txt_time)
|
|
|
+ val txtAmount: TextView = itemView.findViewById(R.id.txt_amount)
|
|
|
+ val txtType: TextView = itemView.findViewById(R.id.txt_type)
|
|
|
+ val txtTotalCast: TextView = itemView.findViewById(R.id.txt_totalcast)
|
|
|
+
|
|
|
+ val fightNo = "#" + item.no.toString()
|
|
|
+ try {
|
|
|
+ var datetime = item.time.split(" ")
|
|
|
+ var time = datetime[1]
|
|
|
+ var date = datetime[0]
|
|
|
+ txtTime.text = date + System.getProperty("line.separator") + time
|
|
|
+ } catch (e: Exception) {
|
|
|
+ txtTime.text = item.time
|
|
|
+ }
|
|
|
+
|
|
|
+ txtFightBet.text = fightNo
|
|
|
+ txtAmount.text = item.amount
|
|
|
+
|
|
|
+ try {
|
|
|
+ val amount = item.amount.split("=")
|
|
|
+ val winLose = amount[1].trim().toInt()
|
|
|
+ if (winLose == 0) {
|
|
|
+ txtAmount.setTextColor(Color.RED)
|
|
|
+ } else {
|
|
|
+ txtAmount.setTextColor(Color.rgb(48, 63, 159))
|
|
|
+ }
|
|
|
+ } catch (e: Exception) {
|
|
|
+ }
|
|
|
+
|
|
|
+ txtType.text = item.betting
|
|
|
+ txtTotalCast.text = "-"
|
|
|
}
|
|
|
}
|
|
|
}
|