• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Display DialogFragment From Custom ArrayAdapter

ShatterStar

Newbie
Hi,

I have a fragment within an activity that has an instance of my custom arrayAdapter. My custom array adapter implements my custom DialogFragment.

Within my custom arrayadapter I am trying to show my dialogFragment on a button click but I get an error that the fragment manager is null, here is the line of code that produces the problem

Code:
reminderOptionsDialogFragment.show(reminderOptionsDialogFragment.getFragmentManager(), "What2");

How do I go about calling my dialogFragment from within my custom arrayAdapter?
 
Try this

Code:
reminderOptionsDialogFragment.show(reminderOptionsDialogFragment.getSupportFragmentManager(), "What2");
 
Last edited by a moderator:
Back
Top Bottom