Questions tagged [react-native-stylesheet]

React Native Stylesheets provide styling capabilities similar to CSS stylesheets. Use this tag for questions about working with React Native Stylesheets or styling React Native code in general.

React Native Stylesheets provide styling capabilities similar to CSS stylesheets.

See https://reactnative.dev/docs/stylesheet.html for more info.

210 questions
0
votes
1 answer

React-Native Background Image - how to repeat horizontally and 100% height

I need to have a background image that repeats horizontally to fill the parent element and takes up 100% of the height (no-repeat). I have tried setting the image to 'repeat' and height 100% with no luck. Any suggestions how to do this in…
0
votes
1 answer

React Native - inconsistent display for borderStyle: 'dashed'

Trying to use StyleSheet.create({ row: { borderStyle: 'dashed', borderWidth: 1, }, }) or any borderWidth and getting inconsistency with dark outlines on some of my elements. Is this a known bug?
0
votes
1 answer

Text doesn't wrap in React Native Component

So I'm using Flatlist and I use data from an array and I'm showing it on my screen. And here is what I am getting at. I want my output to be like the one shown in the red box. Here is my code. _renderItem (item) { return( …
0
votes
2 answers

React Native custom button styling issue

I am designing custom button in react native through TouchableOpacity. So far I have tried different styling approaches but didn't get like required design. below mentioned is my attempt to solve.
Muhammad Iqbal
  • 1,394
  • 1
  • 14
  • 34
0
votes
0 answers

Update global variable in whole application in react native

I want to implement night mode in an application. So what I am trying is to update state and global variable at a time when night mode is off and on. But right now its updating current screen only using updating of a state. So the question is how do…
Kirankumar Dafda
  • 2,354
  • 5
  • 29
  • 56
0
votes
2 answers

React Native EStyleSheet how to apply multiple styles

I'm new to React Native EStyleSheet lib. I find it's really cool, but one thing that I can't figure out is, how to apply multiple styles to a single element just like I used to do with regular styles with style={{...styles.style1,…
Andrei
  • 42,814
  • 35
  • 154
  • 218
0
votes
2 answers

Rotated TouchableOpacity crashes on Android when selected

I rotate a TouchableOpacity (without any animation) as this: transform: [ { rotate: '45deg' } ] It works fine on iOS, but crashes on Android (see tested versions below): java.lang.ClassCastException: java.lang.String cannot be cast to…
Maen
  • 10,603
  • 3
  • 45
  • 71
0
votes
1 answer

React-Native iOS Status Bar

I am using react-native to build a simple app. I am running into an error when trying to change the background color and content color in the Status bar. I currently am testing on my iPhone 8. Does any know how to make these changes to status bar? I…
0
votes
1 answer

React Native createBottomTabNavigator Add customized color from constants

I am working on the implementation of a createBottomTabNavigator. I added a tabBarIcon and I would like to use a global color that I have defined in a const in a global styles file as shown below: global.style.js import { StyleSheet } from…
0
votes
2 answers

React Native Maps: How to render components below the map?

I just implemented React Native Maps in my application. My problem is that everything that I render below the maps is rendered on top of it. Let me show you what I mean: My question is how do I avoid my components being rendered on top of the map?…
-1
votes
2 answers

How do I change the back button image in stack navigator in React Native?

How can I change the image of the back button in React Native? I want to change the back arrow to a chevron.
-1
votes
1 answer

React Native: Using JS Stylesheet vs CSS/SCSS for styles

I've been told that using CSS/SCSS to define styles in React Native is a better practice than just using the native StyleSheet from 'react-native'. I've been looking around a lot and can't find a single reason to agree on that, rather than the fact…
RamaProg
  • 1,106
  • 7
  • 15
-1
votes
1 answer

React Native style view having sharp edges

How can I make my view look like this, (the sharp edges below Karamel in red)
-2
votes
1 answer

I want to improve my react native mobile applications design and css

How do I improve my CSS styling for react native to design mobile apps? Can someone recommend courses, references or documents? anything will help
-2
votes
3 answers

How to put button just after text in react-native?

How to put button just after text in react-native like on image below?
Mateusz Piwowarski
  • 559
  • 1
  • 6
  • 15
1 2 3
13
14