Simple Help .. #New_androider

+1 Abdullah sabri · January 14, 2016
Hi everyone;
 i'm using android studio 1.5.1, i think the youtube tutorial is performed on android studio 1, when Bucky's adding New Blank activity some attributes in the window are not existing in as 1.5.1 when he was adding buttons and fields to the main activity it's being inserted in activity_main.xml file but in my version it's been inserted in content_main.xml file

Note: the activity_main.xml file does not allow me to add fields or buttons but the content_main.xlm only allows me to add buttons, fields .. etc
First i want to know the difference between the two .xml/s and is what happened is right or i'm doing something wrong

Post a Reply


Oldest  Newest  Rating
+1 David Frenzel · January 14, 2016
First of all, to explain the existence of content_main.xml: 
When you have a look into your activity_main.xml you can see that the content_main.xml is included there. Your main layout is basically outsourced to a different file. For your programming this doesn't really matter. 

So you can either keep it like that and just always edit the content_main.xml or instead of using a blank_activity you could use an empty activity. I'm using the second method because I don't need the floating button on the bottom of the page. Hope this helped!
0 Abdullah sabri · January 15, 2016
yeah i will try it .. thank's for your help
  • 1

Java / Android Development


Very popular language used to create desktop applications, website applets, and Android apps.

Bucky Roberts Administrator