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 committed Dec 25, 2023
1 parent db99bf4 commit cd3fb09
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 cd3fb09

Please sign in to comment.