From a124c732b1b2d41a28a68575e1d0723ad103e11c Mon Sep 17 00:00:00 2001 From: hyb1996 <946994919@qq.com> Date: Mon, 15 Oct 2018 10:25:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E6=94=AF=E6=8C=81ui?= =?UTF-8?q?=E7=9A=84view=E5=AF=B9=E8=B1=A1=E5=A2=9E=E5=8A=A0=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=AE=83=E7=9A=84prototype?= =?UTF-8?q?=E4=B8=BAobject?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/stardust/autojs/core/ui/nativeview/NativeView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autojs/src/main/java/com/stardust/autojs/core/ui/nativeview/NativeView.java b/autojs/src/main/java/com/stardust/autojs/core/ui/nativeview/NativeView.java index 43f15048..acd82243 100644 --- a/autojs/src/main/java/com/stardust/autojs/core/ui/nativeview/NativeView.java +++ b/autojs/src/main/java/com/stardust/autojs/core/ui/nativeview/NativeView.java @@ -10,6 +10,7 @@ import com.stardust.autojs.core.ui.attribute.ViewAttributes; import com.stardust.autojs.rhino.NativeJavaObjectWithPrototype; import org.mozilla.javascript.NativeJavaObject; +import org.mozilla.javascript.NativeObject; import org.mozilla.javascript.ScriptRuntime; import org.mozilla.javascript.Scriptable; @@ -49,7 +50,8 @@ public class NativeView extends NativeJavaObjectWithPrototype { mViewAttributes = ViewExtras.getViewAttributes(view, runtime.ui.getResourceParser()); mView = view; mViewPrototype = new ViewPrototype(mView, mViewAttributes, scope, runtime); - prototype = new NativeJavaObject(scope, mViewPrototype, mViewPrototype.getClass()); + prototype = new NativeJavaObjectWithPrototype(scope, mViewPrototype, mViewPrototype.getClass()); + prototype.setPrototype(new NativeObject()); } @Override