AND-401 Android Application Development

Page 1   
Question 1

Which of the following is not included in the Android application framework?

  • A. WindowManager
  • B. NotificationManager
  • C. DialerManager
  • D. PackageManager


Answer : C

Question 2

The values of which of the following classes cannot be mapped in a Bundle object?

  • A. Parcelable
  • B. String
  • C. ArrayList
  • D. Context


Answer : D

Question 3

Which of the following is correct about XML layout files?

  • A. In order to display a Ul defined in the XML layout file "main.xml", call the setContentView method of the Activity with the parameter string main.xml".
  • B. There is no distinction between implementation of the layout definition by code, or by XML layout file.
  • C. In an Eclipse project using the ADT plug-in, the XML layout file is found in the /res/layout directory.
  • D. Layout information written in the XML layout file will be converted into code by the Android platform when the screen is displayed.


Answer : C

Question 4

What is the second layer from top called in the following diagram of Androids Architecture
Exhibit:


  • A. Applications layer.
  • B. Application framework.
  • C. Linux kernel.
  • D. Android runtime.


Answer : B

Question 5

Which of the following is NOT true about onMeasure() method of class View?

  • A. It measures the view and its contents to determine the measured width and height.
  • B. It is invoked by measure().
  • C. The When overriding this method, a developer must call setMeasuredDimension().
  • D. It takes three parameters: the height, width, and the depth of the view.


Answer : D

Question 6

What Eclipse plug-in is required to develop Android application?

  • A. J2EE
  • B. Android Software Development Kit
  • C. Android Development Tools
  • D. Web Development Tools


Answer : C

Question 7

Which of the following is incorrect about the LogCat tool?

  • A. A LogCat view is available as part of the ADT plugin of Eclipse.
  • B. You can create a log in your application using Log.v(String, String).
  • C. Each log message has a tag.
  • D. Only one of your application can create log entries, and it should be component class (Activity, Service,...etc).


Answer : D

Question 8

Which of the following is true about object arrayAdapter declared in the code below?
String[] items = {Item 1,Item 2,Item 3};
ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, items);
listView.setAdapter(arrayAdapter);

  • A. It creates a TextView for each String in array items
  • B. It creates Buttons for each String in array items
  • C. It creates four views for listView
  • D. It replaces the layout of the activity with three consecutive TextView items


Answer : A

Question 9

What Activity method you use to retrieve a reference to an Android view by using the id
attribute of a resource XML?

  • A. findViewByReference(int id)
  • B. findViewById(int id)
  • C. retrieveResourceById(int id)
  • D. findViewById(String id)


Answer : B

Question 10

Which of the following applies a context menu on a ListView? (Choose two)

  • A. ListView lv = getListView();lv.registerForContextMenu()
  • B. ListView lv= getListView();registerForContextMenu(lv);
  • C. ListView lv = (ListView) findViewById(R.id.list_view_id);registerForContextMenu(lv)
  • D. getListView().setConextMenuEnabled(true)


Answer : B,C

Question 11

Which of the following WebView methods allows you to manually load custom HTML
markup?

  • A. loadData
  • B. loadHTML
  • C. loadCustomData
  • D. loadCustomHTML


Answer : A

Question 12

Which Which of the following is true about method startActivity?

  • A. It starts a new activity and destroys the previous one.
  • B. It starts a new activity and sends the previous one to the background.
  • C. It starts a new activity and pauses the previous one.
  • D. It starts a new activity in a paused mode.


Answer : B

Question 13

Which of the following statements about DDMS is incorrect?

  • A. You can display a list of currently running threads and select one to check its stack trace.
  • B. You can use it to acquire screenshots of a terminal.
  • C. You can forcibly execute garbage collection and check the present heap usage status.
  • D. You can do simulations of network zone speed and bandwidth limitations.


Answer : D

Question 14

Which of the following Activity life-cycle methods is called once the activity is no longer
visible?

  • A. onStop
  • B. onPause
  • C. onDestroy
  • D. onHide


Answer : A

Question 15

Which of the following is NOT a correct constructer for ArrayAdapter?

  • A. ArrayAdapter(Context context)
  • B. ArrayAdapter (Context context, int recourse)
  • C. ArayAdpater (Context context , int resource, int textViewResourceId)
  • D. ArrayAdapter (Context context , int resource, List&lt;T> items)


Answer : C

Page 1