Skip to content

Commit

Permalink
♻️ nullify binding object on onDestroyView callback
Browse files Browse the repository at this point in the history
  • Loading branch information
kmkim2689 committed Jul 25, 2024
1 parent d7e823f commit 67f2484
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ class OnboardingFragment : Fragment() {
}
}

override fun onDestroyView() {
super.onDestroyView()
_binding = null
}

private fun handleGoogleSignInResult(task: Task<GoogleSignInAccount>) {
try {
val account = task.getResult(ApiException::class.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class SignUpFragment : Fragment() {
}
}

override fun onDestroy() {
super.onDestroy()
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}

Expand All @@ -75,7 +75,7 @@ class SignUpFragment : Fragment() {
ArrayAdapter(
requireContext(),
android.R.layout.simple_spinner_item,
List(100) { (it + 1820).toString() },
List(100) { (it + 1920).toString() },
)
yearAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
binding.formBirthDate.spFormContent1.spDefault.adapter = yearAdapter
Expand Down

0 comments on commit 67f2484

Please sign in to comment.