@Override
 protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight) {
   mMetrics.physicalWidth = width;
   mMetrics.physicalHeight = height;
   mSkyEngine.onViewportMetricsChanged(mMetrics);
   super.onSizeChanged(width, height, oldWidth, oldHeight);
 }
 @Override
 public final WindowInsets onApplyWindowInsets(WindowInsets insets) {
   mMetrics.physicalPaddingTop = insets.getSystemWindowInsetTop();
   mMetrics.physicalPaddingRight = insets.getSystemWindowInsetRight();
   mMetrics.physicalPaddingBottom = insets.getSystemWindowInsetBottom();
   mMetrics.physicalPaddingLeft = insets.getSystemWindowInsetLeft();
   mSkyEngine.onViewportMetricsChanged(mMetrics);
   return super.onApplyWindowInsets(insets);
 }