旋转后黑屏

时间:2016-07-19 14:03:13

标签: android android-fragments

我有Activity,里面有3 Fragments

我会这样:片段A - >片段B - >片段C - >片段A。

之后我做了旋转,而不是横向模式的应用程序,我看到没有任何东西的黑屏。

该应用程序没有反应或任何点击,没有崩溃,如果我点击后退按钮没有任何变化。只有对话框出现“应用程序无响应”

来自logcat的片段:

E/FragmentManager: No view found for id 0x7f0e01f5 (com.dvor.androidapp:id/productPageContainer) for fragment ProductDetailFragment{6297653 #2 id=0x7f0e01f5}
E/FragmentManager: Activity state:
D/FragmentManager:   Local FragmentActivity 5ba7b88 State:
D/FragmentManager:     mCreated=truemResumed=false mStopped=false mReallyStopped=false
D/FragmentManager:     mLoadersStarted=false
D/FragmentManager:   Active Fragments in 686ece7:
D/FragmentManager:     #0: HomeFragment{ed655df #0 id=0x7f0e007d HomeFragment}
D/FragmentManager:       mFragmentId=#7f0e007d mContainerId=#7f0e007d mTag=HomeFragment
D/FragmentManager:       mState=2 mIndex=0 mWho=android:fragment:0 mBackStackNesting=0
D/FragmentManager:       mAdded=true mRemoving=false mFromLayout=false mInLayout=false
D/FragmentManager:       mHidden=false mDetached=false mMenuVisible=true mHasMenu=false
D/FragmentManager:       mRetainInstance=true mRetaining=false mUserVisibleHint=true
D/FragmentManager:       mFragmentManager=FragmentManager{686ece7 in HostCallbacks{54b7094}}
D/FragmentManager:       mHost=android.support.v4.app.FragmentActivity$HostCallbacks@54b7094
D/FragmentManager:       mArguments=Bundle[{}]
D/FragmentManager:       mContainer=android.widget.RelativeLayout{3e4373d VFE...... ......I. 0,0-0,0 #7f0e007d app:id/main_container}
D/FragmentManager:       mView=com.tonicartos.widget.stickygridheaders.StickyGridHeadersGridView{72e4b32 VFED.VC.. ......I. 0,0-0,0 #7f0e0191 app:id/home_fragment_event_grid_view}
D/FragmentManager:       mInnerView=com.tonicartos.widget.stickygridheaders.StickyGridHeadersGridView{72e4b32 VFED.VC.. ......I. 0,0-0,0 #7f0e0191 app:id/home_fragment_event_grid_view}
D/FragmentManager:       Child FragmentManager{44b7083 in HomeFragment{ed655df}}:
D/FragmentManager:         FragmentManager misc state:
D/FragmentManager:           mHost=android.support.v4.app.FragmentActivity$HostCallbacks@54b7094
D/FragmentManager:           mContainer=android.support.v4.app.Fragment$1@8b90200
D/FragmentManager:           mParent=HomeFragment{ed655df #0 id=0x7f0e007d HomeFragment}
D/FragmentManager:           mCurState=2 mStateSaved=false mDestroyed=false
D/FragmentManager:     #1: null
D/FragmentManager:     #2: ProductDetailFragment{6297653 #2 id=0x7f0e01f5}
D/FragmentManager:       mFragmentId=#7f0e01f5 mContainerId=#7f0e01f5 mTag=null
D/FragmentManager:       mState=1 mIndex=2 mWho=android:fragment:2 mBackStackNesting=0
D/FragmentManager:       mAdded=true mRemoving=false mFromLayout=false mInLayout=false
D/FragmentManager:       mHidden=false mDetached=false mMenuVisible=true mHasMenu=false
D/FragmentManager:       mRetainInstance=true mRetaining=false mUserVisibleHint=true
D/FragmentManager:       mFragmentManager=FragmentManager{686ece7 in HostCallbacks{54b7094}}
D/FragmentManager:       mHost=android.support.v4.app.FragmentActivity$HostCallbacks@54b7094
D/FragmentManager:       mArguments=Bundle[{product-url=5-11-tactical-taclite-pro-pants-74273}]
D/FragmentManager:       mSavedFragmentState=Bundle[{android:view_state={2131624127=android.view.AbsSavedState$1@6f1e87e, 2131624128=android.widget.ProgressBar$SavedState@94a91df, 2131624141=Bundle[{instanceState=android.view.AbsSavedState$1@6f1e87e, isActive=true}], 2131624142=android.view.AbsSavedState$1@6f1e87e, 2131624143=android.view.AbsSavedState$1@6f1e87e, 2131624144=android.view.AbsSaved
D/FragmentManager:       mSavedViewState={2131624127=android.view.AbsSavedState$1@6f1e87e, 2131624128=android.widget.ProgressBar$SavedState@94a91df, 2131624141=Bundle[{instanceState=android.view.AbsSavedState$1@6f1e87e, isActive=true}], 2131624142=android.view.AbsSavedState$1@6f1e87e, 2131624143=android.view.AbsSavedState$1@6f1e87e, 2131624144=android.view.AbsSavedState$1@6f1e87e, 2131624145=and
D/FragmentManager:     #3: GalleryPageFragment{fb51118 #3 id=0x7f0e01ce}
D/FragmentManager:       mFragmentId=#7f0e01ce mContainerId=#7f0e01ce mTag=null
D/FragmentManager:       mState=1 mIndex=3 mWho=android:fragment:3 mBackStackNesting=0
D/FragmentManager:       mAdded=true mRemoving=false mFromLayout=false mInLayout=false
D/FragmentManager:       mHidden=false mDetached=false mMenuVisible=true mHasMenu=false
D/FragmentManager:       mRetainInstance=false mRetaining=false mUserVisibleHint=false
D/FragmentManager:       mFragmentManager=FragmentManager{686ece7 in HostCallbacks{54b7094}}
D/FragmentManager:       mHost=android.support.v4.app.FragmentActivity$HostCallbacks@54b7094
D/FragmentManager:       mArguments=Bundle[{com.hannesdorfmann.fragmentargs.custom.bundler.2312A478rand.position=true, com.hannesdorfmann.fragmentargs.custom.bundler.2312A478rand.product=true, product=com.opticsplanet.opcart.commons.legacy.models.product.Product$$Parcelable@bddc771, position=org.parceler.NonParcelRepository$IntegerParcelable@2988956}]
D/FragmentManager:       mSavedFragmentState=Bundle[{android:user_visible_hint=false, android:view_state={2131624127=android.view.AbsSavedState$1@6f1e87e, 2131624128=android.widget.ProgressBar$SavedState@34eddd7, 2131624412=android.view.AbsSavedState$1@6f1e87e, 2131624413=android.view.AbsSavedState$1@6f1e87e, 2131624414=android.view.AbsSavedState$1@6f1e87e}}]
D/FragmentManager:       mSavedViewState={2131624127=android.view.AbsSavedState$1@6f1e87e, 2131624128=android.widget.ProgressBar$SavedState@34eddd7, 2131624412=android.view.AbsSavedState$1@6f1e87e, 2131624413=android.view.AbsSavedState$1@6f1e87e, 2131624414=android.view.AbsSavedState$1@6f1e87e}
D/FragmentManager:     #4: GalleryPageFragment{b7626c4 #4 id=0x7f0e01ce}
D/FragmentManager:       mFragmentId=#7f0e01ce mContainerId=#7f0e01ce mTag=null
D/FragmentManager:       mState=1 mIndex=4 mWho=android:fragment:4 mBackStackNesting=0
D/FragmentManager:       mAdded=true mRemoving=false mFromLayout=false mInLayout=false
D/FragmentManager:       mHidden=false mDetached=false mMenuVisible=true mHasMenu=false
D/FragmentManager:       mRetainInstance=false mRetaining=false mUserVisibleHint=true
D/FragmentManager:       mFragmentManager=FragmentManager{686ece7 in HostCallbacks{54b7094}}
D/FragmentManager:       mHost=android.support.v4.app.FragmentActivity$HostCallbacks@54b7094
D/FragmentManager:       mArguments=Bundle[{com.hannesdorfmann.fragmentargs.custom.bundler.2312A478rand.position=true, com.hannesdorfmann.fragmentargs.custom.bundler.2312A478rand.product=true, product=com.opticsplanet.opcart.commons.legacy.models.product.Product$$Parcelable@b669ad, position=org.parceler.NonParcelRepository$IntegerParcelable@aabe4e2}]
D/FragmentManager:       mSavedFragmentState=Bundle[{android:view_state={2131624127=android.view.AbsSavedState$1@6f1e87e, 2131624128=android.widget.ProgressBar$SavedState@3b98073, 2131624412=android.view.AbsSavedState$1@6f1e87e, 2131624413=android.view.AbsSavedState$1@6f1e87e, 2131624414=android.view.AbsSavedState$1@6f1e87e}}]
D/FragmentManager:       mSavedViewState={2131624127=android.view.AbsSavedState$1@6f1e87e, 2131624128=android.widget.ProgressBar$SavedState@3b98073, 2131624412=android.view.AbsSavedState$1@6f1e87e, 2131624413=android.view.AbsSavedState$1@6f1e87e, 2131624414=android.view.AbsSavedState$1@6f1e87e}
D/FragmentManager:   Added Fragments:
D/FragmentManager:     #0: ProductDetailFragment{6297653 #2 id=0x7f0e01f5}
D/FragmentManager:     #1: GalleryPageFragment{b7626c4 #4 id=0x7f0e01ce}
D/FragmentManager:     #2: GalleryPageFragment{fb51118 #3 id=0x7f0e01ce}
D/FragmentManager:     #3: HomeFragment{ed655df #0 id=0x7f0e007d HomeFragment}
D/FragmentManager:   FragmentManager misc state:
D/FragmentManager:     mHost=android.support.v4.app.FragmentActivity$HostCallbacks@54b7094
D/FragmentManager:     mContainer=android.support.v4.app.FragmentActivity$HostCallbacks@54b7094
D/FragmentManager:     mCurState=2 mStateSaved=false mDestroyed=false
D/FragmentManager:     mAvailIndices: [1]
D/FragmentManager:   View Hierarchy:
D/FragmentManager:     com.android.internal.policy.PhoneWindow$DecorView{710eb30 V.E..... ... 0,0-0,0}
D/FragmentManager:       android.widget.LinearLayout{fcf3a9 V.E..... ... 0,0-0,0}
D/FragmentManager:         android.view.ViewStub{ba76d2e G.E..... ... 0,0-0,0 #10203ab android:id/action_mode_bar_stub}
D/FragmentManager:         android.widget.FrameLayout{921b0cf V.E..... ... 0,0-0,0 #1020002 android:id/content}
D/FragmentManager:           android.support.v4.widget.DrawerLayout{6518a5c VFE..... ... 0,0-0,0 #7f0e0079 app:id/main_drawer_layout}
D/FragmentManager:             android.widget.FrameLayout{8082165 V.E..... ... 0,0-0,0 #7f0e007a app:id/allContainer}
D/FragmentManager:               com.dvor.androidapp.views.CheckoutHeader{ec12e3a V.E..... ... 0,0-0,0 #7f0e007b app:id/checkoutHeader}
D/FragmentManager:                 android.widget.RelativeLayout{f328aeb V.E..... ... 0,0-0,0}
D/FragmentManager:                   android.widget.RelativeLayout{b9af048 V.E..... ... 0,0-0,0 #7f0e00d7 app:id/headerContainer}
D/FragmentManager:                     android.widget.TextView{5de6ee1 V.ED.... ... 0,0-0,0 #7f0e00d8 app:id/shoppingCartInfo}
D/FragmentManager:                     android.widget.Button{883f406 VFED..C. ... 0,0-0,0 #7f0e00da app:id/checkoutButton}
D/FragmentManager:                     android.widget.TextView{72ceac7 V.ED.... ... 0,0-0,0 #7f0e00d9 app:id/cartIcon}
D/FragmentManager:                   org.lucasr.twowayview.TwoWayView{a92c8f4 V.ED..C. ... 0,0-0,0 #7f0e00db app:id/checkout_list_view}
D/FragmentManager:               android.widget.RelativeLayout{a72181d V.E...C. ... 0,0-0,0 #7f0e007c app:id/main_center_layout}
D/FragmentManager:                 android.widget.RelativeLayout{3e4373d VFE..... ... 0,0-0,0 #7f0e007d app:id/main_container}
D/FragmentManager:                   com.tonicartos.widget.stickygridheaders.StickyGridHeadersGridView{72e4b32 VFED.VC. ... 0,0-0,0 #7f0e0191 app:id/home_fragment_event_grid_view}
D/FragmentManager:                 com.dvor.androidapp.views.DefaultHeading{95b4a92 V.E..... ... 0,0-0,0 #7f0e007e app:id/default_heading_view}
D/FragmentManager:                   android.widget.RelativeLayout{b836c63 V.E..... ... 0,0-0,0}
D/FragmentManager:                     android.widget.LinearLayout{98d8060 V.E..... ... 0,0-0,0 #7f0e0106 app:id/logo_container}
D/FragmentManager:                       android.widget.ImageView{89d1919 V.ED.... ... 0,0-0,0 #7f0e0107 app:id/default_header_dvor_logo}
D/FragmentManager:                     android.widget.TextView{adf7dde V.ED..C. ... 0,0-0,0 #7f0e0108 app:id/default_header_menu_btn}
D/FragmentManager:                     android.widget.TextView{1366bbf V.ED.... ... 0,0-0,0 #7f0e0109 app:id/default_header_credits_label}
D/FragmentManager:                     android.view.View{dba428c V.ED.... ... 0,0-0,0 #7f0e010a app:id/default_header_dvor_logo_placeholder}
D/FragmentManager:                     android.widget.LinearLayout{cdd2dd5 V.E..... ... 0,0-0,0 #7f0e010b app:id/right_control}
D/FragmentManager:                       android.widget.ImageView{5e199ea G.ED..C. ... 0,0-0,0 #7f0e010c app:id/share}
D/FragmentManager:                       android.widget.TextView{2f004db V.ED..C. ... 0,0-0,0 #7f0e00d9 app:id/cartIcon}
D/FragmentManager:                       android.widget.ImageView{e0efb78 G.ED..C. ... 0,0-0,0 #7f0e010d app:id/redX}
D/FragmentManager:                     com.dvor.androidapp.views.SearchView{3cfd251 V.E..... ... 0,0-0,0 #7f0e010e app:id/search}
D/FragmentManager:                       android.widget.RelativeLayout{d376ab6 V.E..... ... 0,0-0,0 #7f0e0274 app:id/search_container}
D/FragmentManager:                         android.widget.ImageView{1e013b7 V.ED.... ... 0,0-0,0 #7f0e0275 app:id/imageView6}
D/FragmentManager:                         android.widget.AutoCompleteTextView{8f45724 VFED..CL ... 0,0-0,0 #7f0e0276 app:id/autoText}
D/FragmentManager:                         android.widget.ImageView{c6e428d G.ED..C. ... 0,0-0,0 #7f0e0277 app:id/clear}
D/FragmentManager:             com.dvor.androidapp.views.menu.DefaultMenu{9477c42 V.E..... ... 0,0-0,0 #7f0e007f app:id/main_left_drawer}
D/FragmentManager:               android.widget.RelativeLayout{8583453 V.E..... ... 0,0-0,0}
D/FragmentManager:                 android.widget.TextView{8b1c190 V.ED.... ... 0,0-0,0 #7f0e010f app:id/default_menu_welcome_label}
D/FragmentManager:                 android.view.View{2097a89 V.ED.... ... 0,0-0,0 #7f0e0110 app:id/default_menu_divider}
D/FragmentManager:                 android.widget.TextView{551a8e V.ED.... ... 0,0-0,0 #7f0e0111 app:id/default_menu_application_version}
D/FragmentManager:                 android.widget.ExpandableListView{a27c2af VFED.VC. ... 0,0-0,0 #7f0e0112 app:id/default_menu_list_view}
D/FragmentManager:                 android.view.View{29966bc V.ED.... ... 0,0-0,0 #7f0e0113 app:id/default_menu_vertical_divider}
D/FragmentManager:                 android.widget.Button{a063645 VFED..C. ... 0,0-0,0 #7f0e0114 app:id/default_menu_close_button}
D/AndroidRuntime: Shutting down VM

片段A - HomeFragment

片段B - ProductDetailFragment

片段C - GalleryPageFragment

我不明白它是什么意思以及如何解决它,也许我需要明确的背板?

0 个答案:

没有答案