我有這個XML調用的setContentView的活動:片段,DialogFragment,以及屏幕旋轉
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
>
<fragment android:name="org.vt.indiatab.GroupFragment"
android:id="@+id/home_groups"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" />
<..some other fragments ...>
</LinearLayout>
的GroupFragment延伸片段,一切都很好那裏。但是,我在GroupFragment中顯示了一個DialogFragment。這顯示正確,但是當屏幕旋轉時,我得到一個強制關閉。
從DialogFragment.show(FragmentManager,String)以外的其他Fragment中顯示DialogFragment的正確方法是什麼?
你能提供力閉合的堆棧跟蹤? – NPike
你可以發佈實例化DialogFragment的代碼行嗎? –