What two methods you have to override when implementing Android context menus?
Answer(s): B
Need to create context menu. For this need to override this method:@Overridepublic void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo);menu.setHeaderTitle("My Context Menu"); menu.add(0, NEW_MENU_ITEM, 0, "new"); menu.add(0, SAVE_MENU_ITEM, 1, "save");}And last one need to handle menu clicks:@Overridepublic boolean onContextItemSelected(MenuItem item) { switch (item.getItemId()) {case NEW_MENU_ITEM:doSomething(); break;case SAVE_MENU_ITEM:doSomething(); break;}return super.onContextItemSelected(item);}
https://thedevelopersinfo.wordpress.com/2009/11/06/using-context-menus-in-android/
What two methods you have to override when implementing Android option menus?
Answer(s): C
To specify the options menu for an activity, override onCreateOptionsMenu().When the user selects an item from the options menu (including action items in the app bar), the system calls your activity's onOptionsItemSelected() method. This method passes the MenuItem selected. You can identify the item by calling getItemId(), which returns the unique ID for the menu item (defined by the android:id attribute in the menu resource or with an integer given to the add() method). You can match this ID against known menu items to perform the appropriate action.For example:@Override public boolean onOptionsItemSelected(MenuItem item) { Etc.
http://developer.android.com/guide/topics/ui/menus.html
Which of the following is a call-back method that inflates an options menu from file res/menu/menu.xml?
Answer(s): D
To specify the options menu for an activity, override onCreateOptionsMenu() (fragments provide their own onCreateOptionsMenu() callback). In this method, you can inflate your menu resource (defined in XML) into the Menu provided in the callback. For example:@Overridepublic boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.game_menu, menu);return true;}
Which of the following Activity methods is invoked when the user clicks on an options menu item?
When the user selects an item from the options menu (including action items in the app bar), the system calls your activity's onOptionsItemSelected() method.
Which of the following WebView methods allows you to manually load custom HTML markup?
Answer(s): A
Example: To load the desired web page from an HTML string:String summary = "<html><body>You scored <b>192</b> points.</body></html>"; webview.loadData(summary, "text/html", null);
http://developer.android.com/reference/android/webkit/WebView.html
Share your comments for Android AND-401 exam with other users:
question no: 42 isnt azure vm an iaas solution? so, shouldnt the answer be "no"?
im study azure
i need this now
i took the aws saa-c03 test and scored 935/1000. it has all the exam dumps and important info.
good questions
well explained
i got the full version and it helped me pass the exam. pdf version is very good.
provide the download link, please
please upload thank.
please can you share 1z0-1055-22 dump pls
i will wait impatiently. thank youu
is it possible to clear the exam if we focus on only these 156 questions instead of 623 questions? kindly help!
really helped with preparation of my scrum exam
very informative and through explanations
prep for exam
thanks for helping us
i prepared for the eccouncil 350-401 exam. i scored 92% on the test.
aba questions to practice
great content
how do i get the remaining questions?
well formatted pdf and the test engine software is free. well worth the money i sept.
looking for 1z0-116
in question 22, shouldnt be in the data (option a) layer?
the questions are incredibly close to real exam. you people are amazing.
q15. answer is b. simple
great practice
thanks to this exam dumps, i felt confident and passed my exam with ease.
need 1z0-1105-22 exam
this is a beautiful tool. passed after a week of studying.
can you please upload the dumps for 1z0-1096-23 for oracle
its intresting, i would like to learn more abouth this
q252: dns poisoning is the correct answer, not locator redirection. beaconing is detected from a host. this indicates that the system has been infected with malware, which could be the source of local dns poisoning. location redirection works by either embedding the redirection in the original websites code or having a user click on a url that has an embedded redirect. since users at a different office are not getting redirected, it isnt an embedded redirection on the original website and since the user is manually typing in the url and not clicking a link, it isnt a modified link.
helpful dump questions
question 423 eigrp uses metric