Mobile Programming Lecture 3: Explore IDE Layout XML and Code

LawAbidingBlackberryBush avatar
LawAbidingBlackberryBush
·
·
Download

Start Quiz

Study Flashcards

Questions and Answers

What is the primary purpose of fragments in Android?

To act as miniature activities that can be grouped to form an activity

What is the role of an Intent in Android?

To enable seamless communication and task coordination between different applications

Which life cycle method is called when an activity becomes visible to the user?

onStart()

Which life cycle method is called when an activity starts interacting with the user?

<p>onResume()</p> Signup and view all the answers

What is the purpose of the onDestroy() life cycle method?

<p>Called before the activity is destroyed by the system, either manually or by the system to conserve memory</p> Signup and view all the answers

What is the correct order of life cycle methods when an activity is created and then stopped?

<p>onCreate() -&gt; onStart() -&gt; onResume() -&gt; onPause() -&gt; onStop()</p> Signup and view all the answers

Which file is used to declare an activity in an Android application?

<p>AndroidManifest.xml</p> Signup and view all the answers

Which life cycle method is called when an activity has been stopped and is restarting again?

<p>onRestart()</p> Signup and view all the answers

What is the base class that an activity must extend in order to be created?

<p>AppCompatActivity</p> Signup and view all the answers

Which life cycle method is called when the current activity is being paused and the previous activity is being resumed?

<p>onPause()</p> Signup and view all the answers

Use Quizgecko on...
Browser
Browser