Comments (21)
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.
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.
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.
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.
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.
@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.
@alejomendoza Have you figured out how to solve this issue?
from react-native-navbar.
ok thatnks @Kureev !
from react-native-navbar.
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:
and here's wha that looks like:
from react-native-navbar.
- 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.
Closed due to lack of feedback (+ check 1.0.0 version, it has tintColor
property for this purpose)
from react-native-navbar.
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.
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.
I'll take a look on it asap, I promise.
from react-native-navbar.
thanks a lot @Kureev . I appreciate that. :-)
from react-native-navbar.
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.
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.
@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.
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.
@Kureev I might be totally misunderstanding what the issue was, I thought people want something like this:
Anyway, the background of the navbar is transparent.
from react-native-navbar.
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)
- What version of react-native is required? HOT 5
- 1.8.1 is not support in react-native 0.41.2 HOT 2
- Left and Right buttons won't show together HOT 2
- Put image instead of title HOT 6
- iphoneX additional padding? HOT 4
- Drag back handle HOT 6
- header text with icons HOT 6
- App Exits without showing any error HOT 2
- iOS 11 largeTitle
- applying FontFamily to style object giving Error HOT 1
- Disabled option in button configs doesn't work
- remove bottom value for Customtitle style
- Review Pull Requests
- Hiding status bar HOT 1
- KeyboardAvoidingView overlap NavitationBar
- View.propTypes on Android Production causing the app to crash
- Wrapping SafeAreaView creates a white gap between the navbar and status bar HOT 3
- return an error when I import NavigationBar HOT 1
- tried to register two views with the same name GestureHandlerRootView HOT 5
- Add screenshots to examples to make usage clear without cloning/looking at code
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-navbar.