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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:32:57+00:00 2026-06-13T07:32:57+00:00

I have a FragmentActivity this activity has a Fragment this Fragment consist from widgets

  • 0

I have a FragmentActivity this activity has a Fragment this Fragment consist from widgets and fragment which is defined in xml.

When I start the activity it crashes

10-19 13:27:57.470: E/AndroidRuntime(16701): android.view.InflateException: Binary XML file line #43: Error inflating class fragment

Is it posible to have nested fragments, or I can put fragments only in FragmentActivity?

EDIT:
this is xml of fragment which is located in FragmentActivity ViewPager

Programm crashes in this file on inflating

        <com.ssbs.sw.SWE.widget.SeekBarWidget
            android:id="@+id/pa_outlet_characteristics_trading_stocks"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:max="999999"
            android:text="@string/label_outlet_characteristics_trading_stocks" />

        <fragment
            android:id="@+id/pa_outlet_characteristics_spinners"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            class="com.ssbs.sw.SWE.pure.outlet.pages.characteristics.view.components.SpinnersFragment"
            tools:layout="@layout/pf_characteristics_custperday_spinner" />

        <com.ssbs.sw.SWE.widget.SpinnerWidget
            android:id="@+id/pa_outlet_characteristics_proximity_factor"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="?spinerBackground"
            widget:label="@string/label_outlet_characteristics_proximity_factor"
            widget:popupDialogTheme="@style/ActivityDialog"
            widget:spinnerTemplate="@layout/widget_spinner" />

UPDATE

Support of nested fragments was added in support library from 11 version

Support Package, revision 11 (November 2012)
Changes for v4 support library:
User Interface
Added support for nested Fragment classes.
Added improvements to FragmentManager debugging.
…….

Nested Fragments documentation

  • 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-13T07:32:58+00:00Added an answer on June 13, 2026 at 7:32 am

    With the support API I don’t know but normally it’s not possible to create nested fragment : you can create a fragment from another one, but this fragment will communicate only with the Activity that created the original fragment (if it’s not clear, tell me)

    EDIT :

    As for why it crashes, if it’s not a nested fragment, I don’t have a clue. Maybe you should try creating it and adding it to your layout programmatically

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

Sidebar

Related Questions

In my Android application, I have a fragment activity which it has a progressbar.
I have a fragment where I wish to call a method from the FragmentActivity
I have a FragmentActivity with a FragmentPagerAdapter which holds a number of Fragment objects
I have a Fragment activity that has a ListFragment on the left and a
Using android-support-v4.jar and FragmentActivity (no fragments at this point) I have an AsyncTaskLoader which
I have Mainactivity which extend FragmentActivity ,I am loading fragment in layout using LinearLayout
I have class that extend FragmentActivity in it I add fragment to layout as
have written this little class, which generates a UUID every time an object of
I am using fragments to show images/pages.I have one Activity(Main) which contains all the
I have some trouble with fragment I got an error that says: Binary XML

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.