android:use addIdelHandler to avoid call render callback before it is actually rendered
This commit is contained in:
parent
c34fe50104
commit
12fcf71526
@ -17,6 +17,8 @@ package pub.doric.plugin;
|
|||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
import android.os.Looper;
|
||||||
|
import android.os.MessageQueue;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
@ -92,10 +94,11 @@ public class ShaderPlugin extends DoricJavaPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish() {
|
public void onFinish() {
|
||||||
getDoricContext().getRootNode().getNodeView().post(new Runnable() {
|
Looper.myQueue().addIdleHandler(new MessageQueue.IdleHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public boolean queueIdle() {
|
||||||
promise.resolve();
|
promise.resolve();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user