I've a tabbed-page with 5 view controllers as children. On Initialization the first children will appear,then if I navigate to other page and move back to the first page and again navigate to other page then the application is crashing.
Here is my Tabbed page:
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
android:TabbedPage.ToolbarPlacement="Bottom"
android:TabbedPage.BarItemColor="#66FFFFFF"
android:TabbedPage.BarSelectedItemColor="White"
BarBackgroundColor="#00abbf"
NavigationPage.HasNavigationBar="False"
x:Class="project.App.Common.Views.Dashboard.dashboardview">
</TabbedPage>
Here is my Tabbed page code behind:
var view1= new View1{ Icon= "icon.png" };
var view2 = new View2 { Icon = "icon.png" };
var view3= new View3 { Icon="icon.png" };
var view4= new View4 { Icon = "icon.png" };
var view5 = new View5 { Icon = "icon.png" };
Children.Add(view1);
Children.Add(view2);
Children.Add(view3);
Children.Add(view4);
Children.Add(view5);
On App start view1 is loaded and then I've go to view2 and navigate back to view1 and then again moved to view2 the application is crashing.
The crash log is:
No package identifier when getting name for resource number 0x00000005
No view found for id 0x5 (unknown) for fragment FragmentContainer{f99bdc5 #0 id=0x5 android:switcher:5:629936758}
Activity state:
Local Activity e5cedd4 State:
mResumed=true mStopped=false mFinished=false
mChangingConfigurations=false
mCurrentConfig={1.07 404mcc7mnc en_US ldltr sw360dp w360dp h616dp 240dpi nrml long port finger -keyb/v/h -nav/h s.370 themeId=0, affectGlobal:true}
mLoadersStarted=true
Active Fragments in 46948a7:
#0: ReportFragment{d210154 #0 android.arch.lifecycle.LifecycleDispatcher.report_fragment_tag}
mFragmentId=#0 mContainerId=#0 mTag=android.arch.lifecycle.LifecycleDispatcher.report_fragment_tag
mState=5 mIndex=0 mWho=android:fragment:0 mBackStackNesting=0
mAdded=true mRemoving=false mResumed=true mFromLayout=false mInLayout=false
mHidden=false mDetached=false mMenuVisible=true mHasMenu=false
mRetainInstance=false mRetaining=false mUserVisibleHint=true
mFragmentManager=FragmentManager{46948a7 in HostCallbacks{6d58fd}}
mHost=android.app.Activity$HostCallbacks@6d58fd
Child FragmentManager{5a29f2 in ReportFragment{d210154}}:
FragmentManager misc state:
mHost=android.app.Activity$HostCallbacks@6d58fd
mContainer=android.app.Fragment$1@257c843
mParent=ReportFragment{d210154 #0 android.arch.lifecycle.LifecycleDispatcher.report_fragment_tag}
mCurState=5 mStateSaved=false mDestroyed=false
Added Fragments:
#0: ReportFragment{d210154 #0 android.arch.lifecycle.LifecycleDispatcher.report_fragment_tag}
FragmentManager misc state:
mHost=android.app.Activity$HostCallbacks@6d58fd
mContainer=android.app.Activity$HostCallbacks@6d58fd
mCurState=5 mStateSaved=false mDestroyed=false
ViewRoot:
mAdded=true mRemoved=false
mConsumeBatchedInputScheduled=true
mConsumeBatchedInputImmediatelyScheduled=false
mPendingInputEventCount=0
mProcessInputEventsScheduled=false
mTraversalScheduled=true (barrier=76)
android.view.ViewRootImpl$NativePreImeInputStage: mQueueLength=0
android.view.ViewRootImpl$ImeInputStage: mQueueLength=0
android.view.ViewRootImpl$NativePostImeInputStage: mQueueLength=0
Choreographer:
mFrameScheduled=true
mLastFrameTime=119331759 (84 ms ago)
don't know why this is happening.I'm using XF 3.4.0 and the children are the normal content pages.
Can anyone please help me with this.
Thank you.
User contributions licensed under CC BY-SA 3.0