Which of the following applies a context menu on a ListView (Choose two)?
Answer(s): B,C
B: The first thing to do is to register your ListView as having a context menu, using the registerForContextMenu() method. The following lines of code in your ListActivity's onCreate() method accomplish this:ListView lv = getListView(); registerForContextMenu(lv);
http://htc-magic-android.gb-eu.com/131/accessing-listview-items-with-a-context-menu.html http://developer.android.com/reference/android/view/ContextMenu.html
Which of the following best explains the Android context menus?
Answer(s): B
To show a context menu on long click, most clients will want to call registerForContextMenu(View). Reference: http://developer.android.com/reference/android/view/ContextMenu.html
Which of the following is NOT a feature provided by the Material Theme?
Material theme provides:System widgets that let you set their color palette Touch feedback animations for the system widgets Activity transition animations
http://developer.android.com/training/material/theme.html
Which of the following statements is NOT correct about Android fragments?
Fragment life cycle is closely related to the life cycle of its host activity which means when the activity is paused; all the fragments available in the activity will also be stopped.Incorrect:D: You can add or remove fragments in an activity while the activity is running.
http://www.tutorialspoint.com/android/android_fragments.htm
Which of the following are benefits for using fragments in your application? (Choose two)
Answer(s): B,D
B: Following is a typical example of how two UI modules defined by fragments can be combined into one activity for a tablet design, but separated for a handset design.D: You can combine multiple fragments in a single activity to build a multi-plane UI.
http://www.tutorialspoint.com/android/android_fragments.htm https://developer.android.com/guide/components/fragments.html
Post your Comments and Discuss Android AND-401 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the AND-401 content, but please register or login to continue.