From 37cba6125b8e962dea9f389bbc850abdd10ea6d1 Mon Sep 17 00:00:00 2001 From: ue Date: Thu, 27 Sep 2018 22:02:18 +0300 Subject: [PATCH] changed png added aware scroll view && created keyboard logic if it open --- package-lock.json | 25 +++- package.json | 1 + src/assets/steem_connect.png | Bin 1559 -> 1653 bytes .../buttons/views/greetingHeaderButtonView.js | 6 +- src/screens/login/screen/loginScreen.js | 140 +++++++++--------- src/screens/login/screen/loginStyles.js | 2 + 6 files changed, 97 insertions(+), 77 deletions(-) diff --git a/package-lock.json b/package-lock.json index bd504906f..1389be4ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7710,6 +7710,15 @@ "graceful-fs": "^4.1.2", "jsonfile": "^2.1.0" } + }, + "react-native-keyboard-aware-scroll-view": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.5.0.tgz", + "integrity": "sha512-nGXsACZBCiWuwRrZy+UjiSJqb4tZ/6ePHUSY8M+09g4VfNm/ogvvWpwBa6B999NZ6DwhZTKBjVWeZxX9XG8bbQ==", + "requires": { + "prop-types": "^15.6.0", + "react-native-iphone-x-helper": "^1.0.1" + } } } }, @@ -8867,17 +8876,17 @@ } }, "react-native-iphone-x-helper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.0.3.tgz", - "integrity": "sha512-QHzpx4fv9u30VVU1DMgotiZsUB+m4BRjypca2rOczyj3cZBny5I+QDplrpFIBhzsa1iADNkziWa7kInzmKs00Q==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.0.tgz", + "integrity": "sha512-xIeTo4s77wwKgBZLVRIZC9tM9/PkXS46Ul76NXmvmixEb3ZwqGdQesR3zRiLMOoIdfOURB6N9bba9po7+x9Bag==" }, "react-native-keyboard-aware-scroll-view": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.5.0.tgz", - "integrity": "sha512-nGXsACZBCiWuwRrZy+UjiSJqb4tZ/6ePHUSY8M+09g4VfNm/ogvvWpwBa6B999NZ6DwhZTKBjVWeZxX9XG8bbQ==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.7.2.tgz", + "integrity": "sha512-FCVKAmM5jHwbWZFW/zUOhid18OoSGcbyx2jGk+q6eVjjtj+RPomeqX0aAHf2ALXYJ1BuC5+OtXhFA/hp8ombcQ==", "requires": { - "prop-types": "^15.6.0", - "react-native-iphone-x-helper": "^1.0.1" + "prop-types": "^15.6.2", + "react-native-iphone-x-helper": "^1.0.3" } }, "react-native-lightbox": { diff --git a/package.json b/package.json index 319c20899..30adbf80d 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "react-native-extended-stylesheet": "^0.10.0", "react-native-fast-image": "^4.0.14", "react-native-html-renderer": "^1.0.0", + "react-native-keyboard-aware-scroll-view": "^0.7.2", "react-native-markdown-editor": "^1.0.1", "react-native-modal": "^6.5.0", "react-native-modal-popover": "0.0.10", diff --git a/src/assets/steem_connect.png b/src/assets/steem_connect.png index 97e8a64858668db05c5d86ff1e44932ca5861d28..b7b8bd7f11f0202b27e47ccbe20655c2976e8e82 100644 GIT binary patch literal 1653 zcmV-*28#KKP)>@sruqD*&8+xIomDz^vy(a7Vsy0us0d2Wq;$=5Z*2)lf zrzY8G6o81xRReQiLy%IVamVmn$gNN#_Xh2Mlp1}zhP`qJjL}z`D63j{g%lhKB{{#O zEZXBF?oBG$1W#mzXqrSf`8g%m?I4$`d)QJq3_BZwQ6L9^s=JtrwG-N2YA^=xGZbop z8a6D*-_S7bTz{_FmOI$*Rw_J6B_k-Biv5!z+3X5&`GIM_U?4g>T`5zJL)`#xy>R#I~*P13?Eq)*LD7DKuRhDU-K`7W;19Z8@ z^3qZ&uY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%#arOSSB-PfL&Z1+}vc;UqD zhr2M>R5XayU}AsRFovnQk58Qm_C5fArD+AW-B<@}HTK+CPGNtNO6r>5lg&Bgc4(ry9N)`V#_Y^V5HlZYdla(#j*3v#(dWicz>bID zrzpg6n{Ni-KuLu{gW!3{BMWV2{Xx(Sn}!_}Aj!-&*J-UUjm>Y9ZSfFNGMZTG@XkLHeVO~2+)uC6N|ze;?IB5U~RHp@~c`fXJu)~ zE1g1UEL!_jZ_W5&F-Z8)!r&0hV8)qyAbYluP*{dV%DmSAsA>Q_T}{R>=qb<|wTxyS$j002ov JPDHLkV1i;A?`Qx3 diff --git a/src/components/buttons/views/greetingHeaderButtonView.js b/src/components/buttons/views/greetingHeaderButtonView.js index 7f32598dc..32a0f3253 100644 --- a/src/components/buttons/views/greetingHeaderButtonView.js +++ b/src/components/buttons/views/greetingHeaderButtonView.js @@ -1,5 +1,5 @@ import React, { Fragment } from "react"; -import { TouchableWithoutFeedback, Text } from "react-native"; +import { TouchableWithoutFeedback, Text, View } from "react-native"; import styles from "./greetingHeaderButtonStyles"; @@ -9,7 +9,9 @@ const GreetingHeaderButtonView = ({ text, onPress, style }) => ( style={[styles.button, style]} onPress={() => onPress && onPress()} > - {text} + + {text} + ); diff --git a/src/screens/login/screen/loginScreen.js b/src/screens/login/screen/loginScreen.js index 127a20d02..583d3f3de 100644 --- a/src/screens/login/screen/loginScreen.js +++ b/src/screens/login/screen/loginScreen.js @@ -14,7 +14,7 @@ import { addNewAccount } from "../../../redux/actions/accountAction"; import { goToAuthScreens } from "../../../navigation"; import { lookupAccounts } from "../../../providers/steem/dsteem"; import STEEM_CONNECT_LOGO from "../../../assets/steem_connect.png"; - +import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view"; // Styles import styles from "./loginStyles"; @@ -60,6 +60,7 @@ class LoginScreen extends Component { password: "", isLoading: false, isUsernameValid: true, + keyboardIsOpen: false, }; } @@ -138,83 +139,88 @@ class LoginScreen extends Component { }; render() { - const { isLoading, username, isUsernameValid } = this.state; + const { isLoading, username, isUsernameValid, keyboardIsOpen } = this.state; return ( + + ); } diff --git a/src/screens/login/screen/loginStyles.js b/src/screens/login/screen/loginStyles.js index e7d3fe5c4..37a8bd251 100644 --- a/src/screens/login/screen/loginStyles.js +++ b/src/screens/login/screen/loginStyles.js @@ -36,11 +36,13 @@ export default EStyleSheet.create({ flex: 1, backgroundColor: "#ffffff", minWidth: "$deviceWidth", + height: "$deviceHeight / 1.95", }, steemConnectTab: { backgroundColor: "#fff", minWidth: "$deviceWidth", flex: 1, + height: "$deviceHeight / 1.95", }, mainButtonWrapper: { position: "absolute",