Krupen / FabulousFilter

Android library to animate Floating Action Button to Bottom Sheet Dialog and vice-versa
Apache License 2.0
2.68k stars 323 forks source link

Custom fragmet #5

Open rezaiyan opened 7 years ago

rezaiyan commented 7 years ago

how can add to viewpager custom fragmets ? i've added some framgent but give me some error: java.lang.IllegalStateException: Fragment does not have a view ...

rezaiyan commented 7 years ago

i think we can't add fragments to a view that parent is so fragment!!!

Krupen commented 7 years ago

Hi, Nested fragments are only supported from API 17 (Jellybean). I am not sure if that is the problem, if possible, please share your code or create a sample repository reproducing this behaviour so that I can solve it.

rezaiyan commented 7 years ago

By default i have a ViewPager and i've create some fragments with specific .xml layouts and i've added those fragments to viewpagerAdapter and setAdapter viewpager in this case we have this error: java.lang.IllegalStateException: Fragment does not have a view ...

Krupen commented 7 years ago

Yes, I tried it and it din't work, got the same error. Mostly this is because of nesting fragments. Will do more research on this and find a solution or workaround.

rezaiyan commented 7 years ago

Thank you so much!

Sent from my Xiaomi MI 3W using FastHub

ZhenisMadiyar commented 7 years ago

Who solve this problem? )

Krupen commented 7 years ago

@ZhenisMadiyar This problem is not yet solved. The workaround is to use ViewPager with Views instead of Fragments.

Krupen commented 6 years ago

Here is the reason well explained as to why FragmentPagerAdapter is not working inside BottomSheet: https://stackoverflow.com/a/21418952

divyank00 commented 3 years ago

Is it solved?