Exemplo n.º 1
0
        public unsafe AssetPathFetcher(global::Android.Content.Res.AssetManager p0, string p1)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_p1 = JNIEnv.NewString(p1);

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(native_p1);
                if (GetType() != typeof(AssetPathFetcher))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Landroid/content/res/AssetManager;Ljava/lang/String;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(Handle, "(Landroid/content/res/AssetManager;Ljava/lang/String;)V", __args);
                    return;
                }

                if (id_ctor_Landroid_content_res_AssetManager_Ljava_lang_String_ == IntPtr.Zero)
                {
                    id_ctor_Landroid_content_res_AssetManager_Ljava_lang_String_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Landroid/content/res/AssetManager;Ljava/lang/String;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Landroid_content_res_AssetManager_Ljava_lang_String_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(Handle, class_ref, id_ctor_Landroid_content_res_AssetManager_Ljava_lang_String_, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_p1);
            }
        }
Exemplo n.º 2
0
        static IntPtr n_LoadResource_Landroid_content_res_AssetManager_Ljava_lang_String_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
        {
            global::Com.Bumptech.Glide.Load.Data.AssetPathFetcher __this = global::Java.Lang.Object.GetObject <global::Com.Bumptech.Glide.Load.Data.AssetPathFetcher> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Android.Content.Res.AssetManager p0 = global::Java.Lang.Object.GetObject <global::Android.Content.Res.AssetManager> (native_p0, JniHandleOwnership.DoNotTransfer);
            string p1    = JNIEnv.GetString(native_p1, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.LoadResource(p0, p1));

            return(__ret);
        }
Exemplo n.º 3
0
        protected override void OnCreate (Bundle bundle)
        {
            am = this.Assets;
            // tests can be inside the main assembly
            AddTest (Assembly.GetExecutingAssembly ());
            // or in any reference assemblies
            // AddTest (typeof (Your.Library.TestClass).Assembly);

            // Once you called base.OnCreate(), you cannot add more assemblies.
            base.OnCreate (bundle);
        }
Exemplo n.º 4
0
        protected override void OnCreate(Bundle bundle)
        {
            // Accept ssl certificates
            ServicePointManager.ServerCertificateValidationCallback += (p1, p2, p3, p4) => true;

            base.OnCreate(bundle);
            AssetsManager = Assets;
            MainGame.Activity = this;
            var g = new MainGame();
            SetContentView(g.Window);
            g.Run();
        }
Exemplo n.º 5
0
        protected override unsafe global::Java.Lang.Object LoadResource(global::Android.Content.Res.AssetManager p0, string p1)
        {
            if (id_loadResource_Landroid_content_res_AssetManager_Ljava_lang_String_ == IntPtr.Zero)
            {
                id_loadResource_Landroid_content_res_AssetManager_Ljava_lang_String_ = JNIEnv.GetMethodID(class_ref, "loadResource", "(Landroid/content/res/AssetManager;Ljava/lang/String;)Ljava/lang/Object;");
            }
            IntPtr native_p1 = JNIEnv.NewString(p1);

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(native_p1);
                global::Java.Lang.Object __ret = (Java.Lang.Object)global::Java.Lang.Object.GetObject <global::Java.Lang.Object> (JNIEnv.CallObjectMethod(Handle, id_loadResource_Landroid_content_res_AssetManager_Ljava_lang_String_, __args), JniHandleOwnership.TransferLocalRef);
                return(__ret);
            } finally {
                JNIEnv.DeleteLocalRef(native_p1);
            }
        }
Exemplo n.º 6
0
 protected abstract global::Java.Lang.Object LoadResource(global::Android.Content.Res.AssetManager p0, string p1);