Skip to content

Commit

Permalink
chore(docs): fix lint check error
Browse files Browse the repository at this point in the history
  • Loading branch information
siguangli2018 authored and hippy-actions[bot] committed Dec 25, 2023
1 parent 6b7f8d1 commit 963c81b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/development/native-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)

但一些业务场景中,自定义组件需要挂载一些非前端节点映射的纯native view,常见的比如video view,lottie view等,由于我们拦截了onMeasure和onLayout,这些视图无法获取到正确的显示尺寸和位置,导致显示异常,所以需要开发者自己手动调用measure和layout来解决这个问题,可以参考以下示例:
在自定义组件的Controller中Override onBatchComplete接口,在非前端节点映射的纯native view的父容器调用measure和layout

```java
private final Handler mHandler = new Handler(Looper.getMainLooper());

Expand Down

0 comments on commit 963c81b

Please sign in to comment.