Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8618185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:02:46+00:00 2026-06-12T06:02:46+00:00

Apologies for what I am sure is a common question, but after Googling for

  • 0

Apologies for what I am sure is a common question, but after Googling for a while it seems I don’t know the proper Android term for what I want and so am stuck.

I would like to know how to work with the main pop-up menu associated with a view…that is, if you are sitting at some activity doing nothing and press the menu key on the phone, how to work with that menu that commonly opens on many apps containing “Settings”, “Exit”, etc.

I am not sure what this is called, but if someone can point me to the appropriate portion of the SDK, that would be appreciated. Also, if someone knows how to work this menu within the context of the Eclipse ADT plugin, that’d be great, too.

Cheers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:02:48+00:00Added an answer on June 12, 2026 at 6:02 am

    As CaseyB says, it’s just called a menu.

    For a quick start on using it, you could create a subfolder in the res folder of an eclipse project and call it “menu” add in some xml for the view, and the call a MenuInflator from the onCreateOptionsMenu function.

    Ok, that might be a bit confusing, so i’ve included some sample code that should get you started. This code should make it so when you press the menu button you can select one of two new activities to get loaded.

    In Main Activity add:

    import android.view.Menu;
    import android.view.MenuInflater;
    import android.view.MenuItem;
    
    
        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            MenuInflater inflater = getMenuInflater();
            inflater.inflate(R.menu.menu, menu);
            return true;
        }
    // Define whatever other activities you can to load in here or whatever. 
        @Override
        public boolean onOptionsItemSelected(MenuItem item) {
            switch (item.getItemId()) {
            case R.id.info:
                startActivity(new Intent(this, Info.class));
                break;
            case R.id.logs:
                startActivity(new Intent(this, Logs.class));
                break;
            }
            return true;
        }
    

    menu.xml file: Link to whatever icon images you want.

    <?xml version="1.0" encoding="utf-8"?>
    <!-- -->
    <!--  Copyright © 2012 Tutela Technologies Ltd. -->
    <!--  All Rights Reserved. -->
    <!-- -->
    <menu
        xmlns:android="http://schemas.android.com/apk/res/android">
        <item 
            android:id="@+id/info" 
            android:icon="@drawable/ic_menu_info_details"
            android:title="Info"></item>
        <item 
            android:id="@+id/logs" 
            android:icon="@drawable/ic_menu_report_image"
            android:title="Logs"></item>
    
    </menu>
    

    Then in your AndroidManifest.xml make sure you remember to add in the new activities.

        <activity 
            android:name="com.whatever.Gui.Info" 
            android:label="@string/appTitle">
        </activity>
        <activity 
            android:name="com.whatever.Gui.Logs" 
            android:label="@string/appTitle">
        </activity>
    

    Note: in this example the labels are defined in strings.xml

    <string name="appTitle">Your App name</string>
    

    Hope this helps you!

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Apologies if I've framed the question incorrectly but I'm not sure where it fits
I'm pretty sure it hasn't, but apologies if this question has already been asked.
I'm sure this is a bone-headed question, so apologies in advance. I want to
(Apologies for the title of this question - I wasn't overly sure how to
Apologies if this is a silly question, and I'm not even sure of the
My apologies for an inaccurate title, but I'm not sure what this is called
I am not sure if I can post this sort of question (apologies in
This, I'm sure is a pretty basic question about JavaScript, so apologies in advance.
Firstly, apologies for the vague title, but I'm not sure exactly what I'm asking
Apologies if this has been asked before but I really didn't know what to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.