In Xamarin, I have coded a class that implements the View.IOnTouchListener
interface.
Here is my code:
public class OnTouchListener : View.IOnTouchListener
{
public bool OnTouch (View v, MotionEvent e)
{
return true;
}
void IDisposable.Dispose ()
{
throw new NotImplementedException ();
}
IntPtr Android.Runtime.IJavaObject.Handle {
get {
throw new NotImplementedException ();
}
}
}
What values do I need for the IDisposable.Dispose
and Android.Runtime.IJavaObject.Handle
code items, rather than the throw new NotImplementedException ()
code?
Thanks in advance
To create an interface view, click Interface on the File > New menu, or right-click on the Server Explorer and click Interface on the New menu. The definition of the interface will be populated with the fields of the selected view. The Interface View wizard has three tabs: Definition: in this tab you can configure the definition of the view:
Interface views are a special type of views that consist only of a definition of fields and a reference to another view. You can use them to do top-down design where you first define the fields of the interface and at a later stage, associate the “implementation view” of the interface.
The fields of the interface views do not have their own “Source type properties”. At runtime, Virtual DataPort propagates these properties from the implementation view to the interface view. Thus if the implementation view changes, the properties of the fields of the interface view will change as well.
Therefore, the operations that can be executed on an interface view ( SELECT, INSERT, UPDATE or DELETE) are the same that can be performed on its implementation view. The status of an interface view can be: Ok: all the fields of the interface view have a valid “implementation expression”. The queries involving this view will work.
You should inherit Java.Lang.Object in your OnTouchListener like this
public class OnTouchListener : Java.Lang.Object, View.IOnTouchListener
it will implement Handle and Dispose
you should do this whenever implement any Java interface
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With