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.
…….
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