private WebView.PictureListener getPictureListener() { if (mPictureListener == null) { mPictureListener = new WebView.PictureListener() { @Override public void onNewPicture(WebView webView, Picture picture) { dispatchEvent( webView, new ContentSizeChangeEvent( webView.getId(), webView.getWidth(), webView.getContentHeight())); } }; } return mPictureListener; }
private void onTotalChildrenHeightChange(int newTotalChildrenHeight) { if (mSendContentSizeChangeEvents) { ((ReactContext) getContext()).getNativeModule(UIManagerModule.class).getEventDispatcher() .dispatchEvent(new ContentSizeChangeEvent( getId(), getWidth(), newTotalChildrenHeight)); } }