Browse Source

change checkboxes to switch

feature/upgrade_sdk
Carmine De Rosa 5 years ago
parent
commit
0dcaa05710
  1. BIN
      builds/VDS-Quiz-364bf545b3fe4b068b03bed4c78d0461-signed.aab
  2. BIN
      builds/VDS-Quiz-7c9b0c81f6ce4207838ccd204b6f2234-signed.aab
  3. 2
      vds-app/App/components/ExamQuestions.js
  4. 4
      vds-app/App/screens/QuizIndex.js
  5. 39
      vds-app/App/screens/Setup.js
  6. 4
      vds-app/app.json

BIN
builds/VDS-Quiz-633b8f0582f34434b3bb044f1415d846-signed.aab → builds/VDS-Quiz-364bf545b3fe4b068b03bed4c78d0461-signed.aab

Binary file not shown.

BIN
builds/VDS-Quiz-6df68d2a7d8e4e06b2573db004fbe072-signed.aab → builds/VDS-Quiz-7c9b0c81f6ce4207838ccd204b6f2234-signed.aab

Binary file not shown.

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

@ -35,7 +35,7 @@ const generateQuestions = () => {
if(!value) {
setupData = {
randomQuestions: true,
excludeDelta: false
excludeDelta: true
}
AsyncStorage.setItem('setupData', JSON.stringify(setupData))
} else {

4
vds-app/App/screens/QuizIndex.js

@ -41,8 +41,8 @@ class QuizIndex extends React.Component {
state = {
storeWrongAnswers: [],
randomQuestions: false,
excludeDelta: false
randomQuestions: true,
excludeDelta: true
}
componentDidMount() {

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

@ -1,5 +1,5 @@
import React from "react"
import { View, ScrollView, StyleSheet, StatusBar, Text, CheckBox, SafeAreaView, Dimensions, Image, ImageBackground, BackHandler, AsyncStorage} from "react-native"
import { View, ScrollView, StyleSheet, StatusBar, Text, CheckBox, Switch, SafeAreaView, Dimensions, Image, ImageBackground, BackHandler, AsyncStorage} from "react-native"
import { Button, ButtonContainer } from "../components/Button"
import { colors, texts, examScheme, resultsScheme} from "../components/Variables"
@ -123,20 +123,25 @@ const styles = StyleSheet.create({
fontWeight: "600"
},
checkboxContainer: {
switchContainer: {
flexDirection: "row",
paddingBottom: 10,
marginBottom: 10,
borderBottomColor: colors.black_alpha,
borderBottomWidth: 1,
},
checkbox: {
alignSelf: "center",
color: "white"
switch: {
alignSelf: "flex-start",
color: "white",
marginRight: 0,
marginLeft: "auto"
},
checkboxLabel: {
switchLabel: {
fontSize: 16,
fontWeight: "600",
marginLeft: 8,
marginRight: 8
marginRight: 8,
width: "75%"
},
button: {
marginTop: 20
@ -159,7 +164,7 @@ class Setup extends React.Component {
if(!value) {
setupData = {
randomQuestions: true,
excludeDelta: false
excludeDelta: true
}
AsyncStorage.setItem('setupData', JSON.stringify(setupData))
} else {
@ -205,7 +210,7 @@ class Setup extends React.Component {
}
changeSetup = (item) => {
setupData = this.state.setupData
let setupData = this.state.setupData
setupData[item] = !this.state.setupData[item]
this.setState( (state) => {
@ -233,22 +238,22 @@ class Setup extends React.Component {
<View style={styles.textSmall}>
<View style={styles.checkboxContainer}>
<CheckBox
<View style={styles.switchContainer}>
<Text style={styles.switchLabel}>{texts.setupRandomCheck}</Text>
<Switch
value={this.state.setupData.randomQuestions}
onValueChange={() => this.changeSetup('randomQuestions')}
style={styles.checkbox}
style={styles.switch}
/>
<Text style={styles.checkboxLabel}>{texts.setupRandomCheck}</Text>
</View>
<View style={[styles.checkboxContainer, styles.noBorder]}>
<CheckBox
<View style={[styles.switchContainer, styles.noBorder]}>
<Text style={styles.switchLabel}>{texts.setupExcludeDelta}</Text>
<Switch
value={this.state.setupData.excludeDelta}
onValueChange={() => this.changeSetup('excludeDelta')}
style={styles.checkbox}
style={styles.switch}
/>
<Text style={styles.checkboxLabel}>{texts.setupExcludeDelta}</Text>
</View>

4
vds-app/app.json

@ -7,7 +7,7 @@
"ios",
"android"
],
"version": "3.6.3",
"version": "3.6.4",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
@ -25,7 +25,7 @@
"icon": "./assets/icon.png",
"package": "com.dslak.vdsquiz",
"permissions": [],
"versionCode": 20,
"versionCode": 21,
"config": {
"googleMobileAdsAppId": "ca-app-pub-4145771316565790~1876877627"
}

Loading…
Cancel
Save