Thursday, 8 November 2012


  • An activity is the basis of android application

  • A single activity defines a single viewable screen,ie.the actions not the layout.

  • Activity have structured life cycle.

Let us see how  the basic main activity java file looks like

From the above file

setContentView(R.layout.main):- means the following

setContentView:-sets the specified view as the view of the   activity.

R.layout.main:-constant from R class referencing layout from the main.xml


Roney Joseph said...

What is the difference between activity and xml file??