class NestedScrollView extends FrameLayout implements NestedScrollingParent2,
        NestedScrollingChild2, ScrollingView {

    @Override
    protected float getBottomFadingEdgeStrength() {
        if (getChildCount() == 0) {
            return 0.0f;
        }

        View child = getChildAt(0);
        final NestedScrollView.LayoutParams lp = (LayoutParams) child.getLayoutParams();
        final int length = getVerticalFadingEdgeLength();
        final int bottomEdge = getHeight() - getPaddingBottom();
        final int span = child.getBottom() + lp.bottomMargin - getScrollY() - bottomEdge;
        if (span < length) {
            return span / (float) length;
        }

        return 1.0f;
    }

    public  NestedScrollView(@NonNull Context context);
    public  NestedScrollView(@NonNull Context context, @Nullable AttributeSet attrs);
    public  NestedScrollView(@NonNull Context context, @Nullable AttributeSet attrs,
                            int defStyleAttr);

}