Adding style to the scene of drawer react native - react-native

I'm trying to style the scene of drawer, like this image:
but I cant find any method to do that, only to style the Container: sceneContainerStyle method.
anyone can help me?
thank

Related

How do you make swiper buttons show only inside the swiper container

I have coded swiper button and navigation insider the swiper container but the buttons and the bullets are showing in the wrong place(at the top of the page).... I would like them to show inside the swiper container...
I also faced the same issue when I used Swiper.
Try to use this
::ng-deep .swiper-pagination { `bottom: 10px;`}
You can modify it like you want by using some id or class for swiper.
<swiper class="bulletsAtBottom">some code...<swiper>
.bulletsAtbottom {bottom:10px;}

'borderBottomStyle : dashed' is not working in the react native. Can anyone suggest better way to do that?

BorderBottomStyle is not working in the React native and as well as styled-components. BorderStyle is working fine. But BorderBottomStyle-dashed is not working and getting Component Exception.
<LocationText>BORDERBOTTOMSTYLE</LocationText>
LocationText = styled.Text`
margin-left:2%;
font-family:metropolisRegular;
font-size:20px;
padding-left:2px;
border-bottom-color:rgba(0,0,0,0.3);
border-bottom-width:2px;
border-bottom-style:dashed;
`;
https://i.stack.imgur.com/GzzUU.png
Any Better idea to style only the border Bottom with dashed in React native??
In react-native, you can't style many components directly as this is not necessary. Often times the better approach is to put the component inside a container and then style the container.
If you're a beginner, then how you attach the styles to the "View" is something you can google and not important, but this is an example of just showing the one style attached inline.
<View style={{ border-bottom-style: "dashed"}}>
<LocationText>BORDERBOTTOMSTYLE</LocationText>
</View>

Display screen overlay from component

I'm writing a React Native reusable component, which in some state needs to display an overlay on the screen. It seems that the way to do this, is using position:absolute. But that does not work very well in my situation, as the component is not child of the root-view and therefore cannot obtain the full screen area.
See this demo example on Snack:
https://snack.expo.io/#dennismadsen/position-absolute-test
In this case the position is obtained based on the position of the AssetExample element.
Here is how the above example looks like:
I would like the overlay to be positioned in the top of the screen like this:
How can I solve this?
Maybe get the width and height from Dimensions? that way you will always get 100%
import { .....,Dimensions,.... } from 'react-native';
const width= Dimensions.get('window').width;
const height= Dimensions.get('window').height;
I solved the problem by using Overlay from react-native-elements.
I'm also stuck with the same problem. I've created ListItem input fields where the DatePicker is inside it.

Change style prop NaviagtionBar #shoutem/ui

I try to add shoutem to other app but when i work with NaviagtionBar and #shoutem/animation i got issue like picture below here:
this i got when using props style NavigationBar 'inline',
and here is my code:
<NavigationBar
styleName="inline"
animationName="solidify"
title={restaurant.name}
share={{
title: restaurant.name,
link: restaurant.url,
}}
/>
but i dont want like that. I want props style is 'clear' for make tranparent navigationbar when start app, i still want show it when scroll down like this:
but when i change props style of NavigationBar to 'clear' i got this issue(when scroll down, NavigationBar still not show up):
Anyone can help me to resolve it?

Custom navBar using react-native-router-flux

I can't t seem to find any complete examples for creating your own navBar component and then wiring it up to react-native-router-flux. Can anyone help me out? Looking at the github issues it seems like this is a big need for the library. What I'm looking to do is:
Create a new component with a left button and an image to the right.
Have the button icon change depending on the scene, but use the same image to the right.
Wire it to react-native-router-flux so that the navBar displays properly and keeps track of the users position in the same way that the default navBar does.
Thanks!
This a similar problem I faced. No tutorials online that tell you how to use custom navbar. I have found a way that works for me. Try this:
<Router navBar = {MainNavBar}>
<Scene key = "home" component = {HomeScreenContainer} title = "Home" initial = {true} />
</Router>
This is the code for main Root component where you define scene. You have to pass the Nav bar component in router or in any scene where you want your navbar.
And your Navbar will be something like this:
<NavigationBar
leftComponent = {<TouchableOpacity><Icon name="sidebar" /></TouchableOpacity>}
centerComponent = {<Title>{props.title}</Title>}
/>
Hope this helps :)