Skip to content
Snippets Groups Projects
Commit 2a2f91fc authored by Julia Friesel's avatar Julia Friesel
Browse files

Make everything scrollable

parent 48aba2bb
No related branches found
No related tags found
No related merge requests found
import React, { Component } from 'react' import React, { Component } from 'react'
import { Text as ReactNativeText, View, FlatList } from 'react-native' import { Text as ReactNativeText, View, FlatList, ScrollView } from 'react-native'
import range from 'date-range' import range from 'date-range'
import Svg,{ import Svg,{
G, G,
...@@ -131,7 +131,7 @@ export default class CycleChart extends Component { ...@@ -131,7 +131,7 @@ export default class CycleChart extends Component {
render() { render() {
return ( return (
<View style={{flex: 1, flexDirection: 'row'}}> <ScrollView contentContainerStyle={{flexDirection: 'row'}}>
<View {...styles.yAxis}>{yAxis.labels}</View> <View {...styles.yAxis}>{yAxis.labels}</View>
<FlatList <FlatList
horizontal={true} horizontal={true}
...@@ -148,7 +148,7 @@ export default class CycleChart extends Component { ...@@ -148,7 +148,7 @@ export default class CycleChart extends Component {
keyExtractor={item => item.dateString} keyExtractor={item => item.dateString}
> >
</FlatList> </FlatList>
</View> </ScrollView>
) )
} }
} }
......
import React, { Component } from 'react' import React, { Component } from 'react'
import { import {
View, View,
Text Text,
ScrollView
} from 'react-native' } from 'react-native'
import cycleDayModule from '../../lib/get-cycle-day-number' import cycleDayModule from '../../lib/get-cycle-day-number'
import DayView from './cycle-day-overview' import DayView from './cycle-day-overview'
...@@ -33,7 +34,7 @@ export default class Day extends Component { ...@@ -33,7 +34,7 @@ export default class Day extends Component {
render() { render() {
const cycleDayNumber = getCycleDayNumber(this.cycleDay.date) const cycleDayNumber = getCycleDayNumber(this.cycleDay.date)
return ( return (
<View> <ScrollView>
<View style={ styles.cycleDayDateView }> <View style={ styles.cycleDayDateView }>
<Text style={styles.dateHeader}> <Text style={styles.dateHeader}>
{formatDateForViewHeader(this.cycleDay.date)} {formatDateForViewHeader(this.cycleDay.date)}
...@@ -51,7 +52,7 @@ export default class Day extends Component { ...@@ -51,7 +52,7 @@ export default class Day extends Component {
}[this.state.visibleComponent] }[this.state.visibleComponent]
} }
</View > </View >
</View > </ScrollView >
) )
} }
} }
...@@ -2,7 +2,8 @@ import React, { Component } from 'react' ...@@ -2,7 +2,8 @@ import React, { Component } from 'react'
import { import {
View, View,
Button, Button,
Text Text,
ScrollView
} from 'react-native' } from 'react-native'
import { LocalDate } from 'js-joda' import { LocalDate } from 'js-joda'
import styles from '../styles' import styles from '../styles'
...@@ -46,7 +47,7 @@ export default class Home extends Component { ...@@ -46,7 +47,7 @@ export default class Home extends Component {
render() { render() {
const navigate = this.props.navigation.navigate const navigate = this.props.navigation.navigate
return ( return (
<View> <ScrollView>
<Text style={styles.welcome}>{this.state.welcomeText}</Text> <Text style={styles.welcome}>{this.state.welcomeText}</Text>
<View style={styles.homeButtons}> <View style={styles.homeButtons}>
<View style={styles.homeButton}> <View style={styles.homeButton}>
...@@ -74,7 +75,7 @@ export default class Home extends Component { ...@@ -74,7 +75,7 @@ export default class Home extends Component {
</Button> </Button>
</View> </View>
</View> </View>
</View> </ScrollView>
) )
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment