NEW
Font size
WorksheetsIT 413 -Online Final Exam
Total questions: 40
Worksheet time: 1hrs 20mins
What is Android activity?
It is basically a page or a form on the apps.
It is the device use to install apps
This manages the content of your device
None of the above
How many Callback method Activity life cycle have?
5
6
7
8
Which of the following is NOT included in activity life cycle?
onPause()
onSave()
onStart()
onRestart()
Which of the following is NOT an Android component?
Activity
Broadcast Receiver
Views
Service
Which method is used to start another activity?
startSubActivity()
startActivityForResult()
startIntent()
startActivity()
This method in activity lifecycle will be called once the activity is no longer visible.
onStop()
onHide()
onPause()
onDestroy()
Which of the following is the correct code to start ActivityB from ActivityA?
Intent intent = new intent(ActivityA.this,ActivityB.class);
startActivity(intent);
Intent intent = new Intent(new ActivityB());
startActivity(intent);
intent intent = new Intent (ActivityA.class, ActivityB.class);
startActivity(intent);
Intent intent = new intent(this, new ActivityB());
startActivity(intent);
What does the following code do?
Intent intent = new Intent(Intent.ACTION_DIAL,
Uri.parse("tel: 0917-6199164"));
startActivity(intent);
The code will do nothing
This will let the phone dialer be called explicitly
This will let the android system find an activity that can handle the intent
It will not execute, there is a syntax error
Which method is used to close an activity after getting a result?
destroy()
close()
exit()
finish()
Which callback method will be called after the activity has been stopped, and it is about to again.
onDestroy()
onResume()
onRestart()
onStop()
What does the following code do?
Intent intent = new Intent(ActivityA.this,ActivityB.class);
Creates an explicit intent
Starts an activity
Creates an implicit intent
None of the above
It is the mechanism used to allow an activity to invoke another activity.
Activity
Services
Intent
Fragment
This method will tell the system which would be the frontend of the backend.
MainActivity.class
setContentView()
activity_main.xml
Constraint
This file serves as the backend of the activity.
MainActivity.class
Constraint
activity_main.xml
setContentView()
It is a Linux-based mobile OS that rapidly became Apple's largest mobile device market competitor.
Windows Phone OS
BlackBerry OS
Android Google OS
IOS
A linearLayout means:
It aligns all children in a relative position.
It aligns all children in a flexible position.
It aligns all children in a vertical or horizontal within a single direction.
It designed to block out an area on the screen to display a single item.
A RelativeLayout means:
It aligns all children in a relative position.
It aligns all children in a flexible position.
It aligns all children in a vertical or horizontal within a single direction.
It designed to block out an area on the screen to display a single item.
A FrameLayout means:
It aligns all children in a relative position.
It aligns all children in a flexible position.
It aligns all children in a vertical or horizontal within a single direction.
It designed to block out an area on the screen to display a single item.
In Android Studio, dependencies allows us to:
Insert small images in our android project.
defines the structure and metadata of our application, its components, and its requirements.
Include an external library or local jar files in our Android project, or other library modules.
All of the Above
When adding comment to a XML file, you must;
Place a comment tag like this:
// This is a comment. //
Place a comment tag like this:
<!--This is a comment. -->
Place a comment tag like this:
!-- This is a comment. --!
Place a comment tag like this:
* This is a comment. *
When adding comment to a JAVA file, you must;
Place a comment tag like this:
// This is a comment. //
Place a comment tag like this:
<!--This is a comment. -->
Place a comment tag like this:
!-- This is a comment. --!
Place a comment tag like this:
* This is a comment. *
Android Event listener means:
It is a general-purpose build tool
It is a component that is used to perform operations on the background.
It is procedure in a program that waits for an event to occur.
All of the Above
Which is the correct syntax of Android Toast?
Toast.makeText( "message", duration).show();
Toast.makeText(context, "message").show();
Toast.makeText("message",context , duration).show();
Toast.makeText(context, "message", duration).show();
This component provides simple feedback messages in a small popup about an operation.
Android Callback Method
Android Fragment
Android Toast
Android Comment
Each stage of the activity lifecycle has a corresponding method associated with it called?
Android Callback Method
Android Fragment
Android Toast
Android Comment
True or False: Activity is basically a page or a form and It has its own life.
True
False
Another activity can start an activity. By doing this, the system temporarily stops the previous activity and places it in a stack called?
Singe Stack
Previous Stack
Back Stack
Forward Stack
What does onCreate() do?
This method is called after the activity has been stopped, and it is about to again.
This method is called before the activity becomes visible to the user.
This method is called after the activity has been stopped, and it is about to again.
In this state, the activity is created.
What does onStart() do?
This method is called after the activity has been stopped, and it is about to again.
This method is called before the activity becomes visible to the user.
This method is called after the activity has been stopped, and it is about to again.
In this state, the activity is created.
This is the final callback method.
onStop()
onStart()
onDestroy()
onPause()
The Intent can perform the following scenarios:
Starting a new activity
Passing the data to another activity
Start a background process (Service
All of the Above
This Intent used to ask the Android system which activity can handle the user request.
Implicit Intent
Explicit Intent
Onplicit Intent
Export Intent
This Intent used to call a specific component using a valid class name.
Implicit Intent
Explicit Intent
Onplicit Intent
Export Intent
This object acts as the bridge between the AdapterView and this view's underlying data.
ViewGroup
Intent
Adapter
View
if you have a list of single items that are backed up by an array, you must;
use Android BaseAdapter
use Android ArrayAdapter
use Android SimpleAdapter
use Android Custom SimpleAdapter
When you click an item in the AdapterView, it means you're using;
AdapterView.OnItemSelectedListener
AdapterView.OnItemClickListener
AdapterView.OnItemLongClickListener
When an item in the AdapterView has been selected, it means you're using;
AdapterView.OnItemSelectedListener
AdapterView.OnItemClickListener
AdapterView.OnItemLongClickListener
True or False: Google selects Java programming because it runs on a VM, o it doesn't have to be recompiled for every phone out there.
True
False
True or False: Google selects Java programming because Java has huge open source support and tools that are available to make developers life easier.
True
False
True or False: Google selects Java programming because Java allows developers to create application with minimal security that can take down your entire OS.
True
False
