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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:57:12+00:00 2026-06-05T22:57:12+00:00

I have problem with context menu. I have got: @Override public void onCreateContextMenu(ContextMenu menu,

  • 0

I have problem with context menu. I have got:

@Override
  public void onCreateContextMenu(ContextMenu menu, View v,
                                    ContextMenu.ContextMenuInfo menuInfo) {
    menu.add(Menu.NONE, COPY, Menu.NONE, "Copy")
        .setAlphabeticShortcut('d');
    menu.add(Menu.NONE, NOTE, Menu.NONE, "Note")
    .setAlphabeticShortcut('n');
    menu.add(Menu.NONE, PAGE, Menu.NONE, "Page")
    .setAlphabeticShortcut('p');

  }

and I want close it when I touch screen outside ContextMenu. Please help me!

  • 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-05T22:57:12+00:00Added an answer on June 5, 2026 at 10:57 pm

    I am not sure if there is any direct method to close the ContextMenu on outside click. But if you want that functionality then you may use a Dialog instead of a ContextMenu and then using dialog.setCanceledOnTouchOutside(true) you can close the dialog on outside click.

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

Sidebar

Related Questions

I have a problem with a Context menu in JavaFx 2:it never disappers when
My problem is how to switch from context menu to correct activity. I have
I have a problem as i've described in title. I've got menu and I
i have a problem while using jquery context menu and update panels. i am
I have a problem setting an image to the custom context menu item in
I have a problem when binding a command in a context menu on a
I have a problem with flash content in IE7 being always over the menu
I have a problem with long urls in the context of video streaming via
I have a problem with a Dev Express component, namely AspxComboBox. My context is
I have this view which generates interface language options menu def lang_menu(request,language): lang_choices =

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.