Lynx

updateViewport

The client updates the LynxView view size.

Syntax

Android

public void updateViewport(int widthMeasureSpec, int heightMeasureSpec);

Parameters

  • widthMeasureSpec: Current LynxView width.
  • heightMeasureSpec: Current LynxView height.

iOS

- (void)updateViewportWithPreferredLayoutWidth:(CGFloat)preferredLayoutWidth
                         preferredLayoutHeight:(CGFloat)preferredLayoutHeight
                                    needLayout:(BOOL)needLayout;

Parameters

  • preferredLayoutWidth: Current LynxView width.
  • preferredLayoutHeight: Current LynxView height.
  • needLayout: Whether layout needs to be triggered.

Desktop (C++)

Desktop public API uses SetFrame(...) for the view rectangle, and exposes UpdateScreenMetrics(...) separately for screen metrics.

void SetFrame(float x, float y, float width, float height);

Parameters

  • x: The x coordinate of the LynxView.
  • y: The y coordinate of the LynxView.
  • width: Current LynxView width.
  • height: Current LynxView height.

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.