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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:34:52+00:00 2026-06-08T07:34:52+00:00

I create an overflow menu using onCreateOptionsMenu, but the menu is positioned almost completely

  • 0

I create an overflow menu using onCreateOptionsMenu, but the menu is positioned almost completely off the screen. I have tried setting android:anyDensity="true" explicitly (as suggested in Action bar menu shows off screen), but that did not solve the problem for me. I also do not want to follow the suggestion of using an old theme (as in ICS – menu item text cut off?).

Screenshot (the right-hand side of the image is the physical screen border; the image was cut off on the left by me):
enter image description here

The XML is

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/menu_about"
          android:title="About"
          android:icon="@android:drawable/ic_menu_info_details" />
    <item android:id="@+id/menu_reset"
          android:title="Reset image"
          android:icon="@android:drawable/ic_menu_revert" />
    <item android:id="@+id/menu_share"
          android:title="Share"
          android:icon="@android:drawable/ic_menu_share"
          android:showAsAction="ifRoom" />
    <item android:id="@+id/menu_facebook_logout"
          android:title="FB logout"
          android:icon="@drawable/fbook"
          showAsAction="ifRoom" />
    <item android:id="@+id/menu_save"
          android:title="Save"
          android:icon="@android:drawable/ic_menu_save"
          android:showAsAction="ifRoom" />
    <item android:id="@+id/menu_exit"
          android:title="Exit"
          android:icon="@android:drawable/ic_menu_close_clear_cancel" />
</menu>

What am I doing wrong?

  • 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-08T07:34:54+00:00Added an answer on June 8, 2026 at 7:34 am

    It turned out that I still had a

    getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, 
                         WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); 
    

    in my code, to avoid a bug in earlier Android versions (see
    Title bar apeared again after coming back in my application).

    Removing this (it is no longer necessary in ice-cream-sandwich; have not yet tried other versions) made the overflow menu appear correctly.

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

Sidebar

Related Questions

In our application we're using jdMenu plugin to create a hierarchical menu from nested
I am trying to create a navigation menu similar to that of Stack Overflow
I need to create a DHTML menu with the specified features, but I can't
I am trying to create my own scroll bars. I have tried most of
I trying to create a table cell <td> with an overflow but it doesn't
I want to create a widget like Stack Overflow Tag Field. How to add
So for example wikipedia, yahoo answers, or even stack overflow. I'm trying to create
I have created the following demo: http://thedrivepartnership.com/overflow.html The scrolls expand fine in FireFox /
My goals: I want to have #nav to be divide into menu-left and menu-right,
How do you create a unit test case in c for a buffer overflow

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.