How to manage oriantation in landscap and portrait using fragment
<p>i crate 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.</p>

<p>does any one have a hint or solution or example for match with this?</p>

<p>this is my fragment:</p>

<pre><code> &lt;fragment 
            class="com.Organisemee.fragment.TaskListFragment"
            android:id="@+id/tasklistfrag"
            android:layout_width="match_parent"
            android:layout_height="match_parent" /&gt;
</code></pre>

<p>And this is error:</p>

<pre><code>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
</code></pre>

<p><img src="http://i.stack.imgur.com/sJc32.png" alt="this is mt layout folder image"></p>
