What did you use instead? I know I can use transaction manager, but I’m not sure how. thanks.
Ohh. FragmentTransaction is also deprecated. k… now I’m a bit lost.
oh… use parentFragmentManager instead. Sorry folks but sometimes talking it through and asking questions helps to joggle the mind even if I figure it out myself.
2 Likes
I’m sorry, but what do we use instead? I’m a bit lost
Nvm, I figured out how to read the docs. They changed it to getParentFragmentManager(). So, the final code should be like this:
dateButton.setOnClickListener {
DatePickerFragment.newInstance(crime.date).apply {
setTargetFragment(this@CrimeFragment, REQUEST_DATE)
show(this@CrimeFragment.getParentFragmentManager(), DIALOG_DATE)
}
}
2 Likes
I eventually figured out myself, but thanks for responding.