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

  • Home
  • SEARCH
  • 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 6024693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:11:35+00:00 2026-05-23T04:11:35+00:00

In many applications you can access preferences, settings and what not via the Android

  • 0

In many applications you can access preferences, settings and what not via the Android Menu.

I want to be able to link to an activity in the App that I created.

Any help and/or code would be much appreciated.

-EltMrx

  • 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-23T04:11:35+00:00Added an answer on May 23, 2026 at 4:11 am

    You have to override onOptionsItemSelected method in your Activity, which is called when user clicks on the item in Options menu. In the method you can check what item has been clicked.

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch(item.getItemId()) {
        case R.id.menu_item1:
            Intent intent = new Intent(this, ActivityForItemOne.class);
            this.startActivity(intent);
            break;
        case R.id.menu_item2:
            // another startActivity, this is for item with id "menu_item2"
            break;
        default:
            return super.onOptionsItemSelected(item);
        }
    
        return true;
    }
    

    There is also onContextItemSelected method which works similary, but for Context menu (I’m not sure, what menu you mean).

    More information at
    http://developer.android.com/guide/topics/ui/menus.html

    Class Intent – Action and Category constants http://developer.android.com/reference/android/content/Intent.html

    Action element
    http://developer.android.com/guide/topics/manifest/action-element.html

    Intents and Intent Filters
    http://developer.android.com/guide/topics/intents/intents-filters.html

    Hope this solve your problem.

    CREDITS TO ICEMAN, How to call Activity from a menu item in Android?

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

Sidebar

Related Questions

I'm wanting to access applications storage via iTunes, where i can save documents and
I've got a ClickOnce application deployed that many machines can install just fine -
Many applications have grids that display data from a database table one page at
Many applications have dialogs which have totally custom-looking dialogs, big fat tool-bars and non-rectangular
I have a few C# .dll projects which are common to many applications. Currently,
Many graphing applications use orthogonal edge routing for objects on a canvas. I am
Many Java applications that use shell scripts to configure their environment use the JAVA_HOME
Many Windows applications (games, web browsers, some editors, etc.) support fullscreen mode, in which
Like many web applications (business) the customer wants a form that will search across
In the many Python applications I've created, I often create simple modules containing nothing

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.