Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom fragmet #5

Open
rezaiyan opened this issue Aug 22, 2017 · 9 comments
Open

Custom fragmet #5

rezaiyan opened this issue Aug 22, 2017 · 9 comments

Comments

@rezaiyan
Copy link

rezaiyan commented Aug 22, 2017

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
Copy link
Author

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

@Krupen
Copy link
Owner

Krupen commented Aug 22, 2017

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
Copy link
Author

rezaiyan commented Aug 23, 2017

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
Copy link
Owner

Krupen commented Aug 26, 2017

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
Copy link
Author

Thank you so much!

Sent from my Xiaomi MI 3W using FastHub

@ZhenisMadiyar
Copy link

Who solve this problem? )

@Krupen
Copy link
Owner

Krupen commented Sep 4, 2017

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

@Krupen
Copy link
Owner

Krupen commented Oct 9, 2017

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

@divyank00
Copy link

Is it solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants