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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:28:28+00:00 2026-05-24T10:28:28+00:00

I am having trouble with menus and activitygroups. I read this question and the

  • 0

I am having trouble with menus and activitygroups. I read this question and the issue I’m still having is that when I press back the currentactivity still seems to be the activity i just came back from, so the activitygroup is returning false for the menu when I press menu for the 1st activity, so its menu is no longer created. this is my group’s back method:

   @Override
    public void onBackPressed() {
         if (this.getCurrentActivity() instanceof mpVoucherDetailsPage  || 
                 this.getCurrentActivity() instanceof MyVoucherDetailsPage){
            MapVouchers.theMap.enableLocationOverlay();
         }
         MapGroup.group.back();
   }

This is my group’s menu methods:

   @Override
   public boolean onPrepareOptionsMenu(Menu menu) {
       System.out.println("onprepareoptionsmenu group called.");
       System.out.println( getLocalActivityManager().getCurrentActivity().onPrepareOptionsMenu(menu) );
       System.out.println(getLocalActivityManager().getCurrentActivity().getClass());
       return getLocalActivityManager().getCurrentActivity().onPrepareOptionsMenu(menu);
   }

   @Override
   public boolean onCreateOptionsMenu(Menu menu) {
       return getLocalActivityManager().getCurrentActivity().onCreateOptionsMenu(menu);
   }

   @Override
   public boolean onOptionsItemSelected(MenuItem item) {
       return getLocalActivityManager().getCurrentActivity().onOptionsItemSelected(item);
   }

Is there any way to make it return the current view’s menu instead of the currentactivity’s(which the user no longer sees)?

  • 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-24T10:28:29+00:00Added an answer on May 24, 2026 at 10:28 am

    I fixed this by using the activity group described on this page:

    http://ericharlow.blogspot.com/2010/09/experience-multiple-android-activities.html

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

Sidebar

Related Questions

I'm having some trouble figuring this out. I have an unordered list menu that
Still having trouble with this language. Ok, let's say I have two objects. The
My question deals with this UI sample. Having trouble with approach to managing the
I've read a bit about CSS3 calculations, but I'm having trouble finding this in
I'm having trouble spotting an issue where this jQuery menu breaks when hovering between
Having trouble with proper regex for RewriteCond RewriteCond %{REQUEST_URI} !^/foo/ Works as expected, that
I`m having trouble trying to optimize this query with OVER (PARTITION BY ...) because
Working on this page: http://www.karlsenner.dreamhosters.com/about.php and having trouble with the navigation in IE6. It
I am having trouble validating my html, my menus are triggering the following error:
I'm having trouble implementing this jQuery plugin for dynamic forms while following this tutorial

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.