|
|
|
|
@ -486,6 +486,11 @@ class HandHistoryAdapter( |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun positionColor(isFocused: Boolean) : Int { |
|
|
|
|
val color = if (isFocused) R.color.kaki else R.color.kaki_darker |
|
|
|
|
return itemView.context.getColor(color) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onBind(position: Int, row: RowRepresentable, adapter: RecyclerAdapter) { |
|
|
|
|
super.onBind(position, row, adapter) |
|
|
|
|
|
|
|
|
|
@ -497,7 +502,7 @@ class HandHistoryAdapter( |
|
|
|
|
itemView.findViewById<Button>(R.id.positionButton)?.let { button -> |
|
|
|
|
button.text = computedAction.position.value |
|
|
|
|
// button.setBackgroundColor(color(computedAction.isHero)) |
|
|
|
|
button.backgroundTintList = ColorStateList.valueOf(color(computedAction.isHero)) |
|
|
|
|
button.backgroundTintList = ColorStateList.valueOf(positionColor(computedAction.isHero)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Action |
|
|
|
|
|