Skip to content

Commit

Permalink
#18 [MOD] : onResume 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
Eonji-sw committed Aug 16, 2024
1 parent 9337897 commit 2f74f06
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.teamwable.profile
import androidx.navigation.fragment.findNavController
import com.teamwable.profile.databinding.FragmentProfileDeleteReasonBinding
import com.teamwable.ui.base.BindingFragment
import timber.log.Timber

class ProfileDeleteReasonFragment : BindingFragment<FragmentProfileDeleteReasonBinding>(FragmentProfileDeleteReasonBinding::inflate) {
private val checkBoxList by lazy {
Expand All @@ -27,6 +26,11 @@ class ProfileDeleteReasonFragment : BindingFragment<FragmentProfileDeleteReasonB
updateButtonState()
}

override fun onResume() {
super.onResume()
updateButtonState()
}

private fun updateButtonState() {
val anyChecked = checkBoxList.any { it.isChecked }
binding.btnProfileDeleteReasonNext.apply {
Expand All @@ -43,7 +47,6 @@ class ProfileDeleteReasonFragment : BindingFragment<FragmentProfileDeleteReasonB
private fun initCheckBoxClickListener() {
checkBoxList.forEach { checkBox ->
checkBox.setOnCheckedChangeListener { _, _ ->
Timber.tag("dd").d("바뀜")
updateButtonState()
}
}
Expand Down

0 comments on commit 2f74f06

Please sign in to comment.