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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:38:38+00:00 2026-05-20T03:38:38+00:00

I have a viewFlipper with different ListViews in each flip. I have made all

  • 0

I have a viewFlipper with different ListViews in each “flip”. I have made all the lists registerForContextMenu(chosenList); and the longPress menu appears in each of the lists as I want.

Now I want to have DIFFERENT contextMenues in the different list views. eg. one list with network info will have network related choices in the contextMenu and the list with friends will have another set of choices in it’s contextMenu.

How do I do this efficiently? is this even possible?

public void onCreateContextMenu(ContextMenu menu2, menu3, menu4, View v, ContextMenuInfo menuInfo) {
  super.onCreateContextMenu(menu2, menu3, menu4, v, menuInfo);
  menu2.setHeaderTitle("Quick Menu");
  menu3.setHeaderTitle("Menu3");
  menu4.setHeaderTitle("Menu4");
  MenuInflater inflater = getMenuInflater();
  inflater.inflate(R.menu.context_menu, menu2);
  inflater.inflate(R.menu.context_menu3, menu3);
  inflater.inflate(R.menu.context_menu4, menu4);
}

…or …? how else? this is starting to drive me insane in the midbrain… 😀

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

    Inside your onCreateContextMenu(), do something like:

    switch(v.getId())
    {
        case R.id.list1:
        {
            inflater.inflate(R.menu.context_menu1, menu)
            break;
        }
        case R.id.list2:
        {
            inflater.inflate(R.menu.context_menu2, menu)
            break;
        }   
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ViewFlipper that is transitioned between each view, I want to draw
I have a ViewFlipper that presents 3 different views. Is it possible to have
I have a ViewFlipper with 3 children. I want to be able to display
I have a ViewFlipper which holds a single ImageView. i want to be able
I have add a ViewFlipper in which has 2 linearlayout,and I have made an
I have different screen to work in an android application. I'm using ViewFlipper for
I have an Activity containing a ViewFlipper and would like to show a different
I have a ViewFlipper in which I want to add Views (Relative Layout with
I have three layouts with viewflipper. I want one layout to be able to
I have an input wizard type activity with 2 views and a ViewFlipper. Each

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.