Skip to content
Snippets Groups Projects
Commit 9f9d59dc authored by Andrea Magnussen's avatar Andrea Magnussen
Browse files

Added keyboard avoiding view to change slamander

parent f804c89f
No related branches found
No related tags found
1 merge request!61Resolve "Fix Keyboard"
......@@ -11,9 +11,10 @@ import {
Dimensions,
Alert,
Modal,
KeyboardAvoidingView
} from "react-native";
import CustomDropDown from "../../components/CustomDropDown";
import { TextInput, HelperText } from "react-native-paper";
import { TextInput, HelperText, Button } from "react-native-paper";
import { Divider } from "react-native-paper";
import ImageViewer from "react-native-image-zoom-viewer";
import Toast from "react-native-toast-message";
......@@ -247,6 +248,11 @@ const _ChangeSalamanderScreen = (props) => {
const locations = getLocations();
const keyboardProps = Platform.select({
android: { behavior:'padding' },
ios: { behavior:'position' },
});
useEffect(() => {
setImage(salamanderImageData.images[0].url);
}, []);
......@@ -254,6 +260,7 @@ const _ChangeSalamanderScreen = (props) => {
return (
<SafeAreaView style={styles.container}>
<ScrollView>
<KeyboardAvoidingView {...keyboardProps} keyboardVerticalOffset={30}>
<CustomActivityIndicator
style={styles.activityIndicator}
visible={showIndicator}
......@@ -404,14 +411,15 @@ const _ChangeSalamanderScreen = (props) => {
/>
</View>
<Divider style={{ marginTop: 20 }} />
<CustomButton
<Button
style={styles.button}
color="red"
title="Delete"
mode="contained"
onPress={createTwoButtonAlert}
/>
>Delete</Button>
<Divider style={{ marginBottom: 20 }} />
</KeyboardAvoidingView>
</ScrollView>
</SafeAreaView>
);
......@@ -463,5 +471,6 @@ const styles = StyleSheet.create({
button: {
margin: 10,
width: "40%",
alignSelf: "center",
},
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment