Example usage for com.facebook.react.uimanager ReactClippingViewGroupHelper calculateClippingRect

List of usage examples for com.facebook.react.uimanager ReactClippingViewGroupHelper calculateClippingRect

Introduction

In this page you can find the example usage for com.facebook.react.uimanager ReactClippingViewGroupHelper calculateClippingRect.

Prototype

public static void calculateClippingRect(View view, Rect outputRect) 

Source Link

Document

Can be used by view that support removeClippedSubviews property to calculate area that given view should be clipped to based on the clipping rectangle of it's parent in case when parent is also set to clip it's children.

Usage

From source file:com.bottomsheetbehavior.ReactNestedScrollView.java

License:Open Source License

@Override
public void updateClippingRect() {
    if (!mRemoveClippedSubviews) {
        return;// w ww  .j a va2  s .  co m
    }

    Assertions.assertNotNull(mClippingRect);

    ReactClippingViewGroupHelper.calculateClippingRect(this, mClippingRect);
    View contentView = getChildAt(0);
    if (contentView instanceof ReactClippingViewGroup) {
        ((ReactClippingViewGroup) contentView).updateClippingRect();
    }
}