Commit e0153557 by likorn

Fixed the bug with saving values

parent d6d9a2b4
......@@ -36,6 +36,7 @@ class MainActivity : AppCompatActivity() {
val cardM = card as MaterialCardView
if (!cardM.isChecked) {
cardM.isChecked = true
checkedCard = cardM
numDigits = getTextView(card).text.toString().toInt()
listOf(card_2_digits, card_3_digits, card_4_digits).forEach { c ->
if (c.id != cardM.id)
......@@ -56,6 +57,7 @@ class MainActivity : AppCompatActivity() {
private fun saveSelectedValues() {
val editor = getSharedPreferences("my_prefs", Context.MODE_PRIVATE).edit()
editor.putInt("sec_to_solve", secToSolve)
editor.putInt("checked_num_id", checkedCard.id)
editor.apply()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment