DialogFragment with custom ListView

前端 未结 3 1885
小蘑菇
小蘑菇 2021-01-03 00:47

I\'m trying to create a DialogFragment that shows a dialog with a custom ListView inside.

public class MultiSelectDialogCustom extends DialogFragment {


            


        
3条回答
  •  星月不相逢
    2021-01-03 01:07

    May be you are missing something very small but important. Are you missing notifyDataSetChanged() in your adapter?

    "Once you have added the new item to the adapter you have to call notifyDataSetChanged() so that the listview refreshes itself with the new set of data found in the adapter."

提交回复
热议问题