New Year Sale 2026! 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

Actual exam question for Android's AND-801 exam
Question #: 79
Topic #: 8
[All AND-801 Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters
Viola
3 months ago
Just to clarify, the code won't show any items without the resource file.
upvoted 0 times
...
Laine
3 months ago
Wait, are you sure? I thought they were in activity_main.xml.
upvoted 0 times
...
Cecily
3 months ago
Definitely in menu.xml, that's how it usually works!
upvoted 0 times
...
Brittni
4 months ago
I think they might be in AndroidManifest.xml instead.
upvoted 0 times
...
Charisse
4 months ago
The menu items are in menu.xml, not in the code.
upvoted 0 times
...
Roy
4 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.
upvoted 0 times
...
Evangelina
4 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.
upvoted 0 times
...
Karan
4 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.
upvoted 0 times
...
Sherita
5 months 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.
upvoted 0 times
...
Dalene
5 months 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.
upvoted 0 times
...
Harrison
5 months 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.
upvoted 0 times
...
Leonor
5 months 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.
upvoted 0 times
...
Carin
5 months 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.
upvoted 0 times
...
Catarina
5 months 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.
upvoted 0 times
...
Joana
1 year 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.
upvoted 0 times
...
Maryann
1 year 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.
upvoted 0 times
Rosendo
12 months ago
B
upvoted 0 times
...
Mirta
12 months ago
I think the menu items are added in the resource file called menu.xml.
upvoted 0 times
...
Arleen
1 year ago
A
upvoted 0 times
...
...
Colette
1 year ago
I believe the menu items are added in the AndroidManifest.xml file.
upvoted 0 times
...
Georgiana
1 year 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.
upvoted 0 times
Marshall
1 year ago
No, I'm pretty sure they are added in AndroidManifest.xml file.
upvoted 0 times
...
Bobbye
1 year ago
I think the menu items are actually added in the menu.xml file, not activity_main.xml.
upvoted 0 times
...
...
Rana
1 year 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.
upvoted 0 times
Lindsey
1 year ago
That's right, the code references the menu items from the menu.xml file.
upvoted 0 times
...
Adelle
1 year ago
Yes, the menu items are usually defined in a separate XML file like menu.xml.
upvoted 0 times
...
Cristina
1 year ago
I agree, option B seems to be the correct answer.
upvoted 0 times
...
...
Elza
1 year ago
I agree with Brandee, the code references the menu.xml file.
upvoted 0 times
...
Thea
1 year 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.
upvoted 0 times
Edelmira
1 year ago
Definitely, the code file itself does not contain the menu items.
upvoted 0 times
...
Anastacia
1 year ago
So, option B is the correct answer then.
upvoted 0 times
...
Rosendo
1 year ago
Yes, that makes sense. They must be coming from there.
upvoted 0 times
...
Angella
1 year ago
I think the menu items are added in the resource file menu.xml.
upvoted 0 times
...
...
Brandee
1 year ago
I think the menu items come from the menu.xml file.
upvoted 0 times
...

Save Cancel