|
|
@ -47,21 +47,26 @@ const styles = StyleSheet.create({ |
|
|
|
width: "100%", |
|
|
|
height: "100%" |
|
|
|
}, |
|
|
|
dropdown: { |
|
|
|
dropdownContainer: { |
|
|
|
marginTop: 20, |
|
|
|
borderRadius: 20, |
|
|
|
width: "100%", |
|
|
|
textAlign: "center", |
|
|
|
backgroundColor: colors.black_alpha |
|
|
|
}, |
|
|
|
dropdown: { |
|
|
|
color: colors.white, |
|
|
|
fontSize: 16, |
|
|
|
borderRadius: 10, |
|
|
|
width: "100%", |
|
|
|
textAlign: "left", |
|
|
|
textAlign: "center", |
|
|
|
fontWeight: "600", |
|
|
|
backgroundColor: colors.white_alpha |
|
|
|
backgroundColor: "transparent" |
|
|
|
}, |
|
|
|
dropdownItem: { |
|
|
|
color: colors.white, |
|
|
|
fontSize: 16, |
|
|
|
borderRadius: 10, |
|
|
|
textAlign: "left", |
|
|
|
textAlign: "center", |
|
|
|
fontWeight: "600" |
|
|
|
}, |
|
|
|
bannerContainer: { |
|
|
@ -234,17 +239,19 @@ class Quiz extends React.Component { |
|
|
|
{`${this.state.correctCount+this.state.wrongCount}/${this.state.totalCount}`} |
|
|
|
</Text> |
|
|
|
|
|
|
|
<Picker |
|
|
|
style={styles.dropdown} |
|
|
|
itemStyle={styles.dropdownItem} |
|
|
|
onValueChange={(itemValue, itemIndex) => this.jumpTo(itemValue, itemIndex)} |
|
|
|
> |
|
|
|
<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} /> |
|
|
|
{this.state.availableQuestions.map( (item, index) => ( |
|
|
|
<Picker.Item key={`item${item.id}`} label={`${item.id} - ${item.question}`} value={item.id} /> |
|
|
|
))} |
|
|
|
</Picker> |
|
|
|
<Picker.Item key={`itemPlaceholder`} label={texts.goToQuestion} 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> |
|
|
|
: <SafeAreaView></SafeAreaView>} |
|
|
|