From d1f32b7f5ced601e7d1e798cb3ffe6e3aa1b811d Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Thu, 9 Apr 2020 14:11:42 +0800 Subject: [PATCH] Android:render's promise's resolve should happen after view's been measured and layouted --- .../doric/src/main/java/pub/doric/plugin/ShaderPlugin.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doric-android/doric/src/main/java/pub/doric/plugin/ShaderPlugin.java b/doric-android/doric/src/main/java/pub/doric/plugin/ShaderPlugin.java index 5580b387..fc1c377b 100644 --- a/doric-android/doric/src/main/java/pub/doric/plugin/ShaderPlugin.java +++ b/doric-android/doric/src/main/java/pub/doric/plugin/ShaderPlugin.java @@ -92,7 +92,12 @@ public class ShaderPlugin extends DoricJavaPlugin { @Override public void onFinish() { - promise.resolve(); + getDoricContext().getRootNode().getNodeView().post(new Runnable() { + @Override + public void run() { + promise.resolve(); + } + }); } }); }