Skip to content

Commit

Permalink
Fix ResourcesNotFoundException for background color
Browse files Browse the repository at this point in the history
  • Loading branch information
cyb3rko committed Feb 27, 2023
1 parent e9956fd commit e8f4f8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions app/src/main/kotlin/com/cyb3rko/pincredible/data/PinTable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ internal class PinTable : Serializable {
private lateinit var pattern: Array<IntArray>

init {
reset()
resetDigits()
resetPattern()
}

fun reset() {
fun resetDigits() {
data = Array(ROW_COUNT) { IntArray(COLUMN_COUNT) { -1 } }
}

private fun resetPattern() {
pattern = Array(ROW_COUNT) { IntArray(COLUMN_COUNT) { -1 } }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class PinCreatorFragment : Fragment() {

private fun clearTable() {
binding.fab.hide()
pinTable.reset()
pinTable.resetDigits()
binding.tableLayout.table.iterate { view, row, column ->
((view[row] as TableRow)[column] as TextView).text = null
}
Expand Down

0 comments on commit e8f4f8a

Please sign in to comment.