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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:23:01+00:00 2026-06-15T03:23:01+00:00

I need to show a preferences screen from my application. I’ve managed to implement

  • 0

I need to show a preferences screen from my application. I’ve managed to implement this and it works on Ice-Cream Sandwich and newer devices but doesn’t work on older devices like Gingebread and Froyo. I’m using ActionBarSherlock as a compatibility library to support older devices.

Here’s the code for the Activity that contains the preference screen:

public class Settings extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);    
        getFragmentManager().beginTransaction()
                .replace(android.R.id.content, new Preferences())
                .commit();
    }

}

This is the sample code from my activity that invokes the preferences screen:

public class Trend extends SherlockActivity {

    @Override
    public boolean onOptionsItemSelected(MenuItem itmMenuitem) {
        if (itmMenuitem.getItemId() == R.id.search) {
            startActivity(new Intent(getBaseContext(), Settings.class));
            return true;
        }
    }

}

When users try and open the preferences screen on older devices, I get an exception that reads:

java.lang.NoSuchMethodError: com.mridang.stupidapp.Settings.getFragmentManager
at com.mridang.stupidapp.Settings.onCreate(Settings.java:15)

How should I modify my preferences screen to work with older devices i.e. API 8? 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-15T03:23:02+00:00Added an answer on June 15, 2026 at 3:23 am

    Neither ActionBarSherlock nor the Android Support Library provides support for Preference Fragments.

    You need to revert to Perference Activities as explained in the Settings Documentation.

    There are a few old questions that discuss the same topic:

    • PreferenceActivity Android 4.0 and earlier
    • Was PreferenceFragment intentionally excluded from the compatibility package?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to show a form exactly in front of another form, this lead
I need to show a UIActionSheet on a popover and this popover has an
in my app next to the splash screen i need to show an activity
I need show a notication modal window.. But since its a fluid layout the
me again... I need show 10 or 20 or 50 results number of results
I need to show for every link, dynamically some text with Java-Script (jQuery). The
I need to show a div positioned relative to where the link is that
I need to show non available dates in different color based on the event
I need to show more than one report on a Page like Classic Report,
I need to show a form using a button, and hide it when the

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.