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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:33:36+00:00 2026-06-05T19:33:36+00:00

So, I was reading this earlier question for ideas on how to allow me

  • 0

So, I was reading this earlier question for ideas on how to allow me to click an item in a list to do one action or long-press that item to switch to an ActionMode where I can select multiple items and use the ActionBar to do something to those items. However, I’m having issues with this answer. Specifically, I’m implementing this into a SherlockListFragment (using ActionBarSherlock). However, the moment I declare a new MultiChoiceModeListener, Eclipse throw up a couple of compile errors.

Description Resource    Path    Location    Type
Cannot override the final method from SherlockListFragment  DateTimeListFragment.java   /path/to/my/project line 127    Java Problem
The method inflate(int, Menu) in the type MenuInflater is not applicable for the arguments (int, Menu)  DateTimeListFragment.java   /path/to/my/project line 125    Java Problem

These go away the moment I remove the MultiChoiceModeListener. I have no idea what could be causing it, as there’s nothing odd going on that I’m aware of.

public void onCreateOptionsMenu(Menu menu, MenuInflater inflater)
    {
        //super.onCreateOptionsMenu(menu, inflater);
        inflater.inflate(R.menu.alarmsmenu, menu); //line 125
    }
    public boolean onOptionsItemSelected(MenuItem Item) //line 127
    {
        switch(Item.getItemId())
        {
        case R.id.addAlarm:
            addAlarm();
            return true;
        case R.id.editAlarms:
            return true;
        default:
            return super.onOptionsItemSelected(Item);
        }       
    }

I’m very confused. Why does implementing MultiChoiceModeListener mean I can’t override OnOptionsItemSelected?

EDIT: To help clarify, here are my imports.

import java.util.Calendar;
import java.util.GregorianCalendar;
import android.app.DatePickerDialog;
import android.app.TimePickerDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v4.app.*;
import android.support.v4.content.Loader;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView.MultiChoiceModeListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.DatePicker;
import android.widget.ListView;
import android.widget.TimePicker;

import com.actionbarsherlock.app.SherlockListFragment;
import com.actionbarsherlock.app.ActionBar; //Yes, it's unused...
import com.actionbarsherlock.view.*;
import com.commonsware.cwac.loaderex.acl.*;
  • 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-05T19:33:39+00:00Added an answer on June 5, 2026 at 7:33 pm

    As a kind person from reddit has notified me, apparently ActionBarSherlock does not currently support MultiChoiceModeListener. The fact that I’m using ActionBarSherlock’s menus when the listener wants native Android menus probably contributes to the issue as well.

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

Sidebar

Related Questions

I asked this question earlier and I have been reading the answers and searched
I mentioned in one of my earlier questions that I'm reading book C++ Coding
This is a similar question I asked earlier, except different in the fact that
Reading this article http://support.microsoft.com/kb/813878 I have a question: Where can I get ipseccmd.exe for
After reading this article on thedailywtf.com, I'm not sure that I really got the
After reading this: http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-to-use-it I came to the conclusion that it is not valid
After reading this question , i saw the answer by Naveen containing a link
I tried to ask this question earlier, but I was unclear in my question.
earlier today I asked this question . So since moq creates it's own class
So I was reading about PHP namespaces, and I realized that in versions earlier

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.