Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in MvxAppCompatDialogFragment<T> #2220

Closed
erviem99 opened this issue Sep 24, 2017 · 2 comments
Closed

Exception in MvxAppCompatDialogFragment<T> #2220

erviem99 opened this issue Sep 24, 2017 · 2 comments
Labels
p/android Android platform t/bug Bug type
Milestone

Comments

@erviem99
Copy link

erviem99 commented Sep 24, 2017

An instance of the above class will throw an exception with the new Android View Presenter.

Steps to reproduce

  1. Create a class of type MvxAppCompatDialogFragment<>. Decorate with [MvxDialogFragmentPresentation]

  2. Show and await the dialog using the new Navigation Service functions

  3. Close the dialog by calling Close(somevaluetoreturn)

Expected behavior

The "somevaluetoreturn" should be returned to the awaited caller

Actual behavior

Exception is thrown

No constructor found for Weighin.Android.Views.LoginFragment::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)

Configuration

Version: 5.2

Platform:

  • [ x] Android

It would appear to me that the implementation of MvxAppCompatDialogFragment<> is missing the protected constructor MvxAppCompatDialogFragment (IntPtr javaReference, JniHandleOwnership transfer)

@martijn00
Copy link
Contributor

I've fixed this in #2221 but i think as a workaround you can add this ctor to your own FragmentDialog.

@erviem99
Copy link
Author

Implementing the ctor myself would require that I somehow could call the ctor on AppCompatDialogFragment (above base) directly from my own fragment. I don't think that is possible in c#.

@martijn00 martijn00 added this to the 5.2.1 milestone Sep 25, 2017
@Cheesebaron Cheesebaron added p/android Android platform t/bug Bug type labels Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p/android Android platform t/bug Bug type
Development

No branches or pull requests

3 participants