diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 0b0cc04276..58caed1e4d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -26,7 +26,7 @@ android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" - android:windowSoftInputMode="stateAlwaysHidden|adjustPan"> + android:windowSoftInputMode="adjustPan"> diff --git a/src/components/AccountSeed.js b/src/components/AccountSeed.js index a29a761787..3dead6b8a0 100644 --- a/src/components/AccountSeed.js +++ b/src/components/AccountSeed.js @@ -132,6 +132,7 @@ export default class AccountSeed extends Component { style={[styles.input, invalidStyles]} multiline autoCapitalize="none" + textAlignVertical="top" onSelectionChange={this.handleCursorPosition} {...this.props} /> diff --git a/src/components/KeyboardScrollView.js b/src/components/KeyboardScrollView.js new file mode 100644 index 0000000000..bdff46d0ca --- /dev/null +++ b/src/components/KeyboardScrollView.js @@ -0,0 +1,31 @@ +import React from 'react'; +import { Keyboard, Platform } from 'react-native'; +import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; + +class KeyboardScrollView extends React.Component { + render() { + const defaultProps = { enableAutomaticScroll: true }; + return Platform.select({ + ios: ( + + ), + android: ( + + ) + }); + } +} + +export default KeyboardScrollView; diff --git a/src/screens/AccountNew.js b/src/screens/AccountNew.js index 1dbc3c5857..da06fc2e2e 100644 --- a/src/screens/AccountNew.js +++ b/src/screens/AccountNew.js @@ -17,8 +17,7 @@ 'use strict'; import React from 'react'; -import { StyleSheet, ScrollView, Text, View } from 'react-native'; -import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view' +import { StyleSheet, Text, View } from 'react-native'; import { Subscribe } from 'unstated'; import colors from '../colors'; @@ -26,11 +25,11 @@ import AccountIconChooser from '../components/AccountIconChooser'; import Background from '../components/Background'; import Button from '../components/Button'; import TextInput from '../components/TextInput'; -import TouchableItem from '../components/TouchableItem'; import { NETWORK_LIST } from '../constants'; import AccountsStore from '../stores/AccountsStore'; import { validateSeed } from '../util/account'; import NetworkButton from '../components/NetworkButton'; +import KeyboardScrollView from '../components/KeyboardScrollView'; export default class AccountNew extends React.Component { static navigationOptions = { @@ -48,7 +47,7 @@ export default class AccountNew extends React.Component { class AccountNewView extends React.Component { render() { - const { accounts } = this.props; + const { accounts, navigation } = this.props; const selected = accounts.getNew(); const network = NETWORK_LIST[selected.networkKey]; if (!selected) { @@ -56,54 +55,49 @@ class AccountNewView extends React.Component { } return ( - + - - - CREATE ACCOUNT - CHOOSE NETWORK - - - CHOOSE AN IDENTICON - - { - accounts.updateNew({ address, seed, validBip39Seed: bip39 }); - }} - /> - ACCOUNT NAME - accounts.updateNew({ name })} - value={selected && selected.name} - placeholder="Enter a new account name" - /> - - - - On the next step you will be asked to backup your account, get pen - and paper ready - -