From 3502b71f92327934ccfddca152999d913dbadc7e Mon Sep 17 00:00:00 2001 From: Yevhenii Lukashov <115802889+EuJinnLucaShow@users.noreply.github.com> Date: Fri, 11 Aug 2023 22:34:40 +0300 Subject: [PATCH] Keyboard operation --- App.js | 86 ++++++++++++++++++++++++++++------- Screens/LoginScreen.js | 0 Screens/PostsScreen.js | 0 Screens/RegistrationScreen.js | 0 4 files changed, 69 insertions(+), 17 deletions(-) create mode 100644 Screens/LoginScreen.js create mode 100644 Screens/PostsScreen.js create mode 100644 Screens/RegistrationScreen.js diff --git a/App.js b/App.js index 9c5d99d..9917bbe 100644 --- a/App.js +++ b/App.js @@ -1,3 +1,4 @@ +import { useState } from 'react'; import { StatusBar } from 'expo-status-bar'; import { StyleSheet, @@ -6,29 +7,56 @@ import { ImageBackground, TextInput, TouchableOpacity, + KeyboardAvoidingView, } from 'react-native'; const wallpaper = require('./assets/images/wallpaper.png'); export default function App() { + const [isShowKeyboard, setIsShowKeyboard] = useState(false); + return ( - - - - - - Зареєструватися - - + + + + Реєстрація + setIsShowKeyboard(true)} + /> + setIsShowKeyboard(true)} + /> + setIsShowKeyboard(true)} + /> + + Зареєструватися + + Вже є акаунт? Увійти + + @@ -44,11 +72,26 @@ const styles = StyleSheet.create({ }, image: { flex: 1, - resizeMode: 'cover', - justifyContent: 'center', + justifyContent: 'flex-end', width: '100%', height: '100%', }, + form: { + height: 550, + backgroundColor: '#fff', + borderTopLeftRadius: 25, + borderTopRightRadius: 25, + justifyContent: 'flex-end', + }, + title: { + textAlign: 'center', + fontSize: 30, + color: '#212121', + fontFamily: 'Roboto', + fontWeight: '500', + letterSpacing: 0.3, + marginBottom: 33, + }, input: { marginHorizontal: 16, height: 50, @@ -72,4 +115,13 @@ const styles = StyleSheet.create({ fontFamily: 'Roboto', fontWeight: '400', }, + text: { + textAlign: 'center', + color: '#1B4371', + fontSize: 16, + fontFamily: 'Roboto', + fontWeight: '400', + marginTop: 16, + marginBottom: 66, + }, }); diff --git a/Screens/LoginScreen.js b/Screens/LoginScreen.js new file mode 100644 index 0000000..e69de29 diff --git a/Screens/PostsScreen.js b/Screens/PostsScreen.js new file mode 100644 index 0000000..e69de29 diff --git a/Screens/RegistrationScreen.js b/Screens/RegistrationScreen.js new file mode 100644 index 0000000..e69de29