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:
please upload the dump. thanks very much !!
good questions
hi, could you please update the latest dump version
this question is keep repeat : you are developing a sales application that will contain several azure cloud services and handle different components of a transaction. different cloud services will process customer orders, billing, payment, inventory, and shipping. you need to recommend a solution to enable the cloud services to asynchronously communicate transaction information by using xml messages. what should you include in the recommendation?
great questions
its realy good
oracle 1z0-1059-22 dumps
please share me the pdf..
q50: which two functions can be used by an end user when pivoting an interactive report? the correct answer is a, c because we do not have rank in the function pivoting you can check in the apex app
best to practice
so far it is good
please provide me the dump
i failed the cisa exam today. but i have found all the questions that were on the exam to be on this site.
in question 272 the right answer states that an autonomous acces point is "configured and managed by the wlc" but this is not what i have learned in my ccna course. is this a mistake? i understand that lightweight aps are managed by wlc while autonomous work as standalones on the wlan.
it was helpful
good question
really nice
please i need dumps for isc2 cybersecuity
ans is coldline i think
very helpful
can you please provide dumps so that it helps me more
thank you for providing me with the updated question and answers. this version has all the questions from the exam. i just saw them in my exam this morning. i passed my exam today.
how i can see exam questions?
can you please upload please?
question 75: option c is correct answer
please add this exam
please upoad
has anyone recently attended safe 6.0 certification? is it the samq question from here.
expository experience
52 should be b&c. controller failure has nothing to do with this type of issue. degraded state tells us its a raid issue, and if the os is missing then the bootable device isnt found. the only other consideration could be data loss but thats somewhat broad whereas b&c show understanding of the specific issues the question is asking about.
great help!!!
very useful tools
looks a good platform to prepare az-104
want to pass the exam