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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:24:16+00:00 2026-06-09T04:24:16+00:00

I use the last SDK to create an app with navigation type Tabs +

  • 0

I use the last SDK to create an app with navigation type Tabs + Swipe and I want to put a PreferenceFragment on one of the tabs.

The generated code is like :

mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());

// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mSectionsPagerAdapter);

Meanwhile, I can’t add PreferenceFragment on the SectionsPagerAdapter because its method getItem(int position) returns a Fragment, not a FragmentActivity.

I may need some help right here.

  • 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-09T04:24:19+00:00Added an answer on June 9, 2026 at 4:24 am

    The issue is that ViewPager’s getItem(..) method returns a support Fragment (i.e. android.support.v4.app.Fragment) rather than android.app.Fragment, which is what PreferenceFragments extend. Basically, a PreferenceFragment uses the non-support version of the APIs and so is incompatible with ViewPagers, and there is no support version of PreferenceFragment available.

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

Sidebar

Related Questions

I want to obtain last links from specific user account. I use this code:
I want to use the last version of rails, in my Gemfile: gem 'rails',
I want to use the Restore last session function in firefox, on my own
I want to use greasemonkey to scrape wiki data from Last.fm (this is not
I've got a problem with the facebook PHP-SDK in my oauth2 app. I use
I'm trying to use the Last.fm API for an application I'm creating, but am
Is it possible to use the :first and :last selectors with jQuery's on selector?
What should I use: /findby/name/{first}_{last} /findby/name/{first}-{last} /findby/name/{first};{last} /findby/name/first/{first}/last/{last} etc. The URI represents a Person
I am trying to use highcharts to show some data over the last 24
I have spent the last couple of days to use Core Plot for 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.