Ali Gürelli Ali Gürelli - 4 years ago 125
Android Question

ViewPager in Recylerview : No view found for id

The viewpager is in recylerview adapter in my app. When i invastigate live crashs from crashlytics then i encountered a crash which affects too much user.

the title of crash: line 1292

in stack trace :"IllegalArgumentException: No view found for id 0x7f0e0196 (android:id/viewPager) for fragment HomePageSliderFragment

i dont know why it happens but still i couldnt get any solution to fix it yet because i didnt encountered this crash in the my test phones. i applied following solutions to fix it but after i performed this solution then there is another bug occured.

Is there a way to achive this crash? I dont want to seperate viewpager from the recyclerview adapter.


Answer Source

I solved it by passing childfragmentmanger reference to recylerview adapter from the fragment. Then i used it when initilaize viewpageradapter.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download