0

I have a fragment in Navigation Drawer project. It contains 7 tabs. When i clicked on tabs it should show fragment below the tabs. Fragment loads but does not show up.

Fragment code that contains the tabs can be found @ http://pastebin.com/SAARGWLh (FragmentLoadshedding.java)

and the fragment class code that should be displayed inside above fragment can be found @ http://pastebin.com/dnamPgBr (group1.java)

While i run the code and click on tabs 1,2 or any other the code inside group1.java is running but cannot load its content i.e. group1.xml.

Please suggest appropriate solution.

Bishwash
  • 854
  • 1
  • 9
  • 22

2 Answers2

0

There is an absolutely light-weight and material design implementation of what you are asking for by Chris Banes (who's from the android team). Honestly, I tried looking at your code but it's too complicated for my taste. Using the example can help you create a bug free viewpager fragment inside a navigation drawer that is as vanilla as it can get.

The code for the implementation can be found here:

https://github.com/chrisbanes/cheesesquare

dejavu89
  • 754
  • 1
  • 7
  • 17
  • This may be the last alternative. But, for now i have to struggle with my current codes to get the solution. Thanks!! – Bishwash Sep 01 '15 at 08:27
  • I'll try look into your code in detail once I'm home. Will comment here if I find something – dejavu89 Sep 01 '15 at 09:04
0

After hours of struggling i found the solution myself. There was problem in the layout file.

Bishwash
  • 854
  • 1
  • 9
  • 22