Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas

PatilShreyas/MyListFragment.kt Secret

Last active Mar 12, 2021
Embed
What would you like to do?
class LeakFragment : Fragment() {
private val mAdapter: MyListAdapter by autoCleaned { MyListAdapter() }
private var binding: ProfileBinding by autoCleaned()
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
binding = ProfileBinding.inflate(inflater, container, false)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.recyclerView.adapter = mAdapter
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment