我有这个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的代码行吗? –