Binding Issue with Android.Support.V4.Widget.ExploreByTouchHelper.GetVisibleVirtualViews

wootwoot USMember

Hi,

I'm trying to bind to the library (https://github.com/CiTuX/datetimepicker) to get a material styled date time picker. I've built the aar file, but when I try to create the Xamarin binding, I get the following error:

Com.Android.Datetimepicker.Date.MonthView.cs(743,36,743,56): error CS0534: 'Com.Android.Datetimepicker.Date.MonthView.MonthViewTouchHelper' does not implement inherited abstract member 'Android.Support.V4.Widget.ExploreByTouchHelper.GetVisibleVirtualViews(System.Collections.Generic.IList<Java.Lang.Integer>)'

I'm not quite sure how to go about fixing this, if anyone has any pointers, any help would be greatly appreciated, thanks!

Thanks,
Tommy

Tagged:

Best Answer

Answers

  • wootwoot USMember

    Not sure if this will help, but the generated code contains this - is it possible it's just a naming issue?

    static Delegate cb_getVisibleVirtualViews_Ljava_util_List_;
    
                static Delegate GetGetVisibleVirtualViews_Ljava_util_List_Handler ()
                {
                    if (cb_getVisibleVirtualViews_Ljava_util_List_ == null)
                        cb_getVisibleVirtualViews_Ljava_util_List_ = JNINativeWrapper.CreateDelegate ((Action<IntPtr, IntPtr, IntPtr>) n_GetVisibleVirtualViews_Ljava_util_List_);
                    return cb_getVisibleVirtualViews_Ljava_util_List_;
                }
    
                static void n_GetVisibleVirtualViews_Ljava_util_List_ (IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
                {
                    global::Com.Android.Datetimepicker.Date.MonthView.MonthViewTouchHelper __this = global::Java.Lang.Object.GetObject<global::Com.Android.Datetimepicker.Date.MonthView.MonthViewTouchHelper> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
                    System.Collections.Generic.IList<Java.Lang.Integer> p0 = global::Android.Runtime.JavaList<global::Java.Lang.Integer>.FromJniHandle (native_p0, JniHandleOwnership.DoNotTransfer);
                    __this.GetVisibleVirtualViews (p0);
                }
    
                static IntPtr id_getVisibleVirtualViews_Ljava_util_List_;
                // Metadata.xml XPath method reference: path="/api/package[@name='com.android.datetimepicker.date']/class[@name='MonthView.MonthViewTouchHelper']/method[@name='getVisibleVirtualViews' and count(parameter)=1 and parameter[1][@type='java.util.List']]"
                [Register ("getVisibleVirtualViews", "(Ljava/util/List;)V", "GetGetVisibleVirtualViews_Ljava_util_List_Handler")]
                protected virtual void GetVisibleVirtualViews (global::System.Collections.Generic.IList<global::Java.Lang.Integer> p0)
                {
                    if (id_getVisibleVirtualViews_Ljava_util_List_ == IntPtr.Zero)
                        id_getVisibleVirtualViews_Ljava_util_List_ = JNIEnv.GetMethodID (class_ref, "getVisibleVirtualViews", "(Ljava/util/List;)V");
                    IntPtr native_p0 = global::Android.Runtime.JavaList<global::Java.Lang.Integer>.ToLocalJniHandle (p0);
    
                    if (GetType () == ThresholdType)
                        JNIEnv.CallVoidMethod  (Handle, id_getVisibleVirtualViews_Ljava_util_List_, new JValue (native_p0));
                    else
                        JNIEnv.CallNonvirtualVoidMethod  (Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "getVisibleVirtualViews", "(Ljava/util/List;)V"), new JValue (native_p0));
                    JNIEnv.DeleteLocalRef (native_p0);
                }
    
Sign In or Register to comment.