Wednesday, 16 December 2015

what is mean by Activity in Android

         Activities


Defination:  Activity is an single individual user interface screen, with this we can place all UI components  ( or ) Widgets in single screen. 

An Application may contains number of Activities ,each Activity operates independently. But can be linked to one another by declaring all created individual  Activity in AndroidManifest.xml file.



Activity Life Cycle

There are mainly 7 methods. Those are

1)   onCreate()      ==> Called when Activity is first created                           
    2)   onStart()         ==> Called when Activity becomes visible to user                
3)   onResume()    ==> Called when Activity will start interacting with user  
  4)   onPause()        ==> Called when Activity is not visible to user                   
    5)   onStop()          ==> Called when Activity is no longer visible to user           
6)   onRestart()      ==> Called when Activity is stopped, prior to start            
7)   onDestroy()     ==> Called when Activity is Destroyed                             






No comments:

Post a Comment