Açıklama Yok

AvailabilityScreen.js 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import React, { Component } from "react";
  2. import { TextInput, TouchableWithoutFeedback, Keyboard, ImageBackground, Image, View } from "react-native";
  3. import firebase from "firebase";
  4. import { Picker } from "@react-native-picker/picker";
  5. import { styles } from "../config/styles";
  6. import CustomButton from "../components/CustomButton";
  7. export default class AvailabilityScreen extends Component {
  8. constructor(props) {
  9. super(props);
  10. this.state = {
  11. face_to_face: false,
  12. online: false,
  13. multiple: false,
  14. one_on_one: false,
  15. spanish: false,
  16. english: false,
  17. language: 0,
  18. };
  19. };
  20. render() {
  21. return (
  22. <View style={styles.regcontainer}>
  23. <Picker style={styles.picker} selectedValue={this.state.language} onValueChange={(itemValue,itemIndex) => {
  24. this.setState({language: itemValue})
  25. if(itemValue === 0){
  26. this.setState({english: true, spanish: false});
  27. }
  28. else if(itemValue === 1){
  29. this.setState({english: false, spanish: true});
  30. }
  31. else{
  32. this.setState({english: true, spanish: true});
  33. }}}>
  34. <Picker.Item label="English" value={0}/>
  35. <Picker.Item label="Spanish" value={1}/>
  36. <Picker.Item label="Both" value={2}/>
  37. </Picker>
  38. </View>
  39. );
  40. }
  41. }