Без опису

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import React, { Component } from "react";
  2. import { Text, View, StyleSheet, Button, ScrollView, Picker, TextInput } from "react-native";
  3. export default class SettingScreen extends Component {
  4. state = {
  5. faculty: "naturales"
  6. }
  7. render() {
  8. return(
  9. <View style={styles.container}>
  10. <View style={{alignItems: "center", backgroundColor: 'red', marginTop: 30, marginBottom: 150}}>
  11. <Text style= {{fontSize: 20, fontWeight: "bold"}}> Profile Settings </Text>
  12. </View>
  13. <View style={{alignItems: "flex-start", backgroundColor: 'Silver', flex:0}}>
  14. <Button
  15. title="<Back"
  16. onPress= {() => this.props.navigation.navigate("Profile")}
  17. />
  18. </View>
  19. <View style={{alignItems: "center",backgroundColor: 'white', flex:0}}>
  20. <Text style={{ fontSize: 20}}> Name: </Text>
  21. <TextInput style= {{borderColor: "black", borderWidth: 2, width: 250}}>
  22. </TextInput>
  23. <Button
  24. title="Update Name"
  25. onPress={this.prueba}
  26. />
  27. <Text style={{ fontSize: 20}}> Email: </Text>
  28. <TextInput style= {{borderColor: "black", borderWidth: 2, width: 250}}>
  29. </TextInput>
  30. <Button
  31. title="Update Email"
  32. onPress={this.prueba}
  33. />
  34. <Text style={{ fontSize: 20}}> Student ID: </Text>
  35. <TextInput style= {{borderColor: "black", borderWidth: 2, width: 250}}>
  36. </TextInput>
  37. <Button
  38. title="Update Student ID"
  39. onPress={this.prueba}
  40. />
  41. </View>
  42. <View style={{alignItems: "center", backgroundColor: 'red', marginTop: 50, marginBottom: 300}}>
  43. <Text style={{ fontSize: 20, fontWeight: "bold" , height:30 }}> Faculty </Text>
  44. <Picker
  45. selectedValue={this.state.faculty}
  46. style={{ height: 0, width: 1000}}
  47. onValueChange={(itemValue, itemIndex) =>
  48. this.setState({ faculty: itemValue })
  49. }>
  50. <Picker.Item label="Administración de Empresas" value="001" />
  51. <Picker.Item label="Arquitectura" value="002" />
  52. <Picker.Item label="Ciencias Naturales" value="003" />
  53. <Picker.Item label="Ciencias Sociales" value="004" />
  54. <Picker.Item label="Educación" value="005" />
  55. <Picker.Item label="Bellas Artes" value="006" />
  56. <Picker.Item label="Communicaciones" value="007" />
  57. </Picker>
  58. </View>
  59. </View>
  60. );
  61. }
  62. }
  63. const styles = StyleSheet.create({
  64. container: {
  65. flex: 1,
  66. justifyContent: "center"
  67. }
  68. });