I have DialogFragmentone that uses a cursor for setMultiChoiceItems. This is Cursorobtained using LoaderManager.
What is the best way to handle this onCreateDialog method? The loader starts after calling this method, so the cursor is not available for AlertDialog.Builder at the beginning.
Is there a way to update the Dialog interface after calling onLoadFinished? Ideally, I would like to set the initial boot user interface, and as soon as Cursor becomes available, update the interface.
I have an implementation that works, which simply takes the cursor loading from the Fragment and into the Activity. I do not like it, although it is not very modular. I could write a Fragment class that would populate its own views and swap them when the cursor is finished, but that is also not very elegant.
Since this is more a design issue than a specific coding problem, I did not use a sample code. The answers I'm looking for should be based on how well to manage this kind of workflow in the DialogFragment class, using AlertDialog.Builder to create a Dialog view.
Shane source
share