diff --git a/BlueComponents.js b/BlueComponents.js index 69d554a8..b4aa92a4 100644 --- a/BlueComponents.js +++ b/BlueComponents.js @@ -640,6 +640,7 @@ export class BlueFormMultiInput extends Component { underlineColorAndroid="transparent" numberOfLines={4} style={{ + flex: 1, marginTop: 5, marginHorizontal: 20, borderColor: BlueApp.settings.inputBorderColor, @@ -647,7 +648,6 @@ export class BlueFormMultiInput extends Component { borderWidth: 0.5, borderBottomWidth: 0.5, backgroundColor: BlueApp.settings.inputBackgroundColor, - height: 200, color: BlueApp.settings.foregroundColor, }} autoCorrect={false} @@ -938,11 +938,10 @@ export class BlueDoneAndDismissKeyboardInputAccessory extends Component { @@ -954,7 +953,7 @@ export class BlueDoneAndDismissKeyboardInputAccessory extends Component { if (Platform.OS === 'ios') { return {inputView}; } else { - return {inputView}; + return {inputView}; } } } diff --git a/screen/wallets/import.js b/screen/wallets/import.js index d904f5de..9b86d70f 100644 --- a/screen/wallets/import.js +++ b/screen/wallets/import.js @@ -1,6 +1,6 @@ /* global alert */ import React, { useEffect, useState } from 'react'; -import { ScrollView, KeyboardAvoidingView, Platform, Dimensions, View, Keyboard } from 'react-native'; +import { Platform, Dimensions, View, Keyboard } from 'react-native'; import { BlueFormMultiInput, BlueButtonLink, @@ -25,8 +25,14 @@ const WalletsImport = () => { useEffect(() => { Privacy.enableBlur(); - return () => Privacy.disableBlur(); - }); + Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', () => setIsToolbarVisibleForAndroid(true)); + Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', () => setIsToolbarVisibleForAndroid(false)); + return () => { + Keyboard.removeListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide'); + Keyboard.removeListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow'); + Privacy.disableBlur(); + }; + }, []); const importButtonPressed = () => { if (importText.trim().length === 0) { @@ -62,64 +68,59 @@ const WalletsImport = () => { return ( - - - {loc.wallets.import.explanation} - - setIsToolbarVisibleForAndroid(true)} - onBlur={() => setIsToolbarVisibleForAndroid(false)} - /> - {Platform.select({ - ios: ( - { - setImportText(''); - Keyboard.dismiss(); - }} - onPasteTapped={text => { - setImportText(text); - Keyboard.dismiss(); - }} - /> - ), - android: isToolbarVisibleForAndroid && ( - { - setImportText(''); - Keyboard.dismiss(); - }} - onPasteTapped={text => { - setImportText(text); - Keyboard.dismiss(); - }} - /> - ), - })} - + {loc.wallets.import.explanation} + + + + + + - - { + navigate('ScanQRCode', { launchedBy: 'ImportWallet', onBarScanned, showFileImportButton: true }); + }} + /> + + {Platform.select({ + ios: ( + { + setImportText(''); + Keyboard.dismiss(); + }} + onPasteTapped={text => { + setImportText(text); + Keyboard.dismiss(); }} - onPress={importButtonPressed} /> - - { - navigate('ScanQRCode', { launchedBy: 'ImportWallet', onBarScanned, showFileImportButton: true }); + ), + android: isToolbarVisibleForAndroid && ( + { + setImportText(''); + Keyboard.dismiss(); + }} + onPasteTapped={text => { + setImportText(text); + Keyboard.dismiss(); }} /> - - + ), + })} ); };