Skip to content

Commit

Permalink
[FIX/#6] BindingFragment의 _binding 변수 private 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
b1urrrr committed May 7, 2023
1 parent c01247e commit f3e1425
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class HomeFragment : BindingFragment<FragmentHomeBinding>(R.layout.fragment_home

override fun onDestroyView() {
super.onDestroyView()
_binding = null
repoHeaderAdapter = null
repoItemAdapter = null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.android.go.sopt.R
abstract class BindingFragment<T : ViewDataBinding>(
@LayoutRes private val layoutRes: Int,
) : Fragment() {
protected var _binding: T? = null
private var _binding: T? = null
protected val binding get() = requireNotNull(_binding) { getString(R.string.binding_error_msg) }

override fun onCreateView(
Expand Down

0 comments on commit f3e1425

Please sign in to comment.