|
1 | 1 | import React, { useCallback, useMemo, useState } from 'react' |
2 | | -import { View, StyleSheet, Text, Button } from 'react-native' |
| 2 | +import { View, StyleSheet, Text, Button, ScrollView } from 'react-native' |
3 | 3 | import { LineGraph } from 'react-native-graph' |
4 | 4 | import StaticSafeAreaInsets from 'react-native-static-safe-area-insets' |
5 | 5 | import type { GraphRange } from '../../../src/LineGraphProps' |
@@ -104,7 +104,10 @@ export function GraphPage() { |
104 | 104 |
|
105 | 105 | <Button title="Refresh" onPress={refreshData} /> |
106 | 106 |
|
107 | | - <View style={styles.controls}> |
| 107 | + <ScrollView |
| 108 | + style={styles.controlsScrollView} |
| 109 | + contentContainerStyle={styles.controlsScrollViewContent} |
| 110 | + > |
108 | 111 | <Toggle |
109 | 112 | title="Animated:" |
110 | 113 | isEnabled={isAnimated} |
@@ -145,7 +148,7 @@ export function GraphPage() { |
145 | 148 | isEnabled={indicatorPulsating} |
146 | 149 | setIsEnabled={setIndicatorPulsating} |
147 | 150 | /> |
148 | | - </View> |
| 151 | + </ScrollView> |
149 | 152 |
|
150 | 153 | <View style={styles.spacer} /> |
151 | 154 | </View> |
@@ -181,9 +184,11 @@ const styles = StyleSheet.create({ |
181 | 184 | height: 35, |
182 | 185 | marginLeft: 5, |
183 | 186 | }, |
184 | | - controls: { |
| 187 | + controlsScrollView: { |
185 | 188 | flexGrow: 1, |
186 | | - justifyContent: 'center', |
187 | 189 | paddingHorizontal: 15, |
188 | 190 | }, |
| 191 | + controlsScrollViewContent: { |
| 192 | + justifyContent: 'center', |
| 193 | + }, |
189 | 194 | }) |
0 commit comments