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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:13:12+00:00 2026-06-05T20:13:12+00:00

I create one example in Android 3.0 and I use the fragment in it.

  • 0

I create one example in Android 3.0 and I use the fragment in it. when I change the mode landscape to portrait or viseversa it give me the error as following but when I comment the fragment calling part it works smoothly as per my changes. for this I create layout-land folder and put may xml file with changes.

does any one have a hint or solution or example for match with this?

this is my fragment:

 <fragment 
            class="com.Organisemee.fragment.TaskListFragment"
            android:id="@+id/tasklistfrag"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

And this is error:

07-01 12:38:33.363: ERROR/AndroidRuntime(641): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Organisemee/com.Organisemee.OrganisemeeList}: android.view.InflateException: Binary XML file line #167: Error inflating class fragment
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1736)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1752)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3096)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.app.ActivityThread.access$1600(ActivityThread.java:123)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:997)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.os.Looper.loop(Looper.java:126)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.app.ActivityThread.main(ActivityThread.java:3997)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at java.lang.reflect.Method.invokeNative(Native Method)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at java.lang.reflect.Method.invoke(Method.java:491)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at dalvik.system.NativeStart.main(Native Method)
07-01 12:38:33.363: ERROR/AndroidRuntime(641): Caused by: android.view.InflateException: Binary XML file line #167: Error inflating class fragment
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:688)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:727)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:224)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.app.Activity.setContentView(Activity.java:1777)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at com.Organisemee.OrganisemeeList.onCreate(OrganisemeeList.java:73)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1700)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     ... 12 more
07-01 12:38:33.363: ERROR/AndroidRuntime(641): Caused by: java.lang.IllegalStateException: Fragment com.Organisemee.fragment.TaskListFragment did not create a view.
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.app.Activity.onCreateView(Activity.java:4114)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:664)
07-01 12:38:33.363: ERROR/AndroidRuntime(641):     ... 22 more

this is mt layout folder image

  • 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-05T20:13:13+00:00Added an answer on June 5, 2026 at 8:13 pm

    Need to define a Fragment in XML Like This.

    <RelativeLayout 
    android:id="@+id/main_tasklist_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_toRightOf="@+id/main_viewmenu_layout"
    android:layout_below="@+id/main_tasklist_outer">
    
     <fragment 
            class="com.Organisemee.fragment.TaskListFragment"
            android:id="@+id/tasklistfrag"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
    
    </RelativeLayout> 
    

    To Call the Fragment put this code in java file

                Fragment f = listFragment();
                FragmentTransaction ListFragft = getFragmentManager().beginTransaction();
                ListFragft.replace(R.id.main_tasklist_layout, f);
                ListFragft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
                ListFragft.addToBackStack(null);
                ListFragft.commit();
    

    This Works fine in change both orientation, landscape to portrait and vice versa.

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

Sidebar

Related Questions

I want to create one proc like below but it has error on syntax.
How can I create one query using both ICriteria and Linq? Example: var q
In this example I create three buttons 'one' 'two' 'three'. When clicked I want
Does startService() create a new Service instance or using the existing one? For example,
If create a static button in one activity and use in another activity it
For some reasons I can't use xml layout files. But I need to create
I would like to use the library ActionBarSherlock in one of my projects, but
I am developing an android application. Now i have created one function which create
for example: I have created one javascript property array model with some properties like
I create one table by using jquery : <div class=productlist style=float:left; id=productlist> <script type=text/javascript

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.