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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:09:54+00:00 2026-06-08T22:09:54+00:00

I have an app in the making, and have a Preferences activity which allows

  • 0

I have an app in the making, and have a Preferences activity which allows the user to choose settings for the app.

What I need help with is choosing how the preference activity will be accessed by the user. Some tutorials actually have a button in the main activity labeled, for example, “preferences” which would allow the user to visit that activity.

Others (the way I have it currently) just rely on the user clicking the menu button on their phone. I read that some phones do not have a menu button anymore, and the Android team is trying to get rid of a physical navigation button requirements.

So I am a little confused, what is the general consensus on this topic? Thank you.

EDIT: Here is my current menu creation code

@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        menu.add(Menu.NONE, 0, 0, "Settings");
        return super.onCreateOptionsMenu(menu);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
        case 0:
            startActivity(new Intent(this, Preferences.class));
            return true;
        }
        return false;
    }
  • 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-08T22:09:56+00:00Added an answer on June 8, 2026 at 10:09 pm

    Use the “menu button” approach. Typically, in English, the button should be called “Settings”, not “Preferences”, even though it manages Preferences. Silly, I know.

    Regarding phones with no menu buttons:

    The only phones that don’t them run Android 4.0 or higher. As long as your target Android 3.0 or higher in your project build, and properly create the menu item (I’ll provide a snippet if you need to know how), Android will detect that there’s no hardware menu button and add an “Overflow” menu to the Action Bar.

    Edit: Here’s the snippet:

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuItem buttonSettings = menu.add("Settings"); // This is a hardcoded string. When you get around to it, switch it to a localized String resource.
        buttonSettings.setIcon(R.drawable.ic_settings); // I have a custom icon for this. You can use the one in android.R.drawable, but I don't know its name right now.
        buttonSettings.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); // This forces it to go in the overflow menu, which is preferred.
        buttonSettings.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
    
            public boolean onMenuItemClick(MenuItem item) {
                Intent settingsIntent = new Intent(YourActivity.this, Preferences.class); // Change YourActivity to.. well, your activity. Change Preferences to the name of your Settings activity.
                YourActivity.this.startActivity(settingsIntent);
                return false; // I honestly don't know why this should return false, but every example I've seen has it do so. So I'd leave it in.
            }
        });
    return true;
    }
    

    The overflow menu looks like three dots, and is like a “more…” option for the Action Bar. The Android Design Guidelines say you should always put your Settings option in the overflow menu.

    Hope that clears it up, anything else, feel free to ask.

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

Sidebar

Related Questions

I am making an app in which i have a main activity that the
I am making an app in which I have to play video file. .flv
I am making an app in which I have to retrieve the phone number
I am making an app in which i have to save some string in
I have a webapp I'm making that stores user information, and their preferences regarding
I am making an app in which i have to draw image in canvas
I am making an app in which i have to use helvetica neue font
I have a unit test called TestMakeAValidCall() . It tests my phone app making
I have a web app I'm making to run off a CMS that is
I'm making a painting app, and I currently have the app at a point

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.