ViewPager + FragmentPagerAdapter inside a DialogFragment gets “IllegalArgumentException:No view found…”

Try this:

In class AchGalleryDialog

MyFragmentAdapter adapter = new MyFragmentAdapter(getChildFragmentManager(),images);

instead of

MyFragmentAdapter adapter = new MyFragmentAdapter(getFragmentManager(),images); 

Because of this:

http://developer.android.com/about/versions/android-4.2.html#NestedFragments

Hope this will help!

Leave a Comment

tech