Free AND-401 Exam Braindumps
Android Application Development Questions 66–70 (page: 15)

Updated On: 9-Feb-2026

You can create a custom view by extending class:

  1. android.widget.View
  2. android.widget.LinearLayout
  3. android.view.View
  4. android.content.Context

Answer(s): C


Reference:

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



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?

  1. onResume()
  2. onStart()
  3. onCreate()
  4. onPause()

Answer(s): C

Explanation:

onCreate(Bundle) is where you initialize your activity.


Reference:

http://developer.android.com/reference/android/app/Activity.html



Which of the following lines of code starts activity Activity2 from a current activity Activity1?

  1. Intent intent = new Intent(this,new Activity2());
    startActivity(intent);
  2. Intent intent = new Intent(new Activity2());
    startActivity(intent);
  3. Intent intent = new Intent (Activity1.class,Activity2.class);
    startActivity(intent);
  4. Intent intent = new Intent(this,Activity2.class);
    startActivity(intent);

Answer(s): D



Which of the following methods is called first in an Activity when another activity gets into the foreground?

  1. onStop()
  2. onPause()
  3. onDestroy()
  4. onExit()

Answer(s): B

Explanation:

onPause() is where you deal with the user leaving your activity.


Reference:

http://developer.android.com/reference/android/app/Activity.html



Which of the following attributes of the activity tag in the manifest file is used to set an activity screen to landscape orientation?

  1. screenorientation = landscape
  2. screenOrientation=”landscape”
  3. android:ScreenOrientation=“landscape”
  4. android:screenOrientation=”landscape”

Answer(s): D

Explanation:

Adding this to your manifest should force your app to landscape:
<!-- Force Landscape-->
<activity
android:name=".ActivtyName"
android:screenOrientation="landscape">
</activity>


Reference:

http://answers.unity3d.com/questions/534216/how-force-the-app-to-landscape-in-android-with-a-m.html



Viewing page 15 of 47
Viewing questions 71 - 75 out of 228 questions


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

AI Tutor AI Tutor 👋 I’m here to help!