GoogleNavigationDrawer icon indicating copy to clipboard operation
GoogleNavigationDrawer copied to clipboard

Add to FAQ: You should use only one type of Fragment

Open scottyab opened this issue 9 years ago • 2 comments

I ran into the "You should use only one type of Fragment" runtime exception after a bit of digging I found it was because I added both android.app.Fragment and android.support.v4.app.Fragment as sections. It's not clear from the docs this is a problem.

Maybe it's worth adding the following FAQ? Q) Can I add both android.app.Fragment and android.support.v4.app.Fragment as new sections? A) No, Fragments should of the same type.

Thanks for the lib btw

scottyab avatar Jan 12 '15 12:01 scottyab

Well, You can have only one time of fragment into your drawer. Because they have separate FragmentManager and it will cause a fragment overlapping if you use two different type of fragment. But yes, I will add the new FAQ for this question. Thanks for your help

neokree avatar Jan 12 '15 22:01 neokree

I ran into this problem today, I found out that I was using import android.app.Fragment;. When I changed it to import android.support.v4.app.Fragment;, the problem was solved. This might help others.

Thanks @neokree for the library.

tarhe avatar Apr 07 '15 10:04 tarhe