MCPcopy Create free account
hub / github.com/callstack/agent-device / collectNativeScrollViews

Function collectNativeScrollViews

src/platforms/android/scroll-hints.ts:252–266  ·  view source on GitHub ↗
(root: ViewNode)

Source from the content-addressed store, hash-verified

250}
251
252function collectNativeScrollViews(root: ViewNode): NativeScrollView[] {
253 const results: NativeScrollView[] = [];
254 const stack = [root];
255 while (stack.length > 0) {
256 const node = stack.pop() as ViewNode;
257 if (isScrollableType(node.className)) {
258 const nativeScrollView = toNativeScrollView(node);
259 if (nativeScrollView) {
260 results.push(nativeScrollView);
261 }
262 }
263 stack.push(...node.children);
264 }
265 return results;
266}
267
268function toNativeScrollView(node: ViewNode): NativeScrollView | null {
269 const contentRoot = node.children[0];

Callers 1

Calls 3

isScrollableTypeFunction · 0.90
toNativeScrollViewFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…