Commit 253f2d67 authored by justin's avatar justin

屏幕宽度为0 时候,会通知dart测。这个逻辑在页面切换时候会出现,需要去除,拦截掉。不然会导致dart测获取屏幕宽度错误。

parent ff36623c
......@@ -758,7 +758,7 @@ public class XFlutterView extends FrameLayout {
+ "FlutterView was not attached to a FlutterEngine.");
return;
}
if(viewportMetrics.width==0&&viewportMetrics.height==0)return;
if(viewportMetrics.width==0|| viewportMetrics.height==0)return;
viewportMetrics.devicePixelRatio = getResources().getDisplayMetrics().density;
flutterEngine.getRenderer().setViewportMetrics(viewportMetrics);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment