Coder Social home page Coder Social logo

jineshshah36 / react-native-nav Goto Github PK

View Code? Open in Web Editor NEW
264.0 264.0 28.0 764 KB

A cross-platform (iOS / Android), fully customizable, React Native Navigation Bar component.

License: MIT License

JavaScript 100.00%
android ios navbar navigation react react-native

react-native-nav's People

Contributors

brunsy avatar cooperka avatar donnguyen avatar exoer avatar jineshshah36 avatar mariostasos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-native-nav's Issues

NavTitle allowFontScaling

I'm using this component in a cross platform application, and I'm having the issue when the user changes the font size globally in the phone. I'm able to set the allowFontScaling={false} to Text components, but there's no direct way to do it for the NavTitle component.
The only way I found is to edit the code in the file eact-native-nav/components/NavTitle.js to add the property to the Text component inside.

Is there any other recommended way?

Correct way of making a dynamic NavBar

Hi,
I've overridden the static renderNavigationBar() function in order to change the NavBar when a certain component - a form - is in focus.

What I actually want to do is make the form change the NavBar components in a dynamic way while going through different parts of it:

static renderNavigationBar(){
        console.log("in renderNavigationBar");
        return(
            <NavBar rightText="Next"
                    rightOnClick={()=>alert(this.state.name)}/>
        );
    }

rightText and rightOnClick are props I've added to my NavBarIOSLight implementation (similar to what is provided in the examples here).

The problem with my above code, is that this.state.name are obviously non-static members, so this won't work! What do you suggest is the best way to change the NavBar dynamically?

Thanks,
IY

Inconsistent behaviour statusBar iOS

Problem

I have set the statusBar to always be visible, however, I have had some inconsistent behaviour from an iOS device:

  • When I start my app in portrait orientation, the statusBar is visible.
  • When I turn it to landscape, the statusBar is hidden, but the statusBar component itself is visible, giving the header a waterhead.

  • When I start my app in landscape orientation, the statusBar is visible.
  • When I turn it to portrait, the statusBar is also visible.

Expected behaviour

The statusBar should always be visible, as I have set it to always be visible.

Additional information

Version: 2.0.2
Platform: iOS (iPhone 6)
React Native version: 0.52.0

Code snippets/examples

I am currently unable to provide a code snippet or an example, but I'll try my best to provide it, if it is needed.

#Note

  • I don't know if I am using the right terminology for statusBar, but with that I mean the actual bar of the phone itself, with indicator icons and the current time.

android下 在 NavBar中没法使用TextInput

以下代码TextInput无法正常显示

<NavBar style={navBarStyles}>                
    <NavTitle>
        {"App"}
    </NavTitle>
    <NavGroup style={navBarStyles.navGroup}>
        <View>
            <TextInput
                ref={ref => this.textInput = ref}                            
                style={[defaultStyles.textInput]}
                />
        </View>
    </NavGroup>
</NavBar>

How can I make back button on Android ActionBar?

Hi,
I want to make a button on the left of page title so that user can go back to prev page.

<NavBar>
    <NavButton></NavButton>
    <NavTitle>{"HI"}</NavTitle>
</NavBar>

This code will position the page title to the right side of monitor.
But I want to place page title right by right of button.

How can I do that?

Update to RN 0.25 to avoid deprecation warning

Than you for great components. It would be good if the import statements were updated to comply with react native 0.25 so that we avoid the deprecation warnings.

Let me know if you want me to do it and submit a pull request.

import React from 'react';

import {
    Text,
    View,
    StyleSheet,
} from 'react-native';

Nav title not centered

When buttons are of different width, title is no longer centered. See

        <NavBar>
          <NavButton onPress={() => alert('hi')}>
            <NavButtonText>
              Button
            </NavButtonText>
          </NavButton>
          <NavTitle>Title</NavTitle>
          <NavButton>
          <NavButtonText>
          B
          </NavButtonText>
          </NavButton>
        </NavBar>

image

Also, what If I just want a single title without any buttons?

        <NavBar>
          <NavTitle>Title</NavTitle>
        </NavBar>

I get this instead of the desired center behavior

image

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.