douglasjunior / react-native-keyboard-manager

⚛ Library to prevent issues of keyboard sliding up and cover inputs on React-Native iOS projects.
https://www.npmjs.com/package/react-native-keyboard-manager
MIT License
934 stars 60 forks source link

Is it working with Expo? #95

Closed oritzio closed 1 year ago

oritzio commented 1 year ago

I installed the package. You said to go to your-project/ios but I don't have ios folder. I tried to run it anyway and copy this code but it didn't work:

import KeyboardManager, {PreviousNextView} from 'react-native-keyboard-manager';

KeyboardManager.setEnable(true);
KeyboardManager.setEnableDebugging(true);
KeyboardManager.setKeyboardDistanceFromTextField(30);
KeyboardManager.setLayoutIfNeededOnUpdate(true);
KeyboardManager.setEnableAutoToolbar(true);
KeyboardManager.setToolbarDoneBarButtonItemText('Done');
KeyboardManager.setToolbarManageBehaviourBy('subviews'); // "subviews" | "tag" | "position"
KeyboardManager.setToolbarPreviousNextButtonEnable(true);
KeyboardManager.setToolbarTintColor('#FF00FF'); // Only #000000 format is supported
KeyboardManager.setToolbarBarTintColor('#FFFF00'); // Only #000000 format is supported
KeyboardManager.setShouldShowToolbarPlaceholder(true);
KeyboardManager.setOverrideKeyboardAppearance(false);
KeyboardManager.setKeyboardAppearance('default'); // "default" | "light" | "dark"
KeyboardManager.setShouldResignOnTouchOutside(true);
KeyboardManager.setShouldPlayInputClicks(true);
douglasjunior commented 1 year ago

To work with Expo you need to eject your project.

a-eid commented 7 months ago

for future reference, yes it does work with expo development client.