Browse Source

fix debug error

feature/upgrade_sdk
Carmine De Rosa 5 years ago
parent
commit
a32301618c
  1. 2
      vds-app/App/components/Button.js
  2. 3
      vds-app/App/components/Variables.js
  3. 12
      vds-app/App/screens/Quiz.js
  4. 16
      vds-app/App/screens/Setup.js
  5. 1
      vds-app/App/screens/Splash.js

2
vds-app/App/components/Button.js

@ -42,7 +42,7 @@ const styles = StyleSheet.create({
marginTop: 20,
justifyContent: "space-between",
overflow: "hidden",
borderRadius: 20
borderRadius: 10
},
buttonBg: {
flex: 1,

3
vds-app/App/components/Variables.js

@ -50,6 +50,7 @@ export const texts = {
recapTitle: "Riepilogo risposte sbagliate",
infoTitle: "Informazioni App",
setupTitle: "Impostazioni",
setupSubtitle: "Configura le funzionalità dell'app",
dictionaryTitle: "Terminologia",
dictionarySubtitle: "Dizionario ICAO e abbreviazioni",
alphabethTitle: "Alfabeto ICAO",
@ -58,6 +59,7 @@ export const texts = {
version: "Versione",
author: "Autore",
exit: "Esci",
save: "Salva",
exitQuestion: "Vuoi uscire dall'app?",
description: "VDS Quiz è una applicazione che utilizza le 500 domande ufficiali dell'AeCI (Aero Club d'Italia), nella simulazione le domande vengono estrapolate seguendo lo schema ufficiale d'esame:",
source: "PDF Domande ufficiali",
@ -82,6 +84,7 @@ export const texts = {
trueFalse: "Test Vero/Falso",
trueFalseSubtitle: "10 domande casuali con risposte Vero/Falso",
goToQuestion: "Seleziona ad una domanda specifica...",
changeQuestion: "Cambia domanda...",
lens: "\uD83D\uDD0D"
}

12
vds-app/App/screens/Quiz.js

@ -49,10 +49,10 @@ const styles = StyleSheet.create({
},
dropdownContainer: {
marginTop: 20,
borderRadius: 20,
borderRadius: 10,
width: "100%",
textAlign: "center",
backgroundColor: colors.black_alpha
backgroundColor: colors.blue
},
dropdown: {
color: colors.white,
@ -64,6 +64,7 @@ const styles = StyleSheet.create({
},
dropdownItem: {
color: colors.white,
backgroundColor: "red",
fontSize: 16,
borderRadius: 10,
textAlign: "center",
@ -120,9 +121,11 @@ class Quiz extends React.Component {
})
}
/*
componentWillUnmount() {
BackHandler.removeEventListener('hardwareBackPress', this.handleBackButton)
}
*/
handleBackButton = () => {
this.props.navigation.navigate("Splash")
@ -240,17 +243,18 @@ class Quiz extends React.Component {
</Text>
<View style={styles.dropdownContainer}>
<Picker
style={styles.dropdown}
itemStyle={styles.dropdownItem}
onValueChange={(itemValue, itemIndex) => this.jumpTo(itemValue, itemIndex)}
>
<Picker.Item key={`itemPlaceholder`} label={texts.goToQuestion} value={0} />
<Picker.Item key={`itemPlaceholder`} label={texts.changeQuestion} value={0} />
{this.state.availableQuestions.map( (item, index) => (
<Picker.Item key={`item${item.id}`} label={`${item.id} - ${item.question}`} value={item.id} />
))}
</Picker>
</View>
</SafeAreaView>

16
vds-app/App/screens/Setup.js

@ -54,7 +54,7 @@ const styles = StyleSheet.create({
textSmall: {
lineHeight: 23,
marginTop: 15,
borderRadius: 20,
borderRadius: 10,
backgroundColor: colors.white,
borderWidth: 0,
borderColor: colors.white_alpha,
@ -115,6 +115,9 @@ const styles = StyleSheet.create({
checkboxLabel: {
marginLeft: 8,
marginRight: 8
},
button: {
marginTop: 20
}
})
@ -208,7 +211,16 @@ class Setup extends React.Component {
</View>
<View style={styles.button}>
<Button
color={colors.white_alpha2}
hasShadow={true}
hasBg={true}
text={texts.save}
onPress={() => {this.handleBackButton()}
}
/>
</View>
</View>
</ScrollView>

1
vds-app/App/screens/Splash.js

@ -236,6 +236,7 @@ class Splash extends React.Component {
/>
<Button
text={texts.setupTitle}
subtitle={`(${texts.setupSubtitle})`}
isBig={false}
hasBg={true}
noPadding={true}

Loading…
Cancel
Save