I can't use that in my CuteMainActivity (the one that has my nav drawer code) because then I can't click on each nav drawer menu item and go to a Fragment, I get red errors on my switch statement on the Fragment fragment part, which says my fragments must all extend FragmentActivity, but they can't with a nav drawer, they MUST extend Fragment!Īnyway, gosh this is so confusing. But how are they conflicting and how do I fix that? All examples online I found want you to use FragmentPagerAdapter instead of PagerAdapter as the extension for my adapter, but I can't do that because it requires you to use a FragmentManager that is support v.4. But that's just a guess.īasically, I must use Fragments, not activities. My suspicion is that because the base code, which is normally meant for a main activity, must be put in a Fragment (because of my Navigation Drawer), it is conflicting with my Navigation Drawer, which is already sliding. I am able to get a basic view of the tabs working in my fragment CuteCollectionFragment.java, but when I click on them, they take usually 2 clicks for the new tab to be highlighted, plus you cannot swipe to get to the new tab. The thing is, I am using PagerAdapter as an extension in my main tab fragment class, which is used for my adapter to show the view of what's in the tabs. I am implementing some code from Google (the SlidingTabLayout and SlidingTabStrip, found easily online) and I'm trying to use it with ViewPager to get sliding tabs in my Fragment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |