Вопрос по android-layout, android – MonoDroid: ошибка при вызове конструктора пользовательского представления - TwoDScrollView

41

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

System.NotSupportedException has been thrown. Unable to activate instance of type MyProject.TwoDScrollView from native handle 44f4d310.

System.Exception: No constructor found for MyProject.TwoDScrollView::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ......with more text that follows....

Error: User Rate Limit Exceeded

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"  
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >

<myproject.TwoDScrollView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

</myproject.TwoDScrollView>

</RelativeLayout>

Error: User Rate Limit Exceededhttp://docs.xamarin.com/android/advanced_topics/using_custom_views_in_a_layout

Error: User Rate Limit Exceeded

public TwoDScrollView(Context context) 
    : base(context)
{
    initTwoDScrollView();
}

public TwoDScrollView(Context context, IAttributeSet attrs) 
    : base(context, attrs)
{
    initTwoDScrollView();
}

public TwoDScrollView(Context context, IAttributeSet attrs, int defStyle) 
    : base(context, attrs, defStyle)
{
    initTwoDScrollView();
}

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Ваш Ответ

4   ответа
80

using System;

class Base {
    public Base ()
    {
        Console.WriteLine ("Base..ctor");
        M ();
    }

    public virtual void M ()
    {
        Console.WriteLine ("Base.M");
    }
}

class Derived : Base {

    public Derived ()
    {
        Console.WriteLine ("Derived..ctor");
    }

    public override void M ()
    {
        Console.WriteLine ("Derived.M");
    }
}

static class Demo {
    public static void Main ()
    {
        new Derived ();
    }
}

Base..ctor
Derived.M
Derived..ctor

Derived.M()Derived

. Howeverbefore there is a C# instance to invoke the method upon!

TextView constructor invokes the getDefaultMovementMethod() methodLogTextBox.DefaultMovementMethodLogTextBox

typegetDefaultMovementMethod()(IntPtr, JniHandleOwnership)

TextViewLogTextBoxthen(IntPtr, JniHandleOwnership) constructor(Context, IAttributeSet, int) constructor.

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceededhide bugsError: User Rate Limit ExceededNo constructor found...Error: User Rate Limit Exceededprematurely collectedError: User Rate Limit ExceededDispose()Error: User Rate Limit ExceededwhyError: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit ExceededJava.Lang.Thread+RunnableImplementorError: User Rate Limit ExceededXamarin.Forms.Platform.Android.Platform+DefaultRendererError: User Rate Limit Exceeded
Error: User Rate Limit ExceededNo constructor found for Java.Lang.Thread+RunnableImplementorError: User Rate Limit ExceededXamarin.Forms.Platform.Android.Platform+DefaultRenderer
1

base.Dispose

Xamarin.Forms.Device.BeginInvokeOnMainThread(base.Dispose);

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
26

System.Exception: No constructor found for MyProject.TwoDScrollView::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)

public TwoDScrollView (IntPtr a, JniHandleOwnership b) : base (a, b) { }

Error: User Rate Limit Exceeded David
Error: User Rate Limit Exceeded(IntPtr, JniHandleOwnership)Error: User Rate Limit Exceededstackoverflow.com/a/10603714/83444
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
11

public CircularImageView(Context context)
            :base(context) 
        {

            init (context, null, 0);
        }

        public CircularImageView(Context context, IAttributeSet attrs)
            : base(context, attrs)
        {
            init (context, attrs, Resource.Attribute.circularImageViewStyle);
        }

        public CircularImageView(Context context, IAttributeSet attrs, int defStyle)
            :base(context, attrs, defStyle)
        {

            init(context, attrs, defStyle);
        }
        public CircularImageView (IntPtr a, JniHandleOwnership b) : base (a, b)
        {
        }

Похожие вопросы