0

For some reason when I add a new activity to my app it creates a 'fragment layout' as well as an activity in my layout folder, I have coded half of my app and have never seen this fragment layout until now and I have no clue what to do with it? Any ideas on how I can make it stop and get eclipse acting the way it used to, ie. when I create a new activity, I get the Java file and the XML file and no mention of fragments anywhere? Thanks for any help.

2 Answers2

0

You should read the Android documentation on what fragments are:

http://developer.android.com/guide/components/fragments.html

In short, you don't need to use Fragments if you don't want to. You can delete both the Fragment class and the related .xml file. Just make sure that in your activity you do not call any FragmentManager methods and move any code you used in your Fragment class to the relevent method in your Activity.

As far as turning it off for Eclipse, a quick google search showed that this has been answered in another StackOverflow question here:

ADT blank activity created with fragment activity..

Community
  • 1
  • 1
Damon Swayn
  • 1,326
  • 2
  • 16
  • 36
  • Thanks a lot for your help, I'll try read up on it, I just thought I had done something wrong. –  Mar 26 '14 at 22:34
0

This was added in ADT 22.6.0 and there is no way to get to the old project setup other then downgrade your ADT.

If you have never seen Fragments give the documentation a try. It's a very popular and useful concept in Android development.

Steve Benett
  • 12,843
  • 7
  • 59
  • 79