|
|
|
|
@ -281,6 +281,9 @@ class HandHistoryAdapter( |
|
|
|
|
|
|
|
|
|
dataSource.rowRepresentableForPosition(this.currentPosition)?.let { row -> |
|
|
|
|
|
|
|
|
|
val focused = dataSource.isSelected(this.currentPosition, row, layout.tag as Int) |
|
|
|
|
layout.setBackgroundColor(color(focused)) |
|
|
|
|
|
|
|
|
|
dataSource.contentForRow(row, itemView.context, Card::class).forEach { card -> |
|
|
|
|
val cardView = card.view(itemView.context, inflater, layout) |
|
|
|
|
layout.addView(cardView) |
|
|
|
|
@ -434,9 +437,16 @@ class HandHistoryAdapter( |
|
|
|
|
*/ |
|
|
|
|
inner class RowHandStreet(itemView: View) : RowHandHolder(itemView) { |
|
|
|
|
|
|
|
|
|
init { |
|
|
|
|
// itemView.cardsLayout.tag = 0 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onBind(position: Int, row: RowRepresentable, adapter: RecyclerAdapter) { |
|
|
|
|
super.onBind(position, row, adapter) |
|
|
|
|
|
|
|
|
|
val streetCardsRow = row as StreetCardsRow |
|
|
|
|
itemView.cardsLayout.tag = streetCardsRow.street.ordinal |
|
|
|
|
|
|
|
|
|
configureCardsLayout(itemView.cardsLayout) |
|
|
|
|
|
|
|
|
|
// itemView.cardsLayout.removeAllViews() |
|
|
|
|
@ -461,6 +471,9 @@ class HandHistoryAdapter( |
|
|
|
|
inner class RowHandPlayerSummary(itemView: View) : RowHandHolder(itemView) { |
|
|
|
|
|
|
|
|
|
init { |
|
|
|
|
|
|
|
|
|
itemView.handLayout.tag = PlayerCardsRow.Tag.CARDS.ordinal |
|
|
|
|
|
|
|
|
|
// itemView.cardsEditText.tag = PlayerCardsRow.Tag.CARDS.ordinal |
|
|
|
|
|
|
|
|
|
// Cards |
|
|
|
|
@ -509,6 +522,7 @@ class HandHistoryAdapter( |
|
|
|
|
|
|
|
|
|
init { |
|
|
|
|
|
|
|
|
|
itemView.psHandLayout.tag = PlayerSetupRow.Tag.HAND.ordinal |
|
|
|
|
itemView.stackEditText.tag = PlayerSetupRow.Tag.STACK.ordinal |
|
|
|
|
setClickListener(itemView.stackEditText) |
|
|
|
|
|
|
|
|
|
|