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 7514261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:26:40+00:00 2026-05-30T00:26:40+00:00

I have made some menu items, and the items popup when I click menu

  • 0

I have made some menu items, and the items popup when I click menu button of my android phone. But I want , when I shall enter the activity The menu items will auto popup without clicking the menu button…

public class SalesTrackerRoot extends Activity {
private static final int ORDER_ID = Menu.FIRST+1;
private static final int STORE_ID = Menu.FIRST+2;
private static final int SETTINGS_ID = Menu.FIRST+3;

private SalesTrackerDBAdapter mDbHelper;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.salestrackerroot);
    mDbHelper=new SalesTrackerDBAdapter(this);
    mDbHelper.open();
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    menu.add(Menu.NONE, ORDER_ID, Menu.NONE, "Order List").setAlphabeticShortcut('o');
    menu.add(Menu.NONE, STORE_ID, Menu.NONE, "Store Entry").setAlphabeticShortcut('s');
    menu.add(Menu.NONE, SETTINGS_ID, Menu.NONE, "Settings").setAlphabeticShortcut('e');

    return(super.onCreateOptionsMenu(menu));
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case ORDER_ID:
             startActivity(new Intent(this, SalesOrderList.class));
            return(true);
        case STORE_ID:
            startActivity(new Intent(this, AddNewStoreName.class));     
            return(true);

        case SETTINGS_ID:
            startActivity(new Intent(this, SalesTrackerSettings.class));
            return(true);   
    }

    return(super.onOptionsItemSelected(item));
}
  • 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-05-30T00:26:41+00:00Added an answer on May 30, 2026 at 12:26 am

    In your onCreate simply call to openOptionsMenu().

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

Sidebar

Related Questions

I have menu made with Superfish jquery plugin http://users.tpg.com.au/j_birch/plugins/superfish But i have some problems
I have made some changes in one perforce client, but haven't submitted them. I
I have made some progress with the DataList and UserControl this morning but I
I have made some menu with a slide down submenu. It should work fine
I have a little problem, I just made a menu with some asp:hyperlink structured
i have made a few multi activity database applications using sqlite, but i get
I have made some code which exports some details of a journal article to
I have made some screenshots of my website, and in internet explorer 6 my
I have made some screenshots of my website, and in internet explorer 6 my
I have a ASP.net 2.0 app and I have made some changes the the

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.