-
1.
When including a text file in your application to read from as a resource, what is the recommended location of such file?
res/raw
res/anim
res/files
res/values
Answer
-
2.
Which of the following is correct about XML layoutfiles?
In an Eclipse project using the ADT plugin, the XML layout file is found in the /res/layout directory.
In order to display a UI defined in the XML layout file "main.xml", call the setContentView method of the Activity with the parameter string "main.xml".
There is no distinction between implementation of the layout definition by code, or by XML layout file.
Layout information written in the XML layout file will be converted into code by the Android platform when the screen is displayed.
Answer
-
3.
Which of the following is incorrect about ProgressDialog?
ProgressDialog inherits from the AlertDialog class.
ProgressDialog can be freely configured to use a Drawable class to display as its progress bar.
ProgressDialog can be set as 2 types of style:STYLE_HORIZONTAL and STYLE_SPINNER.
ProgressDialog is able to apply a custom XML-defined layout by using the setContentView.(...) method.
Answer
-
4.
An AsyncTask can be cancelled anytime from any thread.
False
True
Answer
-
5.
Which of the following statements is correct about SQLite?
It is client-server format.
It is possible to create and access a database by using SQLOpenHelper.
It is an object database.
It can be accessed by other applications through ContentProvider.
Answer
-
6.
Javascript is enabled by default in a WebView
True
False
Answer
-
7.
Which of the following makes a ListView Clickable?
setEnabled(true)
SetItemsEnabled(true)
setClickable(true)
setVisibility(View.Visible)
Answer
-
8.
Which method should you use to start a sub-activity?
startSubActivity(Intent intent)
startService(Intent intent)
startActivityForResult(Intent intent)
startActivity(Intent intent)
Answer
-
9.
Which of these is not defined as a process state?
Foreground
Background
Non-Visible
Visible
Answer
-
10.
What does this code do?
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(android.net.Uri.parse("http://www.androidatc.com"));
startActivity(intent);
Starts a sub-activity
Starts an activity using an implicit intent
Starts a service
Sends results to another activity
Answer
-
11.
Which of the following tools dumps system log messages including stack traces when the device or emulator throws an error?
Logcat
DDMS
ADB
Console
Answer
-
12.
What is a correct statement about an XML layout file?
A file that contains all application permission information
A file used to draw the content of an Activity
A layout PNG image file
A file that contains a single activity widget
Answer
-
13.
Which of the following Activity life-cycle methods is called once the activity is no longer visible?
onPause
onDestroy
onStop
onHide
Answer
-
14.
in which Activity life-cycle method you should do all of your normal static set up such as: creating views and bind data to lists?
onStart()
onPause()
onResume()
onCreate()
Answer
-
15.
Which of the following are layout-related methods called by the framework on views, and you can override them when customizing a view? (Choose two)
onMeasure().
onDraw().
onsizechanged().
onKeyUp().
Answer
-
16.
Which of the following Activity life-cycle methods is invoked when a dialog is shown?
onPause()
onStop()
onDestroy()
onCreate()
Answer
-
17.
Which of following is incorrect about the Toast class?
A Toast can only created by an Activity class
There is no need to close or hide a Toast, since it closes automatically.
You cannot set a custom layout for a Toast.
A Toast is displayed for only one of the following periods: Toast.LENGHT_SHORT or Toast.LENGTH_LONG
Answer
-
18.
When creating a file using android.content.Context.openFileOutput("test.txt", 0), where is the file created?
/system/data/<package name>/files
/data/data/<package name>/files
/data/app/<package name>/files
/system/app/<package name>/files
Answer
-
19.
Which of these is the correct function of Traceview?
Displays graphically the call stack.
Displays graphically a memory acquisition and release log.
Displays a graphical task execution log.
Displays graphically the Ul state hierarchy.
Answer
-
20.
Can create a custom view by extending class Activity?
False
True
Answer