Which of the following is NOT true about onMeasure() method of class View?
Answer(s): D
Syntax: protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)onMeasure() measures the view and its content to determine the measured width and the measured height. This method is invoked by measure(int, int) and should be overridden by subclasses to provide accurate and efficient measurement of their contents.
http://developer.android.com/reference/android/view/View.html#onMeasure(int, int)
Which of the following Activity life-cycle methods is invoked when a dialog is shown?
Answer(s): A
onPause() is where you deal with the user leaving your activity.
http://developer.android.com/reference/android/app/Activity.html
Which of the following is NOT true about class DefaultHttpClient?
Answer(s): C
Android 6.0 release removes support for the Apache HTTP client. If your app is using this client and targets Android 2.3 (API level 9) or higher, use the HttpURLConnection class instead.
http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-httpclient
Which of the following is NOT true about the SharedPreferences interface?
SharedPreferences class is an interface for accessing and modifying preference data returned by getSharedPreferences(String, int). For any particular set of preferences, there is a single instance of this class that all clients share. Modifications to the preferences must go through an SharedPreferences.Editor object to ensure the preference values remain in a consistent state and control when they are committed to storage.Objects that are returned from the various get methods must be treated as immutable by the application.
http://developer.android.com/reference/android/content/SharedPreferences.html
Post your Comments and Discuss Android AND-401 exam with other Community members:
To protect our content from bots for real learners like you, we ask you to register for free. Sign in or sign up now to continue with the AND-401 material!