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
2 answers

How to use Stylesheet.create in a class component?

I'm trying to use React Native's Stylesheet.create method in class component and I'm getting an error. This does work in functional components but not in class components. How can I resolve this issue?
chackerian
  • 1,301
  • 2
  • 15
  • 29
0
votes
1 answer

React - wait for assets from CDN before showing component?

I'm loading a stylesheet from an external CDN in order to style one page in React. The stylesheet link is injected to using react-helmet: Unfortunately, before the…
Wordpressor
  • 7,173
  • 23
  • 69
  • 108
0
votes
1 answer

React Native Android Fonts don't work when specific font-family is not applied

I have the following files added in the android/src/main/assets folder. Poppins-Bold.ttf Poppins-Regular.ttf Poppins-Light.ttf Poppins-Medium.ttf Poppins-MediumItalic.ttf When applying font-family as follows in my stylesheet header: { fontFamily:…
Ws7one
  • 56
  • 6
0
votes
1 answer

Height of component in React Native

As you see in the image, the styling of the component is as follows:
0
votes
1 answer

Using React Native StyleSheet like class of HTML

I had this question a long time ago. What if I use React Native StyleSheet like class of HTML? I really did use it. I have a lot of styles (names are based on Bootstrap Class Name). import { StyleSheet } from "react-native"; const s =…
Four
  • 734
  • 5
  • 9
0
votes
1 answer

React native ScrollView is not scrolling

I tried using Flatlist and it did not work either. On FlatList it will not display the images, so I was not able to test it. On ScrollView it is displaying, but it does not scroll. Here is the code that I have, please help: import { ScrollView,…
Recursive
  • 211
  • 3
  • 10
0
votes
1 answer

i18next how to use the Trans component in React Native

How to apply a bold weight to certain parts of the translation using the Trans component in React Native? Since HTML tags like don't work, we have to create our own custom component that applies certain text styling to…
0
votes
3 answers

React native size, does it scale automatically depending on the size of device?

I'm new to react native, and I have a question. Does react native scales the sizes of components depending on the device or what will be the best way to do it if it does not?
Recursive
  • 211
  • 3
  • 10
0
votes
1 answer

Moved from React Native Stylesheet to Styled components. How to add elevation when styled components do not recognize elevation as a property?

I have the following simple component that used React Native Stylesheet up until now, but right now I'm trying to move onto Styled components. I'm just a bit confused how to apply elevation to the styled component, when it doesn't recognize…
0
votes
0 answers

Change Style When Orientation in React Native?

I am using Function class in react native, now I open my app in portrait my screen design changes if I open the app in landscape my design works fine how to render the stylesheet in function class every time I change the orientation of the app?
0
votes
1 answer

change an array of pictures depending on iPhone screen size

I have a screen that is an HRV reading, the styles work well on all new devices, even on SE and Mini versions, my problem is with iPhone 8, the screen gets all messed up. this is the iPhone 13 screen and this is the iPhone 8 screen, I don't know how…
0
votes
2 answers

Bottom content covers the main content when keyboard is visible

I have a problem with device keyboard main content and bottom/footer content when the keyboard is visible. In this example I have 3 InpunTexts as the main content of the screen and a long text in the bottom (in the original source it is the company…
0
votes
1 answer

how to properly style image in react native

I've just started learning React Native.. this is what my current app looks like this is my code so far: import { StatusBar } from 'expo-status-bar'; import { SafeAreaView, StyleSheet, Text, Image, View, Button, TextInput } from…
dapidmini
  • 1,490
  • 2
  • 23
  • 46
0
votes
1 answer

my code isn't giving me the expected design

I want to make feed screen and this is what i want to achieve for every post item. This is what i have currently . I thought this will do the work. Am I making a mistake somewhere or I need to add someting else to the styles? I struggle with design…
Simona
  • 53
  • 1
  • 12
0
votes
1 answer

Styled-system in react native using stylesheet

I am trying to make stylesheet in react native able to use dynamic value, but i have no idea how to declare it, and can we change the styling name of react native style sheet?