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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:51:37+00:00 2026-05-23T03:51:37+00:00

I got my list view to respond to a long click. I override oncreatecontext

  • 0

I got my list view to respond to a long click. I override oncreatecontext menu

AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
Intent facebookbrowserIntent = new Intent("android.intent.action.VIEW",
            Uri.parse("http://www.facebook.com/sharer.php?u=http://autobotcentral.info/sd/&t=the_title"));
Intent twitterbrowserIntent = new Intent("android.intent.action.VIEW",
            Uri.parse("http://twitter.com/?status=the_title"));
menu.setHeaderTitle(mStrings.get(info.position).CleanName);

Intent sendIntent = new Intent(Intent.ACTION_VIEW);         
sendIntent.setData(Uri.parse("sms:"));
sendIntent.putExtra("sms_body",  mStrings.get(info.position).CleanName );

output.setText(mStrings.get(info.position).CleanName);

menu.addIntentOptions(Menu.NONE, 0, 0,
    this.getComponentName(),null, facebookbrowserIntent, 0, null);

menu.addIntentOptions(Menu.NONE, 0, 1,
        this.getComponentName(),null, sendIntent, 0, null);
menu.addIntentOptions(   Menu.NONE, 0, 2,
        this.getComponentName(),null, twitterbrowserIntent, 0, null);

menu.add(Menu.NONE, 0, 0,   "Facebook Entry");
menu.add(Menu.NONE, 0, 1, "Sms to friend");
menu.add(Menu.NONE, 0, 2, "Twitter Entry");

However this is not exactly what shows up. Sometimes other words (that shouldn’t even) show up. None of the intents fire correctly. I’ve fiddled with group and order. Not sure exactly of what the sparse docs meant. Any help?

  • 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-23T03:51:38+00:00Added an answer on May 23, 2026 at 3:51 am

    Take a closer look at the documentation for addIntentOptions. That method adds menu items. This means that when you do addIntentOptions it will create menu items. When you do add you’ll create even more items. You don’t need to do the menu.Add statements. This link is probably a good guide for what you’re trying to do.

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

Sidebar

Related Questions

I got in to weird problem, I can't click on my list view... I
I got a view that inherits : System.Web.Mvc.ViewPage<IEnumerable<MyProjects.Models.MyAccountWrapper>> In this view I list data
I've got a list view that is populated by a Binding, on a class
I've got a list view in my content area. Looking to create a overlay
Got a little problem. I'd like to create an android list view activity with
I am using an expandable list view . When i click on a parent
I've got a list view, when a user taps, a changePage occurs to a
I have got a tutorial to add custom objects into a list view from
I've got a list view that I'm populating with 8 columns of user data.
I've got a list view in my MVC app that shows a check box

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.