Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Acitvity_Main.xml and Fragment_main.xml files in Android Studio

When ever i create a new project, the Fragment_main.xml file is added to my Layout folder and unlike in Eclipse it is this file that contains what is normally in the Activity_Main.xml file.Why is the Fragment_main.xml file always added to my projects in Android Studio and how is it different from the "regular" Activity_main.xml file?

like image 790
Ojonugwa Jude Ochalifu Avatar asked Sep 09 '25 20:09

Ojonugwa Jude Ochalifu


1 Answers

The Activity_main.xml contains the Layout for the FragmentActivity and the fragment_main.xml is the Layout for the fragment.

For more information to fragments and how you can use it.
Visit: http://developer.android.com/training/basics/fragments/index.html

like image 179
Bytehawks Avatar answered Sep 12 '25 12:09

Bytehawks