import React from 'react';
import { Platform, ScrollView, View } from 'react-native';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
function YourComponent() {
return (
<KeyboardAwareScrollView
contentContainerStyle={{ flex: 1 }}
enableOnAndroid={true}
enableAutomaticScroll={Platform.OS === 'ios'}
extraScrollHeight={Platform.OS === 'ios' ? 100 : 0}
keyboardShouldPersistTaps="handled"
showsVerticalScrollIndicator={false}
>
{/* Your content goes here */}
{/* Place the content you want to display inside the KeyboardAwareScrollView */}
<View style={{ flex: 1 }}>
{/* Additional content that should be aware of the keyboard */}
</View>
</KeyboardAwareScrollView>
);
}
export default YourComponent;