Make scrolling work again
This commit is contained in:
@@ -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]} />}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export default class CycleDayOverView extends Component {
|
|||||||
const targetDate = target === 'before' ?
|
const targetDate = target === 'before' ?
|
||||||
localDate.minusDays(1).toString() :
|
localDate.minusDays(1).toString() :
|
||||||
localDate.plusDays(1).toString()
|
localDate.plusDays(1).toString()
|
||||||
this.setState({cycleDay: getOrCreateCycleDay(targetDate)})
|
this.setState({ cycleDay: getOrCreateCycleDay(targetDate) })
|
||||||
}
|
}
|
||||||
|
|
||||||
navigate(symptom) {
|
navigate(symptom) {
|
||||||
@@ -50,53 +50,55 @@ 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}
|
||||||
/>
|
/>
|
||||||
<View style={styles.symptomBoxesView}>
|
<ScrollView>
|
||||||
<SymptomBox
|
<View style={styles.symptomBoxesView}>
|
||||||
title='Bleeding'
|
<SymptomBox
|
||||||
onPress={() => this.navigate('BleedingEditView')}
|
title='Bleeding'
|
||||||
data={getLabel('bleeding', cycleDay.bleeding)}
|
onPress={() => this.navigate('BleedingEditView')}
|
||||||
/>
|
data={getLabel('bleeding', cycleDay.bleeding)}
|
||||||
<SymptomBox
|
/>
|
||||||
title='Temperature'
|
<SymptomBox
|
||||||
onPress={() => this.navigate('TemperatureEditView')}
|
title='Temperature'
|
||||||
data={getLabel('temperature', cycleDay.temperature)}
|
onPress={() => this.navigate('TemperatureEditView')}
|
||||||
/>
|
data={getLabel('temperature', cycleDay.temperature)}
|
||||||
<SymptomBox
|
/>
|
||||||
title='Mucus'
|
<SymptomBox
|
||||||
onPress={() => this.navigate('MucusEditView')}
|
title='Mucus'
|
||||||
data={getLabel('mucus', cycleDay.mucus)}
|
onPress={() => this.navigate('MucusEditView')}
|
||||||
/>
|
data={getLabel('mucus', cycleDay.mucus)}
|
||||||
<SymptomBox
|
/>
|
||||||
title='Cervix'
|
<SymptomBox
|
||||||
onPress={() => this.navigate('CervixEditView')}
|
title='Cervix'
|
||||||
data={getLabel('cervix', cycleDay.cervix)}
|
onPress={() => this.navigate('CervixEditView')}
|
||||||
/>
|
data={getLabel('cervix', cycleDay.cervix)}
|
||||||
<SymptomBox
|
/>
|
||||||
title='Note'
|
<SymptomBox
|
||||||
onPress={() => this.navigate('NoteEditView')}
|
title='Note'
|
||||||
data={getLabel('note', cycleDay.note)}
|
onPress={() => this.navigate('NoteEditView')}
|
||||||
/>
|
data={getLabel('note', cycleDay.note)}
|
||||||
<SymptomBox
|
/>
|
||||||
title='Desire'
|
<SymptomBox
|
||||||
onPress={() => this.navigate('DesireEditView')}
|
title='Desire'
|
||||||
data={getLabel('desire', cycleDay.desire)}
|
onPress={() => this.navigate('DesireEditView')}
|
||||||
/>
|
data={getLabel('desire', cycleDay.desire)}
|
||||||
<SymptomBox
|
/>
|
||||||
title='Sex'
|
<SymptomBox
|
||||||
onPress={() => this.navigate('SexEditView')}
|
title='Sex'
|
||||||
data={getLabel('sex', cycleDay.sex)}
|
onPress={() => this.navigate('SexEditView')}
|
||||||
/>
|
data={getLabel('sex', cycleDay.sex)}
|
||||||
{/* this is just to make the last row adhere to the grid
|
/>
|
||||||
|
{/* this is just to make the last row adhere to the grid
|
||||||
(and) because there are no pseudo properties in RN */}
|
(and) because there are no pseudo properties in RN */}
|
||||||
<FillerBoxes />
|
<FillerBoxes />
|
||||||
</View >
|
</View >
|
||||||
</ScrollView >
|
</ScrollView >
|
||||||
|
</View >
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,30 +34,32 @@ 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 }}>
|
||||||
<View>
|
<ScrollView>
|
||||||
<View style={styles.radioButtonRow}>
|
<View>
|
||||||
<RadioForm
|
<View style={styles.radioButtonRow}>
|
||||||
radio_props={bleedingRadioProps}
|
<RadioForm
|
||||||
initial={this.state.currentValue}
|
radio_props={bleedingRadioProps}
|
||||||
formHorizontal={true}
|
initial={this.state.currentValue}
|
||||||
labelHorizontal={false}
|
formHorizontal={true}
|
||||||
labelStyle={styles.radioButton}
|
labelHorizontal={false}
|
||||||
onPress={(itemValue) => {
|
labelStyle={styles.radioButton}
|
||||||
this.setState({ currentValue: itemValue })
|
onPress={(itemValue) => {
|
||||||
}}
|
this.setState({ currentValue: itemValue })
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={styles.symptomViewRowInline}>
|
||||||
|
<Text style={styles.symptomDayView}>Exclude</Text>
|
||||||
|
<Switch
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({ exclude: val })
|
||||||
|
}}
|
||||||
|
value={this.state.exclude}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.symptomViewRowInline}>
|
</ScrollView>
|
||||||
<Text style={styles.symptomDayView}>Exclude</Text>
|
|
||||||
<Switch
|
|
||||||
onValueChange={(val) => {
|
|
||||||
this.setState({ exclude: val })
|
|
||||||
}}
|
|
||||||
value={this.state.exclude}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<ActionButtonFooter
|
<ActionButtonFooter
|
||||||
symptom='bleeding'
|
symptom='bleeding'
|
||||||
cycleDay={this.props.cycleDay}
|
cycleDay={this.props.cycleDay}
|
||||||
|
|||||||
@@ -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,57 +50,59 @@ 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 }}>
|
||||||
<View>
|
<ScrollView>
|
||||||
<Text style={styles.symptomDayView}>Opening</Text>
|
<View>
|
||||||
<View style={styles.radioButtonRow}>
|
<Text style={styles.symptomDayView}>Opening</Text>
|
||||||
<RadioForm
|
<View style={styles.radioButtonRow}>
|
||||||
radio_props={cervixOpeningRadioProps}
|
<RadioForm
|
||||||
initial={this.state.opening}
|
radio_props={cervixOpeningRadioProps}
|
||||||
formHorizontal={true}
|
initial={this.state.opening}
|
||||||
labelHorizontal={false}
|
formHorizontal={true}
|
||||||
labelStyle={styles.radioButton}
|
labelHorizontal={false}
|
||||||
onPress={(itemValue) => {
|
labelStyle={styles.radioButton}
|
||||||
this.setState({ opening: itemValue })
|
onPress={(itemValue) => {
|
||||||
}}
|
this.setState({ opening: itemValue })
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<Text style={styles.symptomDayView}>Firmness</Text>
|
||||||
|
<View style={styles.radioButtonRow}>
|
||||||
|
<RadioForm
|
||||||
|
radio_props={cervixFirmnessRadioProps}
|
||||||
|
initial={this.state.firmness}
|
||||||
|
formHorizontal={true}
|
||||||
|
labelHorizontal={false}
|
||||||
|
labelStyle={styles.radioButton}
|
||||||
|
onPress={(itemValue) => {
|
||||||
|
this.setState({ firmness: itemValue })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<Text style={styles.symptomDayView}>Position</Text>
|
||||||
|
<View style={styles.radioButtonRow}>
|
||||||
|
<RadioForm
|
||||||
|
radio_props={cervixPositionRadioProps}
|
||||||
|
initial={this.state.position}
|
||||||
|
formHorizontal={true}
|
||||||
|
labelHorizontal={false}
|
||||||
|
labelStyle={styles.radioButton}
|
||||||
|
onPress={(itemValue) => {
|
||||||
|
this.setState({ position: itemValue })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={styles.symptomViewRowInline}>
|
||||||
|
<Text style={styles.symptomDayView}>Exclude</Text>
|
||||||
|
<Switch
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({ exclude: val })
|
||||||
|
}}
|
||||||
|
value={this.state.exclude}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<Text style={styles.symptomDayView}>Firmness</Text>
|
</ScrollView>
|
||||||
<View style={styles.radioButtonRow}>
|
|
||||||
<RadioForm
|
|
||||||
radio_props={cervixFirmnessRadioProps}
|
|
||||||
initial={this.state.firmness}
|
|
||||||
formHorizontal={true}
|
|
||||||
labelHorizontal={false}
|
|
||||||
labelStyle={styles.radioButton}
|
|
||||||
onPress={(itemValue) => {
|
|
||||||
this.setState({ firmness: itemValue })
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<Text style={styles.symptomDayView}>Position</Text>
|
|
||||||
<View style={styles.radioButtonRow}>
|
|
||||||
<RadioForm
|
|
||||||
radio_props={cervixPositionRadioProps}
|
|
||||||
initial={this.state.position}
|
|
||||||
formHorizontal={true}
|
|
||||||
labelHorizontal={false}
|
|
||||||
labelStyle={styles.radioButton}
|
|
||||||
onPress={(itemValue) => {
|
|
||||||
this.setState({ position: itemValue })
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View style={styles.symptomViewRowInline}>
|
|
||||||
<Text style={styles.symptomDayView}>Exclude</Text>
|
|
||||||
<Switch
|
|
||||||
onValueChange={(val) => {
|
|
||||||
this.setState({ exclude: val })
|
|
||||||
}}
|
|
||||||
value={this.state.exclude}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<ActionButtonFooter
|
<ActionButtonFooter
|
||||||
symptom='cervix'
|
symptom='cervix'
|
||||||
cycleDay={this.cycleDay}
|
cycleDay={this.cycleDay}
|
||||||
|
|||||||
@@ -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,21 +28,23 @@ 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 }}>
|
||||||
<View>
|
<ScrollView>
|
||||||
<View style={styles.radioButtonRow}>
|
<View>
|
||||||
<RadioForm
|
<View style={styles.radioButtonRow}>
|
||||||
radio_props={desireRadioProps}
|
<RadioForm
|
||||||
initial={this.state.currentValue}
|
radio_props={desireRadioProps}
|
||||||
formHorizontal={true}
|
initial={this.state.currentValue}
|
||||||
labelHorizontal={false}
|
formHorizontal={true}
|
||||||
labelStyle={styles.radioButton}
|
labelHorizontal={false}
|
||||||
onPress={(itemValue) => {
|
labelStyle={styles.radioButton}
|
||||||
this.setState({ currentValue: itemValue })
|
onPress={(itemValue) => {
|
||||||
}}
|
this.setState({ currentValue: itemValue })
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</ScrollView>
|
||||||
<ActionButtonFooter
|
<ActionButtonFooter
|
||||||
symptom='desire'
|
symptom='desire'
|
||||||
cycleDay={this.cycleDay}
|
cycleDay={this.cycleDay}
|
||||||
|
|||||||
@@ -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,44 +48,46 @@ 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 }}>
|
||||||
<View>
|
<ScrollView>
|
||||||
<Text style={styles.symptomDayView}>Feeling</Text>
|
<View>
|
||||||
<View style={styles.radioButtonRow}>
|
<Text style={styles.symptomDayView}>Feeling</Text>
|
||||||
<RadioForm
|
<View style={styles.radioButtonRow}>
|
||||||
radio_props={mucusFeelingRadioProps}
|
<RadioForm
|
||||||
initial={this.state.feeling}
|
radio_props={mucusFeelingRadioProps}
|
||||||
formHorizontal={true}
|
initial={this.state.feeling}
|
||||||
labelHorizontal={false}
|
formHorizontal={true}
|
||||||
labelStyle={styles.radioButton}
|
labelHorizontal={false}
|
||||||
onPress={(itemValue) => {
|
labelStyle={styles.radioButton}
|
||||||
this.setState({ feeling: itemValue })
|
onPress={(itemValue) => {
|
||||||
}}
|
this.setState({ feeling: itemValue })
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<Text style={styles.symptomDayView}>Texture</Text>
|
||||||
|
<View style={styles.radioButtonRow}>
|
||||||
|
<RadioForm
|
||||||
|
radio_props={mucusTextureRadioProps}
|
||||||
|
initial={this.state.texture}
|
||||||
|
formHorizontal={true}
|
||||||
|
labelHorizontal={false}
|
||||||
|
labelStyle={styles.radioButton}
|
||||||
|
onPress={(itemValue) => {
|
||||||
|
this.setState({ texture: itemValue })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={styles.symptomViewRowInline}>
|
||||||
|
<Text style={styles.symptomDayView}>Exclude</Text>
|
||||||
|
<Switch
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({ exclude: val })
|
||||||
|
}}
|
||||||
|
value={this.state.exclude}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<Text style={styles.symptomDayView}>Texture</Text>
|
</ScrollView>
|
||||||
<View style={styles.radioButtonRow}>
|
|
||||||
<RadioForm
|
|
||||||
radio_props={mucusTextureRadioProps}
|
|
||||||
initial={this.state.texture}
|
|
||||||
formHorizontal={true}
|
|
||||||
labelHorizontal={false}
|
|
||||||
labelStyle={styles.radioButton}
|
|
||||||
onPress={(itemValue) => {
|
|
||||||
this.setState({ texture: itemValue })
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View style={styles.symptomViewRowInline}>
|
|
||||||
<Text style={styles.symptomDayView}>Exclude</Text>
|
|
||||||
<Switch
|
|
||||||
onValueChange={(val) => {
|
|
||||||
this.setState({ exclude: val })
|
|
||||||
}}
|
|
||||||
value={this.state.exclude}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<ActionButtonFooter
|
<ActionButtonFooter
|
||||||
symptom='mucus'
|
symptom='mucus'
|
||||||
cycleDay={this.cycleDay}
|
cycleDay={this.cycleDay}
|
||||||
|
|||||||
@@ -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,17 +23,19 @@ export default class Temp extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<View style={styles.menuOnBottom}>
|
<View style={{ flex: 1 }}>
|
||||||
<View style={styles.symptomViewRow}>
|
<ScrollView>
|
||||||
<TextInput
|
<View style={styles.symptomViewRow}>
|
||||||
multiline={true}
|
<TextInput
|
||||||
placeholder="Enter"
|
multiline={true}
|
||||||
onChangeText={(val) => {
|
placeholder="Enter"
|
||||||
this.setState({ currentValue: val })
|
onChangeText={(val) => {
|
||||||
}}
|
this.setState({ currentValue: val })
|
||||||
value={this.state.currentValue}
|
}}
|
||||||
/>
|
value={this.state.currentValue}
|
||||||
</View>
|
/>
|
||||||
|
</View>
|
||||||
|
</ScrollView>
|
||||||
<ActionButtonFooter
|
<ActionButtonFooter
|
||||||
symptom='note'
|
symptom='note'
|
||||||
cycleDay={this.cycleDay}
|
cycleDay={this.cycleDay}
|
||||||
|
|||||||
@@ -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'
|
||||||
@@ -18,7 +19,7 @@ export default class Sex extends Component {
|
|||||||
super(props)
|
super(props)
|
||||||
this.cycleDay = props.cycleDay
|
this.cycleDay = props.cycleDay
|
||||||
this.state = {}
|
this.state = {}
|
||||||
if (this.cycleDay.sex !== null ) {
|
if (this.cycleDay.sex !== null) {
|
||||||
Object.assign(this.state, this.cycleDay.sex)
|
Object.assign(this.state, this.cycleDay.sex)
|
||||||
// We make sure other is always true when there is a note,
|
// We make sure other is always true when there is a note,
|
||||||
// e.g. when import is messed up.
|
// e.g. when import is messed up.
|
||||||
@@ -31,111 +32,113 @@ export default class Sex extends Component {
|
|||||||
render() {
|
render() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.menuOnBottom}>
|
<View style={{ flex: 1 }}>
|
||||||
<View>
|
<ScrollView>
|
||||||
<View style={styles.symptomViewRowInline}>
|
<View>
|
||||||
<Text style={styles.symptomDayView}>{activityLabels.solo}</Text>
|
<View style={styles.symptomViewRowInline}>
|
||||||
<CheckBox
|
<Text style={styles.symptomDayView}>{activityLabels.solo}</Text>
|
||||||
value={this.state.solo}
|
<CheckBox
|
||||||
onValueChange={(val) => {
|
value={this.state.solo}
|
||||||
this.setState({ solo: val })
|
onValueChange={(val) => {
|
||||||
}}
|
this.setState({ solo: val })
|
||||||
/>
|
}}
|
||||||
<Text style={styles.symptomDayView}>{activityLabels.partner}</Text>
|
/>
|
||||||
<CheckBox
|
<Text style={styles.symptomDayView}>{activityLabels.partner}</Text>
|
||||||
value={this.state.partner}
|
<CheckBox
|
||||||
onValueChange={(val) => {
|
value={this.state.partner}
|
||||||
this.setState({ partner: val })
|
onValueChange={(val) => {
|
||||||
}}
|
this.setState({ partner: val })
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<Text style={styles.symptomDayView}>CONTRACEPTIVES</Text>
|
||||||
|
<View style={styles.symptomViewRowInline}>
|
||||||
|
<Text style={styles.symptomDayView}>
|
||||||
|
{contraceptiveLabels.condom}
|
||||||
|
</Text>
|
||||||
|
<CheckBox
|
||||||
|
value={this.state.condom}
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({ condom: val })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Text style={styles.symptomDayView}>
|
||||||
|
{contraceptiveLabels.pill}
|
||||||
|
</Text>
|
||||||
|
<CheckBox
|
||||||
|
value={this.state.pill}
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({ pill: val })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={styles.symptomViewRowInline}>
|
||||||
|
<Text style={styles.symptomDayView}>
|
||||||
|
{contraceptiveLabels.iud}
|
||||||
|
</Text>
|
||||||
|
<CheckBox
|
||||||
|
value={this.state.iud}
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({ iud: val })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Text style={styles.symptomDayView}>
|
||||||
|
{contraceptiveLabels.patch}
|
||||||
|
</Text>
|
||||||
|
<CheckBox
|
||||||
|
value={this.state.patch}
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({ patch: val })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={styles.symptomViewRowInline}>
|
||||||
|
<Text style={styles.symptomDayView}>
|
||||||
|
{contraceptiveLabels.ring}
|
||||||
|
</Text>
|
||||||
|
<CheckBox
|
||||||
|
value={this.state.ring}
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({ ring: val })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Text style={styles.symptomDayView}>
|
||||||
|
{contraceptiveLabels.implant}
|
||||||
|
</Text>
|
||||||
|
<CheckBox
|
||||||
|
value={this.state.implant}
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({ implant: val })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={styles.symptomViewRowInline}>
|
||||||
|
<Text style={styles.symptomDayView}>
|
||||||
|
{contraceptiveLabels.other}
|
||||||
|
</Text>
|
||||||
|
<CheckBox
|
||||||
|
value={this.state.other}
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({
|
||||||
|
other: val,
|
||||||
|
focusTextArea: true
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
{this.state.other &&
|
||||||
|
<TextInput
|
||||||
|
autoFocus={this.state.focusTextArea}
|
||||||
|
multiline={true}
|
||||||
|
placeholder="Enter"
|
||||||
|
value={this.state.note}
|
||||||
|
onChangeText={(val) => {
|
||||||
|
this.setState({ note: val })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
</View>
|
</View>
|
||||||
<Text style={styles.symptomDayView}>CONTRACEPTIVES</Text>
|
</ScrollView>
|
||||||
<View style={styles.symptomViewRowInline}>
|
|
||||||
<Text style={styles.symptomDayView}>
|
|
||||||
{contraceptiveLabels.condom}
|
|
||||||
</Text>
|
|
||||||
<CheckBox
|
|
||||||
value={this.state.condom}
|
|
||||||
onValueChange={(val) => {
|
|
||||||
this.setState({ condom: val })
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text style={styles.symptomDayView}>
|
|
||||||
{contraceptiveLabels.pill}
|
|
||||||
</Text>
|
|
||||||
<CheckBox
|
|
||||||
value={this.state.pill}
|
|
||||||
onValueChange={(val) => {
|
|
||||||
this.setState({ pill: val })
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View style={styles.symptomViewRowInline}>
|
|
||||||
<Text style={styles.symptomDayView}>
|
|
||||||
{contraceptiveLabels.iud}
|
|
||||||
</Text>
|
|
||||||
<CheckBox
|
|
||||||
value={this.state.iud}
|
|
||||||
onValueChange={(val) => {
|
|
||||||
this.setState({ iud: val })
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text style={styles.symptomDayView}>
|
|
||||||
{contraceptiveLabels.patch}
|
|
||||||
</Text>
|
|
||||||
<CheckBox
|
|
||||||
value={this.state.patch}
|
|
||||||
onValueChange={(val) => {
|
|
||||||
this.setState({ patch: val })
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View style={styles.symptomViewRowInline}>
|
|
||||||
<Text style={styles.symptomDayView}>
|
|
||||||
{contraceptiveLabels.ring}
|
|
||||||
</Text>
|
|
||||||
<CheckBox
|
|
||||||
value={this.state.ring}
|
|
||||||
onValueChange={(val) => {
|
|
||||||
this.setState({ ring: val })
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text style={styles.symptomDayView}>
|
|
||||||
{contraceptiveLabels.implant}
|
|
||||||
</Text>
|
|
||||||
<CheckBox
|
|
||||||
value={this.state.implant}
|
|
||||||
onValueChange={(val) => {
|
|
||||||
this.setState({ implant: val })
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View style={styles.symptomViewRowInline}>
|
|
||||||
<Text style={styles.symptomDayView}>
|
|
||||||
{contraceptiveLabels.other}
|
|
||||||
</Text>
|
|
||||||
<CheckBox
|
|
||||||
value={this.state.other}
|
|
||||||
onValueChange={(val) => {
|
|
||||||
this.setState({
|
|
||||||
other: val,
|
|
||||||
focusTextArea: true
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
{this.state.other &&
|
|
||||||
<TextInput
|
|
||||||
autoFocus={this.state.focusTextArea}
|
|
||||||
multiline={true}
|
|
||||||
placeholder="Enter"
|
|
||||||
value={this.state.note}
|
|
||||||
onChangeText={(val) => {
|
|
||||||
this.setState({ note: val })
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</View>
|
|
||||||
<ActionButtonFooter
|
<ActionButtonFooter
|
||||||
symptom='sex'
|
symptom='sex'
|
||||||
cycleDay={this.cycleDay}
|
cycleDay={this.cycleDay}
|
||||||
|
|||||||
@@ -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,52 +43,54 @@ export default class Temp extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<View style={styles.menuOnBottom}>
|
<View style={{ flex: 1 }}>
|
||||||
<View>
|
<ScrollView>
|
||||||
<View style={styles.symptomViewRowInline}>
|
<View>
|
||||||
<Text style={styles.symptomDayView}>Temperature (°C)</Text>
|
<View style={styles.symptomViewRowInline}>
|
||||||
<TextInput
|
<Text style={styles.symptomDayView}>Temperature (°C)</Text>
|
||||||
style={styles.temperatureTextInput}
|
<TextInput
|
||||||
placeholder="Enter"
|
style={styles.temperatureTextInput}
|
||||||
onChangeText={(val) => {
|
placeholder="Enter"
|
||||||
this.setState({ currentValue: val })
|
onChangeText={(val) => {
|
||||||
|
this.setState({ currentValue: val })
|
||||||
|
}}
|
||||||
|
keyboardType='numeric'
|
||||||
|
value={this.state.currentValue}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={styles.symptomViewRowInline}>
|
||||||
|
<Text style={styles.symptomDayView}>Time</Text>
|
||||||
|
<TextInput
|
||||||
|
style={styles.temperatureTextInput}
|
||||||
|
onFocus={() => {
|
||||||
|
Keyboard.dismiss()
|
||||||
|
this.setState({ isTimePickerVisible: true })
|
||||||
|
}}
|
||||||
|
value={this.state.time}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<DateTimePicker
|
||||||
|
mode="time"
|
||||||
|
isVisible={this.state.isTimePickerVisible}
|
||||||
|
onConfirm={jsDate => {
|
||||||
|
this.setState({
|
||||||
|
time: `${jsDate.getHours()}:${jsDate.getMinutes()}`,
|
||||||
|
isTimePickerVisible: false
|
||||||
|
})
|
||||||
}}
|
}}
|
||||||
keyboardType='numeric'
|
onCancel={() => this.setState({ isTimePickerVisible: false })}
|
||||||
value={this.state.currentValue}
|
|
||||||
/>
|
/>
|
||||||
|
<View style={styles.symptomViewRowInline}>
|
||||||
|
<Text style={styles.symptomDayView}>Exclude</Text>
|
||||||
|
<Switch
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({ exclude: val })
|
||||||
|
}}
|
||||||
|
value={this.state.exclude}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.symptomViewRowInline}>
|
</ScrollView>
|
||||||
<Text style={styles.symptomDayView}>Time</Text>
|
|
||||||
<TextInput
|
|
||||||
style={styles.temperatureTextInput}
|
|
||||||
onFocus={() => {
|
|
||||||
Keyboard.dismiss()
|
|
||||||
this.setState({ isTimePickerVisible: true })
|
|
||||||
}}
|
|
||||||
value={this.state.time}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<DateTimePicker
|
|
||||||
mode="time"
|
|
||||||
isVisible={this.state.isTimePickerVisible}
|
|
||||||
onConfirm={jsDate => {
|
|
||||||
this.setState({
|
|
||||||
time: `${jsDate.getHours()}:${jsDate.getMinutes()}`,
|
|
||||||
isTimePickerVisible: false
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
onCancel={() => this.setState({ isTimePickerVisible: false })}
|
|
||||||
/>
|
|
||||||
<View style={styles.symptomViewRowInline}>
|
|
||||||
<Text style={styles.symptomDayView}>Exclude</Text>
|
|
||||||
<Switch
|
|
||||||
onValueChange={(val) => {
|
|
||||||
this.setState({ exclude: val })
|
|
||||||
}}
|
|
||||||
value={this.state.exclude}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<ActionButtonFooter
|
<ActionButtonFooter
|
||||||
symptom='temperature'
|
symptom='temperature'
|
||||||
cycleDay={this.cycleDay}
|
cycleDay={this.cycleDay}
|
||||||
|
|||||||
+1
-5
@@ -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',
|
||||||
|
|||||||
Reference in New Issue
Block a user