Free AND-401 Exam Braindumps (page: 2)

Page 1 of 58

What method you should override to use Android menu system?

  1. onCreateOptionsMenu()
  2. onCreateMenu()
  3. onMenuCreated()
  4. onCreateContextMenu()

Answer(s): A

Explanation:

To specify the options menu for an activity, override onCreateOptionsMenu() (fragments provide their own onCreateOptionsMenu() callback).


Reference:

http://developer.android.com/guide/topics/ui/menus.html



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

  1. findViewByReference(int id);
  2. findViewById(int id)
  3. retrieveResourceById(int id)
  4. findViewById(String id)

Answer(s): B

Explanation:

The findViewById(int id) method looks for a child view with the given id.


Reference:

http://developer.android.com/reference/android/view/View.html



Which of the following is not an Android component (i.e. a point from which the system can enter your application)?

  1. Service
  2. Activity
  3. Layout
  4. Content Provider

Answer(s): C

Explanation:

Here are the four types of app components: Activities, Services, Content providers, and Broadcast receivers.


Reference:

http://developer.android.com/guide/components/fundamentals.html



During an Activity life-cycle, what is the first callback method invoked by the system?

  1. onStop()
  2. onStart()
  3. onCreate()
  4. onRestore()

Answer(s): C


Reference:

Android ATC Self Study Guide http://www.androidatc.com/pages-19/Self-Study






Post your Comments and Discuss Android AND-401 exam with other Community members:

AND-401 Discussions & Posts