GithubHelp home page GithubHelp logo

Comments (21)

Kureev avatar Kureev commented on July 17, 2024 2

Hi @aaronbwatkins! First of all, thanks for the warm words, I feel a warm inside when I hear somebody using our component.

Solving your issue: You need to try a tintColor="transparent" property, that should work.

from react-native-navbar.

Kureev avatar Kureev commented on July 17, 2024

Hi Alejandro! I'm feel myself very sorry for not responding you for a 2 weeks. I was busy making https://github.com/Kureev/browserify-react-live . So, answering your question: since version 0.7.2 you can use backgroundStyle property to customize background layer. If you using prev. version it's also fine and backgroundColor should work. The only case it may not work - if you also specify style property and override backgroundColor there. For this case I made this patch in 0.7.2. Please, let me know if it works fine for you

from react-native-navbar.

robtg4 avatar robtg4 commented on July 17, 2024

Hey Kureev,
So with backgroundStyle would you just do the following:

<Navigator
renderScene={this.renderScene}
initialRoute={{
component: Main,
backgroundStyle: 'transparent',
navigationBar: (
<NavigationBar
customTitle={}
customPrev={} />
),
}} />

as i can't make it work this way.

from react-native-navbar.

alejomendoza avatar alejomendoza commented on July 17, 2024

Hi Alexey!! I finally didn't use react-native-navbar but it gave me some ideas to keep moving forward, thank you though! you can check out my own solution here: https://github.com/skyhitz/skyhitz-react-native-ios/

from react-native-navbar.

Kureev avatar Kureev commented on July 17, 2024

Hey @robtg4! I think we're talking about react-native-navbar so far, so backgroundStyle property should be applied to it. Also, not sure I got your idea with this part:

navigationBar: (
customTitle={}
customPrev={} />
),

I'd say you need to do something like this instead:

navigationBar: (
  <Navbar backgroundStyle={{ backgroundColor: 'transparent', }} />
),

from react-native-navbar.

Kureev avatar Kureev commented on July 17, 2024

@alejomendoza Hi again! Not sure I can find where you're using my component in the code. I think you're building a great application, but not sure I understand what kind of help I can do for you. Make sure you read readme first and using component as I pointed out in examples.

from react-native-navbar.

Kureev avatar Kureev commented on July 17, 2024

@alejomendoza Have you figured out how to solve this issue?

from react-native-navbar.

robtg4 avatar robtg4 commented on July 17, 2024

ok thatnks @Kureev !

from react-native-navbar.

robtg4 avatar robtg4 commented on July 17, 2024

Hey @Kureev - sorry for the delayed response - I still seem to not be able to make the navbar transparent - here is my code so far:

screen shot 2015-09-06 at 2 16 05 am

and here's wha that looks like:

screen shot 2015-09-06 at 2 16 42 am

from react-native-navbar.

Kureev avatar Kureev commented on July 17, 2024
  • Update your library version
  • In the new version (0.8.2) you should use style instead of backgroundColor

Would it solve your problem?

from react-native-navbar.

Kureev avatar Kureev commented on July 17, 2024

Closed due to lack of feedback (+ check 1.0.0 version, it has tintColor property for this purpose)

from react-native-navbar.

aaronbwatkins avatar aaronbwatkins commented on July 17, 2024

Hi @Kureev - this is perhaps my favorite react component...certainly the one I use most often, so thank you so much. I've also tried:

<Navbar backgroundStyle={{ backgroundColor: 'transparent', }} />

and I am getting a white background. I'm using the latest version of react-native-navbar. Would I also need to adjust something in the obj-c file to accomplish this? thanks so much.

from react-native-navbar.

aaronbwatkins avatar aaronbwatkins commented on July 17, 2024

Thanks @Kureev - I just tried tintColor = "transparent" as well. Still gives me a white background. I also tried adding a style property to the NavBar and putting tintColor in my Stylesheet.create function. Also tried <Navbar backgroundStyle={{ tintColor: 'transparent', }} /> to no avail. I know this is also pretty tedious to do in Xcode/Swift. No worries if it's not possible, I can manage with a white navBar for now. Thanks again!

from react-native-navbar.

Kureev avatar Kureev commented on July 17, 2024

I'll take a look on it asap, I promise.

from react-native-navbar.

aaronbwatkins avatar aaronbwatkins commented on July 17, 2024

thanks a lot @Kureev . I appreciate that. :-)

from react-native-navbar.

kkgelu avatar kkgelu commented on July 17, 2024
                tintColor='transparent'

This actually worked for me. It may have something to do with how you position the view, strange enough I had to put the nav bar as the last element of the root view. Inspired by this:

https://github.com/brentvatne/react-native-overlay

Ideally, no. This should probably only be used as a last resort. You can usually accomplish what you need to by just absolute positioning an view at the bottom of your root component."

let me know if you come up with something better.

from react-native-navbar.

Kureev avatar Kureev commented on July 17, 2024

backgroundColor has nothing with a way you position elements. It's not necessary to put a navbar element at the end of your view and align it via position: absolute.

from react-native-navbar.

kkgelu avatar kkgelu commented on July 17, 2024

@Kureev you are absolutely right. I was saying that's only way I accomplished transparent nav bar -- usually it flows over a picture or scrollview. I am hoping you or others can find a better approach.

from react-native-navbar.

Kureev avatar Kureev commented on July 17, 2024

Hm, what stops you from something like this:

<View style={container}>
  <Navbar {...navbarSettings} />
  <ScrollView {..scrollViewSettings} />
</View>

That shouldn't overlap a ScrollView, right?

from react-native-navbar.

kkgelu avatar kkgelu commented on July 17, 2024

@Kureev I might be totally misunderstanding what the issue was, I thought people want something like this:

screen shot 2016-02-29 at 23 53 42

Anyway, the background of the navbar is transparent.

from react-native-navbar.

Kureev avatar Kureev commented on July 17, 2024

Oh, I got what you mean, @kkgelu!

Well, in this particular use-case I'd recommend to use an approach with absolute positioning:

{
  position: 'absolute',
  top: 0,
}

from react-native-navbar.

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.