added keyboard avoiding view

This commit is contained in:
Sadaqat Ali 2022-04-19 10:11:53 +05:00
parent 000a0af461
commit af15c488cc
2 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,6 @@
/* eslint-disable react/no-unused-state */
import React, { Fragment, Component } from 'react';
import { Text, View, ScrollView, Alert } from 'react-native';
import { Text, View, ScrollView, Alert, KeyboardAvoidingView, Platform } from 'react-native';
import { injectIntl } from 'react-intl';
import Slider from '@esteemapp/react-native-slider';
import get from 'lodash/get';
@ -390,7 +390,11 @@ class PowerDownView extends Component {
return (
<Fragment>
<BasicHeader title={intl.formatMessage({ id: `transfer.${transferType}` })} />
<View style={styles.container}>
<KeyboardAvoidingView
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
style={styles.powerDownKeyboadrAvoidingContainer}
keyboardShouldPersistTaps
>
<ScrollView style={styles.scroll} contentContainerStyle={styles.scrollContentContainer}>
{this._renderBeneficiarySelectionContent()}
{_renderMiddleContent()}
@ -496,7 +500,7 @@ class PowerDownView extends Component {
)}
</View>
</ScrollView>
</View>
</KeyboardAvoidingView>
<OptionsModal
ref={this.startActionSheet}
options={[

View File

@ -347,4 +347,8 @@ export default EStyleSheet.create({
textAlign: 'left',
paddingLeft: 12,
},
powerDownKeyboadrAvoidingContainer: {
flex: 1,
backgroundColor: '$primaryBackgroundColor',
},
});