> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# onFirstScreen

APISummary
首屏布局完成时调用。

## 语法

### Android

```java
public void onFirstScreen();
```

### iOS

```objc
- (void)lynxViewDidFirstScreen:(LynxView *)view;
```

#### 参数

- `view`: LynxView 实例。

:::note

- 此时您可以获取 LynxView 加载过程中的性能数据。

:::

### Harmony

```typescript
public onFirstScreen(): void;
```

### Desktop (C++)

```cpp
class YourViewClient : public lynx::pub::LynxViewClient {
 public:
  void OnFirstScreen() override;
};
```

## 兼容性

**Compatibility Table**

**Query:** `lynx-native-api.lynx-view-client.on-first-screen`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-native-api/lynx-view-client/on-first-screen.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| on-first-screen | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (3.7) | Yes (3.7) | No |

**`on-first-screen`**

Called when first screen layout completed.

**Specifications:**

