Activity Life cycle Methods(android)

in #utopian-io7 years ago (edited)

In this document tutorial, one can learn about Activity Lifecycle Methods(Android) of android application.

Requirements

-Knowledge of Java

  • Intarest on Android app development

Difficulty

  • Basic

Activity life cycle methods of android app are ,

OnCreate():
Called when the activity is first created.this is where you shoud do all of your normal static set up:create views,bind date of lists,etc. This method also provides you with a BUndle containning the activity's previously frozen state , if there was one.Always followed by onStart().

onStart():
Called when the activity is becoming visible to the user.
At this point your activity is at the top of the activity stack,eith user input going to it. Always followed by onPush().

onPush():
Called when the system is about to start resuming a previous activity. the pushed activity does not receive user input and cannot execute any code.Followed by either onResume() if the activity returns back to the front , or onStop() if it becomes invisible to the user.

onStop():
called when the activity is no longer visible to the user ,because another activity has been resumed and is convering this one.
followed by either onRestart() if this activity is comming back to interact with the user or onDestroy if this activity is going away .

onDestroy():
the final call you recived before your activity is destroyed.
This can happen either because the activity is finishing someone called finish on it or because the system is temporarily destroying this instance of the activity to save space.

the end.

Sort:  

Your contribution cannot be approved because it does not follow the Utopian Rules.

  • Simple and easy to find tutorial on the internet on this subject.
  • The tutorial is incomplete and quite short, please see already approved tutorials to know how to do a good tutorial.

Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

Coin Marketplace

STEEM 0.21
TRX 0.24
JST 0.038
BTC 94636.84
ETH 3278.73
USDT 1.00
SBD 3.16