/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; import * as React from 'react'; import { Button, Modal, ScrollView, StyleSheet, Switch, Text, View, useWindowDimensions, } from 'react-native'; export function ScrollViewIndicatorInsetsExample() { const [automaticallyAdjustsScrollIndicatorInsets, setAutomaticallyAdjustsScrollIndicatorInsets] = React.useState(true); const [modalVisible, setModalVisible] = React.useState(false); const { height, width } = useWindowDimensions(); return ( setModalVisible(false)} presentationStyle="fullScreen" statusBarTranslucent={false} supportedOrientations={['portrait', 'landscape']}> When automaticallyAdjustsScrollIndicatorInsets is true, the scrollbar is inset to the status bar. When false, it reaches the edge of the modal. Check out the UIScrollView docs to learn more about automaticallyAdjustsScrollIndicatorInsets automaticallyAdjustsScrollIndicatorInsets is {automaticallyAdjustsScrollIndicatorInsets + ''} setAutomaticallyAdjustsScrollIndicatorInsets(v)} value={automaticallyAdjustsScrollIndicatorInsets} style={styles.switch}/>