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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:29:21+00:00 2026-05-20T14:29:21+00:00

How would I go about adding a context menu to a spinner popup? I

  • 0

How would I go about adding a context menu to a spinner popup?

I have a spinner that is populated by a database cursor, and I’d like to have a context menu so when the user long clicks an item they can edit or delete the item (two options in context menu).

I can’t seem to find a way to register a context menu for the window that appears with the selectable items. Is there a way to, like on a list View?

Otherwise, what about having a hidden view that is registered for a context menu and then use the spinner’s OnItemLongClickListener call openContextMenu for the hidden view? This seems kind of like a hack so I’d rather do it the correct way, if possible.

Or maybe I should just register the spinner for the context menu instead of having a hidden one…

Thanks!

  • 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-20T14:29:21+00:00Added an answer on May 20, 2026 at 2:29 pm

    How would I go about adding a context menu to a spinner popup?

    Ideally, you wouldn’t even try. Classic pop-up context menus are going to be obsolete with the new Honeycomb UI, at least for the tablet form factor, so I would not invest a ton of time in hacking them into widgets where they aren’t normally used.

    Moreover, users are unlikely to discover your context menu, simply because they tend not to discover context menus too often in the first place. Users tend not to experiment by randomly stabbing the screen for a second-plus to see if menus happen to pop up. The only way they will know about your context menu is if they read the fine manual, and we all know how often that happens. Hence, you need some other way for the user to do the same operations — having them be able to edit/delete only through a non-discoverable context menu is very user-hostile. Hence, context menus are, at best, an accelerant, and not worth forcing into unexpected and unsupported places.

    I have a spinner that is populated by a database cursor, and I’d like to have a context menu so when the user long clicks an item they can edit or delete the item (two options in context menu).

    If you want the context menu, convert the Spinner into a ListView. Not only will this be incrementally more discoverable (some users will be used to interesting things if they long-tap on a list item), but context menus work naturally.

    If you really want, you can clone Spinner (and possibly AbsSpinner or other superclasses) into your project, so you can take control over the drop-down behavior, then write something that enables a context menu on the selection dialog box. Then, you will need to bear in mind that none of that will work, most likely, with the new Spinner in Android 3.0, simply because there is no more selection dialog box.

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

Sidebar

Related Questions

How would one go about adding a submenu item to the windows explorer context
How would I go about adding enctype=multipart/form-data to a form that is generated by
I have a ClickOnce app that I would like to have MAF (System.AddIn) support
How would I go about adding the Spent Time as a column to be
As a programmer I have no idea how one would go about programming menus
I have a MasterPage that is two column layout, left column menu, right column
I would like to remove/delete a migration file. How would I go about doing
I would like to update my SQL lite database with the native update-method of
(please excuse that I didn't use aliases). I would like my query output to
I would like to add an if statement to the below code that checks

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.