fix(android): support NestedScrollView in ClippingScrollViewDecoratorView (#1527)
## Problem With React Native's `useNestedScrollViewAndroid` feature flag (RN 0.85+, facebook/react-native#55239), `ScrollView` renders as `ReactNestedScrollView`, which extends `androidx.core.widget.NestedScrollView` (a `FrameLayout`) — not `android.widget.ScrollView`. `ClippingScrollViewDecoratorView.findScrollView` only matches `view is ScrollView`, so it returns null, `decorateScrollView()` silently no-ops, and `contentInsetBottom`/`contentInsetTop` are dropped entirely. In a `KeyboardChatScrollView` this means: list content hides behind the composer, and `blankSpace`/`extraContentPadding` have no effect on Android. ## Fix Match `NestedScrollView` as well, and pass the found view around as `ViewGroup`. Every member used by the decorator and the padding-scroll workaround (`clipToPadding`, `getChildAt`, `setPadding`, `scrollBy`, `scrollY`, `canScrollVertically`, `getLocationOnScreen`) lives on `ViewGroup`/`View`, and `NestedScrollView` extends its scroll range via bottom padding + `clipToPadding = false` exactly like `ScrollView`. `ReactNestedScrollView` itself is package-private, hence matching on the public androidx base class. ## Testing Verified in a chat app (RN 0.85.3, new arch, `useNestedScrollViewAndroid` enabled) via patch-package: composer inset, keyboard padding, and `blankSpace` all apply again; behavior with the flag disabled (plain `ScrollView`) is unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
D
Daniel Suchý committed
73d3b8a1af7ddbcadb7debc0a23ded33b847a84c
Parent: 3e98163
Committed by GitHub <noreply@github.com>
on 7/2/2026, 5:05:41 PM