What does the following code do? dialog.getWindow().setFlags(LayoutParams.FLAG_BLUR_BEHIND, LayoutParams.FLAG_BLUR_BEHIND);
Answer(s): A
public static final int FLAG_BLUR_BEHIND Window flag: blur everything behind this window. Note: Added in API level 1This constant was deprecated in API level 14. Blurring is no longer supported.
http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_BLUR_BEHIND
What does the following code achieve?Intent intent = new Intent(FirstActivity.this, SecondActivity.class); startActivityForResult(intent);
Answer(s): B
startActivityForResult launches an activity for which you would like a result when it finished.
http://developer.android.com/reference/android/app/Activity.html
When using an implicit intent, what process does the system use to know what to do with it?
When using implicit intents, given such an arbitrary intent we need to know what to do with it. This is handled by the process of Intent resolution, which maps an Intent to an Activity, BroadcastReceiver, or Service (or sometimes two or more activities/receivers) that can handle it.The intent resolution mechanism basically revolves around matching an Intent against all of the <intent-filter> descriptions in the installed application packages.
http://developer.android.com/reference/android/content/Intent.html
Which of the following is NOT true about the MenuItem interface?
Answer(s): C
Both an icon and text can be displayed.The <item> element supports several attributes you can use to define an item's appearance and behavior. The items in the above menu include the following attributes:android:idA resource ID that's unique to the item, which allows the application to recognize the item when the user selects it.android:iconA reference to a drawable to use as the item's icon. android:titleA reference to a string to use as the item's title. Incorrect:B: Adding Menu Items Based on an IntentSometimes you'll want a menu item to launch an activity using an Intent (whether it's an activity in your application or another application). When you know the intent you want to use and have a specific menu item that should initiate the intent, you can execute the intent with startActivity() during the appropriate on-itemselected callback method (such as the onOptionsItemSelected() callback).However, if you are not certain that the user's device contains an application that handles the intent, then adding a menu item that invokes it can result in a non-functioning menu item, because the intent might not resolve to an activity. To solve this, Android lets you dynamically add menu items to your menu when Android finds activities on the device that handle your intent.
http://developer.android.com/guide/topics/ui/menus.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!