Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Activity in Android Development
Atharva Shirdhankar
Atharva Shirdhankar

Posted on • Edited on

     

Activity in Android Development

What is Activity in Android?
➡️ An activity represents a single screen with a user interface just like window

Lifecycle of Activity :
➡️ The Activity class defines the following call backs i.e. events.

Alt Text

PC:(Android Developers official website)

Methods:

1. OnCreate() :
➡️ This is the first callback and called when the activity is first created.

2. onStart() :
➡️ This callback is called when the activity becomes visible to the user.

3. onResume() :
➡️ This is called when the user starts interacting with the application.

4. onPause() :
➡️ The paused activity does not receive user input and cannot execute any code and called when the current activity is being paused and the previous activity is being resumed.

5. onStop() :
➡️ This callback is called when the activity is no longer visible.

6. onDestroy() :
➡️ This callback is called before the activity is destroyed by the system.

7. onRestart():
➡️ This callback is called when the activity restarts after stopping it.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Postman Student Expert • Open Source Dev • DevOps Enthusiast
  • Location
    India
  • Joined

More fromAtharva Shirdhankar

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp