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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:31:13+00:00 2026-05-19T13:31:13+00:00

In my webview there is no long click and show up a context menu

  • 0

In my webview there is no long click and show up a context menu where i can save link as save image and so on.

Here is my work so far:

registerForContextMenu(mWebView);

public void onCreateContextMenu(ContextMenu menu, View v,ContextMenuInfo menuInfo) {  
    super.onCreateContextMenu(menu, v, menuInfo);  
        menu.setHeaderTitle("Menu");  
        menu.add(0, v.getId(), 0, "Save As... Or save image");  

}

@Override  
public boolean onContextItemSelected(MenuItem item) {  
        if(item.getTitle()=="Action 1"){function1(item.getItemId());}  

    else {return false;}  
return true;  
}  
public void function1(int id){  
    // HOW DO I SAVE??
    }

SO i cannot really find a working code how to save the selected online image…!
Can you guys help me out?
And have i done the context menu wrong??

Thank you!

  • 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-19T13:31:13+00:00Added an answer on May 19, 2026 at 1:31 pm

    When you register for a context menu you need to specify which element in your view you’re registering your context view for. mWebView could be referring to the entire view in general and not solely the links on the page. Have you checked this?

    For example consider this:

        GridView gridView = (GridView) findViewById(R.id.gridview);
        registerForContextMenu(gridView);
    

    In this example, i am registering the GridView part of my entire view to the context menu, so only when the items in the GridView are pressed for long enough, the context menu appears.

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

Sidebar

Related Questions

When using webview to show html pages, there will be several seconds of blank
I want to show a custom dialog in a webview app when there is
Is there a way to get the current content of a WebView? What about
I am curious if there is a way from within a WebView when a
I am using a webview and on that web view i have a image.
I have a WebView. I'd like to show some page from my server, but
Is there any possible way to fire event to the Webview before he is
Is there a possibility to enhance the rendering speed in webview? With a simple
So is there a way for a webview control to detect a swipe while
Is there a way to change the text color for entire webView? If it

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.