2014-07-01 40 views
7

Xamarin'de, View.IOnTouchListener arabirimini uygulayan bir sınıfı kodladım. İşte View.IOnTouchListener arabiriminin uygulanması

benim kodudur:

doğrusu throw new NotImplementedException() kodu yerine, IDisposable.Dispose ve Android.Runtime.IJavaObject.Handle kod öğeleri için ihtiyacım var hangi değerleri
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(); 
     } 
    } 
} 

? peşin

Teşekkür

cevap

15
Bunu Kolu uygulamak ve herhangi bir Java arayüzünü uygulamak ne zaman yapmalısınız

imha edecek bu

public class OnTouchListener : Java.Lang.Object, View.IOnTouchListener 

gibi OnTouchListener içinde java.lang.Object alması gerektiğini