Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text not vertically centered in Header/searchBar #1028

Closed
tokland opened this issue Jul 10, 2017 · 6 comments
Closed

Text not vertically centered in Header/searchBar #1028

tokland opened this issue Jul 10, 2017 · 6 comments
Labels

Comments

@tokland
Copy link

tokland commented Jul 10, 2017

Android 6.0 (Wiko Fever). From package.json:

    "dependencies": {
        "native-base": "2.2.1",
        "react": "16.0.0-alpha.12",
        "react-native": "0.46.1"
    }

I copied the example from the docs:

import { AppRegistry } from 'react-native';
import React, { Component } from 'react';
import { Container, Header, Item, Input, Icon, Button, Text } from 'native-base';

export default class SearchBarExample extends Component {
  render() {
    return (
      <Container>
        <Header searchBar rounded>
          <Item>
            <Icon name="ios-search" />
            <Input placeholder="Search" />
            <Icon name="ios-people" />
          </Item>
          <Button transparent>
            <Text>Search</Text>
          </Button>
        </Header>
      </Container>
    );
  }
}

AppRegistry.registerComponent('Playground', () => SearchBarExample);

I see the bar and the icons, but the placeholder -and also the text, if I write some- it's cut off:

screenshot_20170710-182101

@faogustavo
Copy link

Same issue here, any solution?

@zcxzmzy
Copy link

zcxzmzy commented Sep 6, 2017

Same issue on android, any solution?

@tokland tokland changed the title Text not vertically centered in Header/sideBar Text not vertically centered in Header/searchBar Sep 6, 2017
@faogustavo
Copy link

Mine was a little bit down the center. I applied the marginTop: -4 and it went to correct position :)

@shivrajkumar
Copy link
Collaborator

@faogustavo @zcxzmzy Seems to be working fine in the latest version.

@raldred
Copy link

raldred commented Oct 7, 2017

@shivrajkumar Hey, this bug is still present in 2.3.2 for me.
I had to apply a marginTop: 4 to the Input

screenshot 2017-10-07 19 13 53 1

@akhil-ga akhil-ga added the bug label Nov 20, 2017
akhil-ga added a commit that referenced this issue Nov 29, 2017
Issue - Text not vertically centered in Header searchBar
SupriyaKalghatgi added a commit that referenced this issue Dec 7, 2017
Fix for issue #1028
Text not vertically centered in Header/searchBar
@SupriyaKalghatgi
Copy link
Contributor

Fixed with NativeBase 2.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants