1

The solution provided in this thread is applicablle to all the screens but I need to implement it only on some specific screen how to do this ?

I tried below things but they are impact all the screens

screenOptions={{
 tabBarHideOnKeyboard: true,
 }}
<application
 <activity
 
 <!-- android:windowSoftInputMode="adjustResize" Added this --> 
 
 </activity>
 
 </application>
asked Sep 27, 2024 at 1:04
2

1 Answer 1

0

This can be resolved by wraping the Screen Content that is showing the keyboard, with KeyboardAvoidingView as shown in below example:

import { KeyboardAvoidingView, Platform, ScrollView } from 'react-native';
function MyScreen() {
 return (
 <KeyboardAvoidingView
 behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
 style={{ flex: 1 }}
 >
 <ScrollView>
 {/* Screen content goes here */}
 </ScrollView>
 </KeyboardAvoidingView>
 );
}

Keep in mind to use the behaviour property as it is shown in the example.

answered Sep 27, 2024 at 8:05
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.