Giter VIP home page Giter VIP logo

Comments (8)

hieunc229 avatar hieunc229 commented on May 18, 2024 1

I experienced the issue while applying into an 'absolute' or 'fixed' view. I could be caused by any issue, though I found out that while using 'absolute' or 'fixed' view, the calculation would be missed (similar to this described issue).

I came up with a different method that supports 'absolute', 'fixed' view and publish it on react-native-spacer.

from react-native-keyboard-spacer.

dextermb avatar dextermb commented on May 18, 2024 1

@pulpdood while this works on some devices, it does not seem to work on all. For example I still get bars on Pixel XL 2 and iPhone X when adding -55 on topSpacing

from react-native-keyboard-spacer.

arthurCalv avatar arthurCalv commented on May 18, 2024

Yeah having the same issue with a grey bar above the keyboard when using a tab bar
screen shot 2018-06-14 at 17 33 44

from react-native-keyboard-spacer.

pulpdood avatar pulpdood commented on May 18, 2024

I added topSpacing={-50} and it seems to fix the issue:

<KeyboardSpacer topSpacing={-50}/>

from react-native-keyboard-spacer.

mikechambers610 avatar mikechambers610 commented on May 18, 2024

from react-native-keyboard-spacer.

ESA2012 avatar ESA2012 commented on May 18, 2024

Yet another solution:

import { getBottomSpace } from 'react-native-iphone-x-helper';
...
<KeyboardSpacer topSpacing={-getBottomSpace()} />

from react-native-keyboard-spacer.

CyxouD avatar CyxouD commented on May 18, 2024

thanks for direction @ESA2012. For the case of iPhoneX + tab bar. I use:

import { getBottomSpace } from 'react-native-iphone-x-helper';
...
<KeyboardSpacer topSpacing={-(TAB_BAR_HEIGHT + getBottomSpace())} />

It looks like it is exact this value needed

My config:

"react-native": "0.59.10",
"react-navigation": "^3.0.5"

from react-native-keyboard-spacer.

alansp avatar alansp commented on May 18, 2024

I'm using this for iPhone only (don't have issues on Android), and this combo solved all my problems...

import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';

<KeyboardSpacer topSpacing={-useBottomTabBarHeight()} />

from react-native-keyboard-spacer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.