Make scrolling work again

This commit is contained in:
Julia Friesel
2018-08-20 16:46:42 +02:00
parent 93b4758123
commit d53b8029dc
10 changed files with 354 additions and 337 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ export default class App extends Component {
Home, Calendar, CycleDay, Chart, Settings, Stats, ...symptomViews Home, Calendar, CycleDay, Chart, Settings, Stats, ...symptomViews
}[this.state.currentPage] }[this.state.currentPage]
return ( return (
<View style={styles.menuOnBottom}> <View style={{flex: 1}}>
{this.state.currentPage != 'CycleDay' && <Header title={titles[this.state.currentPage]} />} {this.state.currentPage != 'CycleDay' && <Header title={titles[this.state.currentPage]} />}
+3 -1
View File
@@ -50,12 +50,13 @@ export default class CycleDayOverView extends Component {
const getCycleDayNumber = cycleModule().getCycleDayNumber const getCycleDayNumber = cycleModule().getCycleDayNumber
const cycleDayNumber = getCycleDayNumber(cycleDay.date) const cycleDayNumber = getCycleDayNumber(cycleDay.date)
return ( return (
<ScrollView> <View style={{ flex: 1 }}>
<Header <Header
isCycleDayOverView={true} isCycleDayOverView={true}
cycleDayNumber={cycleDayNumber} cycleDayNumber={cycleDayNumber}
date={cycleDay.date} date={cycleDay.date}
/> />
<ScrollView>
<View style={styles.symptomBoxesView}> <View style={styles.symptomBoxesView}>
<SymptomBox <SymptomBox
title='Bleeding' title='Bleeding'
@@ -97,6 +98,7 @@ export default class CycleDayOverView extends Component {
<FillerBoxes /> <FillerBoxes />
</View > </View >
</ScrollView > </ScrollView >
</View >
) )
} }
} }
+5 -2
View File
@@ -2,7 +2,8 @@ import React, { Component } from 'react'
import { import {
View, View,
Text, Text,
Switch Switch,
ScrollView
} from 'react-native' } from 'react-native'
import RadioForm from 'react-native-simple-radio-button' import RadioForm from 'react-native-simple-radio-button'
import styles from '../../../styles' import styles from '../../../styles'
@@ -33,7 +34,8 @@ export default class Bleeding extends Component {
{ label: labels[3], value: 3 }, { label: labels[3], value: 3 },
] ]
return ( return (
<View style={styles.menuOnBottom}> <View style={{ flex: 1 }}>
<ScrollView>
<View> <View>
<View style={styles.radioButtonRow}> <View style={styles.radioButtonRow}>
<RadioForm <RadioForm
@@ -57,6 +59,7 @@ export default class Bleeding extends Component {
/> />
</View> </View>
</View> </View>
</ScrollView>
<ActionButtonFooter <ActionButtonFooter
symptom='bleeding' symptom='bleeding'
cycleDay={this.props.cycleDay} cycleDay={this.props.cycleDay}
+5 -2
View File
@@ -2,7 +2,8 @@ import React, { Component } from 'react'
import { import {
View, View,
Text, Text,
Switch Switch,
ScrollView
} from 'react-native' } from 'react-native'
import RadioForm from 'react-native-simple-radio-button' import RadioForm from 'react-native-simple-radio-button'
import styles from '../../../styles' import styles from '../../../styles'
@@ -49,7 +50,8 @@ export default class Cervix extends Component {
{ label: positionLabels[2], value: 2 } { label: positionLabels[2], value: 2 }
] ]
return ( return (
<View style={styles.menuOnBottom}> <View style={{ flex: 1 }}>
<ScrollView>
<View> <View>
<Text style={styles.symptomDayView}>Opening</Text> <Text style={styles.symptomDayView}>Opening</Text>
<View style={styles.radioButtonRow}> <View style={styles.radioButtonRow}>
@@ -100,6 +102,7 @@ export default class Cervix extends Component {
/> />
</View> </View>
</View> </View>
</ScrollView>
<ActionButtonFooter <ActionButtonFooter
symptom='cervix' symptom='cervix'
cycleDay={this.cycleDay} cycleDay={this.cycleDay}
+4 -2
View File
@@ -1,7 +1,7 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import { import {
View, View,
Text ScrollView
} from 'react-native' } from 'react-native'
import RadioForm from 'react-native-simple-radio-button' import RadioForm from 'react-native-simple-radio-button'
import styles from '../../../styles' import styles from '../../../styles'
@@ -28,7 +28,8 @@ export default class Desire extends Component {
{ label: labels[2], value: 2 } { label: labels[2], value: 2 }
] ]
return ( return (
<View style={styles.menuOnBottom}> <View style={{ flex: 1 }}>
<ScrollView>
<View> <View>
<View style={styles.radioButtonRow}> <View style={styles.radioButtonRow}>
<RadioForm <RadioForm
@@ -43,6 +44,7 @@ export default class Desire extends Component {
/> />
</View> </View>
</View> </View>
</ScrollView>
<ActionButtonFooter <ActionButtonFooter
symptom='desire' symptom='desire'
cycleDay={this.cycleDay} cycleDay={this.cycleDay}
+5 -2
View File
@@ -2,7 +2,8 @@ import React, { Component } from 'react'
import { import {
View, View,
Text, Text,
Switch Switch,
ScrollView
} from 'react-native' } from 'react-native'
import RadioForm from 'react-native-simple-radio-button' import RadioForm from 'react-native-simple-radio-button'
import styles from '../../../styles' import styles from '../../../styles'
@@ -47,7 +48,8 @@ export default class Mucus extends Component {
{ label: textureLabels[2], value: 2 } { label: textureLabels[2], value: 2 }
] ]
return ( return (
<View style={styles.menuOnBottom}> <View style={{ flex: 1 }}>
<ScrollView>
<View> <View>
<Text style={styles.symptomDayView}>Feeling</Text> <Text style={styles.symptomDayView}>Feeling</Text>
<View style={styles.radioButtonRow}> <View style={styles.radioButtonRow}>
@@ -85,6 +87,7 @@ export default class Mucus extends Component {
/> />
</View> </View>
</View> </View>
</ScrollView>
<ActionButtonFooter <ActionButtonFooter
symptom='mucus' symptom='mucus'
cycleDay={this.cycleDay} cycleDay={this.cycleDay}
+4 -2
View File
@@ -1,7 +1,7 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import { import {
View, View,
Text, ScrollView,
TextInput, TextInput,
} from 'react-native' } from 'react-native'
@@ -23,7 +23,8 @@ export default class Temp extends Component {
render() { render() {
return ( return (
<View style={styles.menuOnBottom}> <View style={{ flex: 1 }}>
<ScrollView>
<View style={styles.symptomViewRow}> <View style={styles.symptomViewRow}>
<TextInput <TextInput
multiline={true} multiline={true}
@@ -34,6 +35,7 @@ export default class Temp extends Component {
value={this.state.currentValue} value={this.state.currentValue}
/> />
</View> </View>
</ScrollView>
<ActionButtonFooter <ActionButtonFooter
symptom='note' symptom='note'
cycleDay={this.cycleDay} cycleDay={this.cycleDay}
+5 -2
View File
@@ -3,7 +3,8 @@ import {
CheckBox, CheckBox,
Text, Text,
TextInput, TextInput,
View View,
ScrollView
} from 'react-native' } from 'react-native'
import styles from '../../../styles' import styles from '../../../styles'
import { saveSymptom } from '../../../db' import { saveSymptom } from '../../../db'
@@ -31,7 +32,8 @@ export default class Sex extends Component {
render() { render() {
return ( return (
<View style={styles.menuOnBottom}> <View style={{ flex: 1 }}>
<ScrollView>
<View> <View>
<View style={styles.symptomViewRowInline}> <View style={styles.symptomViewRowInline}>
<Text style={styles.symptomDayView}>{activityLabels.solo}</Text> <Text style={styles.symptomDayView}>{activityLabels.solo}</Text>
@@ -136,6 +138,7 @@ export default class Sex extends Component {
/> />
} }
</View> </View>
</ScrollView>
<ActionButtonFooter <ActionButtonFooter
symptom='sex' symptom='sex'
cycleDay={this.cycleDay} cycleDay={this.cycleDay}
+4 -1
View File
@@ -5,6 +5,7 @@ import {
TextInput, TextInput,
Switch, Switch,
Keyboard, Keyboard,
ScrollView
} from 'react-native' } from 'react-native'
import DateTimePicker from 'react-native-modal-datetime-picker-nevo' import DateTimePicker from 'react-native-modal-datetime-picker-nevo'
@@ -42,7 +43,8 @@ export default class Temp extends Component {
render() { render() {
return ( return (
<View style={styles.menuOnBottom}> <View style={{ flex: 1 }}>
<ScrollView>
<View> <View>
<View style={styles.symptomViewRowInline}> <View style={styles.symptomViewRowInline}>
<Text style={styles.symptomDayView}>Temperature (°C)</Text> <Text style={styles.symptomDayView}>Temperature (°C)</Text>
@@ -88,6 +90,7 @@ export default class Temp extends Component {
/> />
</View> </View>
</View> </View>
</ScrollView>
<ActionButtonFooter <ActionButtonFooter
symptom='temperature' symptom='temperature'
cycleDay={this.cycleDay} cycleDay={this.cycleDay}
+1 -5
View File
@@ -79,10 +79,6 @@ export default StyleSheet.create({
symptomDataText: { symptomDataText: {
fontSize: 12 fontSize: 12
}, },
menuOnBottom: {
flex: 1,
justifyContent: 'space-between'
},
symptomEditRow: { symptomEditRow: {
justifyContent: 'space-between', justifyContent: 'space-between',
marginBottom: 10, marginBottom: 10,
@@ -105,7 +101,7 @@ export default StyleSheet.create({
backgroundColor: primaryColor, backgroundColor: primaryColor,
alignItems: 'center', alignItems: 'center',
justifyContent: 'space-between', justifyContent: 'space-between',
flexDirection: 'row', flexDirection: 'row'
}, },
menuItem: { menuItem: {
alignItems: 'center', alignItems: 'center',