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, marginTop: 20,
justifyContent: "space-between", justifyContent: "space-between",
overflow: "hidden", overflow: "hidden",
borderRadius: 20
borderRadius: 10
}, },
buttonBg: { buttonBg: {
flex: 1, flex: 1,

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

@ -50,6 +50,7 @@ export const texts = {
recapTitle: "Riepilogo risposte sbagliate", recapTitle: "Riepilogo risposte sbagliate",
infoTitle: "Informazioni App", infoTitle: "Informazioni App",
setupTitle: "Impostazioni", setupTitle: "Impostazioni",
setupSubtitle: "Configura le funzionalità dell'app",
dictionaryTitle: "Terminologia", dictionaryTitle: "Terminologia",
dictionarySubtitle: "Dizionario ICAO e abbreviazioni", dictionarySubtitle: "Dizionario ICAO e abbreviazioni",
alphabethTitle: "Alfabeto ICAO", alphabethTitle: "Alfabeto ICAO",
@ -58,6 +59,7 @@ export const texts = {
version: "Versione", version: "Versione",
author: "Autore", author: "Autore",
exit: "Esci", exit: "Esci",
save: "Salva",
exitQuestion: "Vuoi uscire dall'app?", 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:", 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", source: "PDF Domande ufficiali",
@ -82,6 +84,7 @@ export const texts = {
trueFalse: "Test Vero/Falso", trueFalse: "Test Vero/Falso",
trueFalseSubtitle: "10 domande casuali con risposte Vero/Falso", trueFalseSubtitle: "10 domande casuali con risposte Vero/Falso",
goToQuestion: "Seleziona ad una domanda specifica...", goToQuestion: "Seleziona ad una domanda specifica...",
changeQuestion: "Cambia domanda...",
lens: "\uD83D\uDD0D" lens: "\uD83D\uDD0D"
} }

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

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

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

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

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

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

Loading…
Cancel
Save