|
Control
<?xml version="1.0" encoding="UTF-8" ?>
<sfPopup:SfPopupLayout
x:Class="PopupDemo.CustomPop"
xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
x:Name="ctrlPopupLayout"
Closed="ctrlPopupLayout_Closed"
BackgroundColor="Transparent"
Padding="0,0,10,0">
<sfPopup:SfPopupLayout.PopupView >
<sfPopup:PopupView
AnimationMode="Zoom"
ShowFooter="False"
ShowHeader="False"
AutoSizeMode="Height"
BackgroundColor="Transparent"
AppearanceMode="OneButton" >
<sfPopup:PopupView.PopupStyle>
<sfPopup:PopupStyle OverlayColor="Transparent" OverlayOpacity="0" BorderColor="Transparent" BorderThickness="0">
</sfPopup:PopupStyle>
</sfPopup:PopupView.PopupStyle>
<sfPopup:PopupView.ContentTemplate>
<DataTemplate>
<Label Text="This is SfPopupLayout" BackgroundColor="SkyBlue"
HorizontalTextAlignment="Center"/>
</DataTemplate>
</sfPopup:PopupView.ContentTemplate>
</sfPopup:PopupView>
</sfPopup:SfPopupLayout.PopupView>
</sfPopup:SfPopupLayout>
Page
<?xml version="1.0" encoding="utf-8" ?>
mc:Ignorable="d"
xmlns:controls="clr-namespace:PopupDemo;assembly=PopupDemo"
xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
x:Class="PopupDemo.MainPage">
<StackLayout>
<Button Text="Open" Clicked="ClickToShowPopup_Clicked"/>
<controls:CustomPop x:Name="PopUp"/>
</StackLayout>
</ContentPage>
|
We have some news about this problem.
We found that every time the Show method of popup was called, and it has not already finished its work, i.e. because the popup is creating the animation, and in the meantime we called a navigation to another page, i.e. tapping on another tab in the shell, the popup crashes with this stacktrace:
05-08 16:43:25.657 I/MonoDroid( 5789): UNHANDLED EXCEPTION:
05-08 16:43:25.658 I/MonoDroid( 5789): System.NullReferenceException: Object reference not set to an instance of an object.
05-08 16:43:25.658 I/MonoDroid( 5789): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.123(intptr,intptr,bool,int,int,int,int)
05-08 16:43:25.658 I/MonoDroid( 5789): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.123(intptr,intptr,int,int,int,int,int)
05-08 16:43:25.658 I/MonoDroid( 5789): at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a(intptr,intptr&,intptr,intptr,intptr,intptr)
05-08 16:43:25.658 I/MonoDroid( 5789): at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00079] in <26521a5118b44c858c385715922b9d5d>:0
05-08 16:43:25.658 I/MonoDroid( 5789): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0005d] in <26521a5118b44c858c385715922b9d5d>:0
05-08 16:43:25.658 I/MonoDroid( 5789): at Android.Widget.LinearLayout.OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x00079] in <4ccdb3137d974856b786e1aeebbfbab6>:0
05-08 16:43:25.658 I/MonoDroid( 5789): at Syncfusion.XForms.Android.PopupLayout.PopupView.OnLayout (System.Boolean changed, System.Int32 left, System.Int32 top, System.Int32 right, System.Int32 bottom) [0x00000] in <e84e062dd9b74317bc54be79266539eb>:0
05-08 16:43:25.658 I/MonoDroid( 5789): at Android.Widget.LinearLayout.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x00009] in <4ccdb3137d974856b786e1aeebbfbab6>:0
05-08 16:43:25.658 I/MonoDroid( 5789): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.119(intptr,intptr,bool,int,int,int,int)
I already tried to check if the Popup instance is not null before call the Show, but it doesn't help, because the popup object is not already disposed, but probably something in its implementation do.
You can see attached here a screenshot of what I see on the screen when the crash happens, the popup hasn't finished to show but I already tapped on a new page.
I tried with your custom libraries provided but the problem is not solved.