Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Android AND-801 Exam - Topic 8 Question 79 Discussion

Posted by Terina on Jan 15, 2025 at 06:41 AM

The code snippet below displays a menu which is illustrated in another image. The emulator image displays a menu that contains three items, but in the code file none of these menu items are available. Where do these items come from?

Suggested Answer: B

Get Premium AND-801 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
34 comments · newest first
VI
Viola 10 months ago
Just to clarify, the code won't show any items without the resource file.
LA
Laine 11 months ago
Wait, are you sure? I thought they were in activity_main.xml.
CE
Cecily 11 months ago
Definitely in menu.xml, that's how it usually works!
BR
Brittni 11 months ago
I think they might be in AndroidManifest.xml instead.
CH
Charisse 11 months ago
The menu items are in menu.xml, not in the code.
RO
Roy 12 months ago
I feel like the activity_main.xml file is more for layout, not menus. I might lean towards option B being the right answer.
EV
Evangelina 12 months ago
I vaguely recall that the AndroidManifest.xml file is for app configuration, not for menu items. So I don't think option C is correct.
KA
Karan 12 months ago
I think the items are probably in the menu.xml file since that's a common practice, but I could be mixing it up with another question we practiced.
SH
Sherita 1 year ago
I remember something about menu items being defined in a separate XML file, but I'm not sure if it's menu.xml or another one.
DA
Dalene 1 year ago
Okay, I've got a strategy here. I'm going to carefully review the code and the image, and then check the other XML files like activity_main.xml and AndroidManifest.xml to see if the menu items are defined there. That should help me figure out where they're coming from.
HA
Harrison 1 year ago
I'm a bit confused by this one. The code doesn't seem to match the image, so I'm not sure where these menu items are coming from. I'll need to do some more digging to figure this out.
LE
Leonor 1 year ago
I think the key here is to look for the menu resource file, like menu.xml. That's probably where these menu items are defined, and they're just being displayed in the emulator image.
CA
Carin 1 year ago
Okay, let's see. The code doesn't show any menu items, but the image does. I'm guessing the menu items are defined somewhere else, like in a separate XML file.
CA
Catarina 1 year ago
Hmm, this is a tricky one. I'll need to carefully review the code and the image to figure out where these menu items are coming from.
JO
Joana 2 years ago
This question is a real brain-teaser. I'm picturing the exam developers sitting around scratching their heads, trying to come up with the most confusing way to ask about menu items. Well played, my friends. Well played.
MA
Maryann 2 years ago
Option C is just silly. Why would the menu items be in the AndroidManifest.xml file? That's for app configuration, not UI elements.
RO
Rosendo 2 years ago
↳ replying to Maryann
B
MI
Mirta 2 years ago
↳ replying to Maryann
I think the menu items are added in the resource file called menu.xml.
AR
Arleen 2 years ago
↳ replying to Maryann
A
CO
Colette 2 years ago
I believe the menu items are added in the AndroidManifest.xml file.
GE
Georgiana 2 years ago
I'm going to have to go with option D on this one. The menu items are probably added in the activity_main.xml file, which is where the main UI is defined.
MA
Marshall 2 years ago
↳ replying to Georgiana
No, I'm pretty sure they are added in AndroidManifest.xml file.
BO
Bobbye 2 years ago
↳ replying to Georgiana
I think the menu items are actually added in the menu.xml file, not activity_main.xml.
RA
Rana 2 years ago
Option B makes the most sense. The menu items are likely defined in the menu.xml resource file, which is then used by the code to display the menu.
LI
Lindsey 2 years ago
↳ replying to Rana
That's right, the code references the menu items from the menu.xml file.
AD
Adelle 2 years ago
↳ replying to Rana
Yes, the menu items are usually defined in a separate XML file like menu.xml.
CR
Cristina 2 years ago
↳ replying to Rana
I agree, option B seems to be the correct answer.
EL
Elza 2 years ago
I agree with Brandee, the code references the menu.xml file.
TH
Thea 2 years ago
The code snippet clearly doesn't have the menu items, so option A is correct. The items must be coming from somewhere else, just not this code file.
ED
Edelmira 2 years ago
↳ replying to Thea
Definitely, the code file itself does not contain the menu items.
AN
Anastacia 2 years ago
↳ replying to Thea
So, option B is the correct answer then.
RO
Rosendo 2 years ago
↳ replying to Thea
Yes, that makes sense. They must be coming from there.
AN
Angella 2 years ago
↳ replying to Thea
I think the menu items are added in the resource file menu.xml.
BR
Brandee 2 years ago
I think the menu items come from the menu.xml file.
0/2000 characters

Save Cancel