Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialOmar Tsai
1,704 PointsI don't get the fragment layout generated on android studio?
Why is the fragment layout not generated on android studio? I only have 1 layout and that is the activity_main_list.xml
2 Answers
Gloria Dwomoh
13,116 PointsBecause android studio is not eclipse. There are some major differences. If you try to create a new project instead of blank activity like the instructor does, there is one option that says with fragments. You won't need the fragment that gets created because the instructor deletes it later on, but in case you need it in the future, do not choose blank activity, there is another option that contains fragments.
Mukhamad Mukhsin Wibowo
1,547 PointsDear Gloria,
But I have tried both in Eclipse and Android Studio. The fragment layout never appeared. What's wrong with mine? I'll be thanks for your answer :)
Gloria Dwomoh
13,116 PointsHey there Mukhamad Mukhsin Wibowo :) If you really want fragments (even though in the initial two projects you don't need it), instead of blank activity, in android studio try to see if you have an option called... "Blank Activity with Fragment".
Mukhamad Mukhsin Wibowo
1,547 PointsOK. Thanks gloria :)
Gloria Dwomoh
13,116 PointsYou are welcome :D
Juan Gallardo
1,568 PointsJuan Gallardo
1,568 PointsI also tried this on Eclipse and not getting anything show up where I can add the fragments.
But I see that it gets deleted elsewhere in the video anyways.