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

  • Home
  • SEARCH
  • 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 8602775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:10:08+00:00 2026-06-12T02:10:08+00:00

I downloaded the ActionBarSherlock version 4.1.0.0, and added a the Android Project library into

  • 0

I downloaded the ActionBarSherlock version 4.1.0.0, and added a the Android Project library into Eclipse 4.2 on my Win7 java 1.6 update 24 machine. I used an Eclipse Project Build Target of Android 4.1 in Project | Properties | Project Build Target. I want to incorporate the ActionBar functionality into an existing app that has minSdkVersion=”7″. I noted the code from the ActionBarSherlock library appears to have some deprecated methods, and an error:

Example 1: ActionBarContainer.java, ActionBarContextView.java, ScrollingTabContainerView.java – uses setBackgroundDrawable – The method setBackgroundDrawable(Drawable) from the type View is deprecated

public ActionBarContainer(Context context, AttributeSet attrs) {
    super(context, attrs);

    setBackgroundDrawable(null);

    TypedArray a = context.obtainStyledAttributes(attrs,
            R.styleable.SherlockActionBar);
    mBackground = a.getDrawable(R.styleable.SherlockActionBar_background);
    mStackedBackground = a.getDrawable(
            R.styleable.SherlockActionBar_backgroundStacked);

    if (getId() == R.id.abs__split_action_bar) {
        mIsSplit = true;
        mSplitBackground = a.getDrawable(
                R.styleable.SherlockActionBar_backgroundSplit);
    }
    a.recycle();

    setWillNotDraw(mIsSplit ? mSplitBackground == null :
            mBackground == null && mStackedBackground == null);
}

Quick fix shows as Add @SupressWarnings ‘deprecation’ for ActionBarContainer

Example 2:
IcsProgressBar.java uses animationResolution which shows as deprecated, same quick fix as above

private static final int[] ProgressBar = new int[] {
    ...
    android.R.attr.animationResolution

Also, I have an error in ActivityChooserView.java:

private static class SetActivated {
    public static void invoke(View view, boolean activated) {
        view.setActivated(activated);
    }
}

Error is on SetActivated – Call requires API 11 (current min is 7). This makes sense based on the manifest:

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15"/>

Shouldn’t API 7 be fine, since Action Bar Sherlock should work at at Andriod 2.x? Have others experienced this, and if so, what is the recommended action? Supress/ignore the deprecation? What about the error on SetActivated? I reviewed the readme and did some net searches but did not come up with anything on this. Thanks for any suggestions.

Thanks!

  • 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-12T02:10:10+00:00Added an answer on June 12, 2026 at 2:10 am

    It is just fine. The code is 2.x compatible and even some methods are deprecated as of 4.x, they are still there. It also do not mean on 4.x these deprecated methods will be used. The source is 2.x-4.x so there’s no other way (not to mention reflection, but that’d hurt performance, and is for now not necessary). So it is safe to just ignore this. It would probably be better to turn depreciation off for certain files but it is not there. So do not worry.

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

Sidebar

Related Questions

I'm trying to create an ActionBarSherlock project, I've downloaded the library and connected it
I downloaded Android's Browser project (from git) and imported it to Eclipse. I cannot
I downloaded a sample project from net when I opened it its object library
I downloaded a KML file and tried to load it into my project, which
I downloaded example code of an Android project featuring AdMob ads from here .
Downloaded: Java EE Eclipse Indigo EE mySQL 5.5 From this point I have no
I downloaded and installed final version of Xcode 4. I opened my iPad project
I am having problems getting start with the ActionBarSherlock. I downloaded the 4.1.0 version
Downloaded latest eclipse for Java EE Opened... error .. opening...JRE/JDK must be available for
I downloaded a project from TouchMyPixel and when I try to run it with

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.