fragments in viewpager, no view found error

前端 未结 8 1212
面向向阳花
面向向阳花 2020-12-19 09:23

I have an activity holding a fragment, in this fragment there is a button , when it is clicked, a dialog is popped out.

In this dialog, there is a Viewpager, which

8条回答
  •  攒了一身酷
    2020-12-19 10:02

    getChildFragmentManager() is available since API 17 while you're using the v4 support library. Try using the support fragment manager instead:

    PagerDialog dialog = new PagerDialog(getActivity(),
            getActivity().getSupportFragmentManager());
    

提交回复
热议问题