239 questions
0
votes
0
answers
32
views
React Native: How to keep footer buttons pinned above SafeArea + fixed padding while parent container height is dynamic?
I’m working on a React Native layout where:
The parent container’s height changes dynamically (based on user settings or API values).
Inside the parent, I need to keep some content at the top and a ...
0
votes
0
answers
220
views
`react-native-gifted-charts` How to create a responsive horizontal bar chart using?
Description
I'm using react-native-gifted-charts to create a horizontal bar chart in my React Native app, and it works great for basic setups. However, I'm facing issues with responsiveness and layout ...
1
vote
0
answers
742
views
Tailwind NativeWind styles not working in react native screens inside navigation
I am a beginner at react native and creating a project using reactnative cli. However I'd like to use tailwindcss inside my project for styling. I came across NativeWind and been trying to set it up ...
-1
votes
2
answers
147
views
How to fix "Transform with key of translateY must be a number" error in React Native?
I'm trying to postion an element correctly using transform property,
but whenever i give percentage values it giving me an error
How can I fix this issue ?
Here is my code
import { Animated,Image,View}...
0
votes
1
answer
378
views
KeyBoardAvoidingView not working as expected
I am using 'KeyBoardAvoidingView' to avoid the keyboard for an input element on my screen, which also contains an image.
The content pretty much occupies the screen and I want the content to scroll up ...
1
vote
1
answer
66
views
React Native - Flex
I have two components in a screen. One is an Image and other is a View.
I give flex:1 to main view and give flex:0.7 to image and flex:0.3 to view.
import { Image, StyleSheet, Text, View, ...
1
vote
1
answer
42
views
React Native : Image on absolute position appears truncated on FlatList
I'm trying to render a DoctorCard component inside an horizontal Flatlist. The issue that the image that is on position:absolute inside the DoctorCard that i render inside Flatlist doesn’t appear as ...
1
vote
3
answers
167
views
The difference between View and ScrollView in styling
This is my component code and my style code:
function StartGameScreen() {
return (
<View style={styles.inputContainer}>
<TextInput
style={styles.numberInput}
...
0
votes
2
answers
358
views
How to reuse a style into same StyleSheet
I am using React Native, and I want to reuse a style within the same StyleSheet. My styles are as follows:
buttonContained: {
borderRadius: 8,
backgroundColor: Colors.primary,
...
0
votes
1
answer
57
views
React Native Component Position
I create a button component in react native. It is on the top side of screen but I want to set it at the end of screen.
<View style={{ marginHorizontal: 52, marginBottom: 23, }}>
...
1
vote
2
answers
390
views
React Native Container Styling
This is the container that I create looks:
This is the style I want.
How can I do this. The code is:
<View>
{
usersInfo.map((item) =>
<View key={item.id} style={{}}&...
0
votes
1
answer
209
views
how to change background colour of border radius in react native using flex
I am using flex to design a react native page. I have used flex to design entire screen, my issue is I have created a radius for a menu style as in below code. how can I
function Home() {
return (
...
0
votes
1
answer
53
views
React Native inconsistent size of items in FlatList when using numColumns and margin
When the last row has 1 or 2 items when using numColumns={3} they are slightly bigger
const BookList = () => {
...
const renderItem = (item: any) => {
return (
<View style={...
0
votes
1
answer
39
views
React-native: how to vertical center Text and Image
In react native. I have a multiple lines text, and There will be a image at the end of the text.I want they can be vertical center, when they in same line。
now my code is not vertical center:like this
...
0
votes
1
answer
68
views
Stacking Different View in React-Native Failed
I am attempting to implement a page in react-native with a Map component on the botton, and I am also trying to put a overlapping scroll view on top of the Map view without influencing the ...
1
vote
0
answers
752
views
React native styles management incorporating theme, global styles, component specific styles with props, inline styles i.e. one solution for all
I am getting hard time in styles management in react native.
BACKGROUND
Before using react navigation useTheme(), I had defined my color scheme and global styles like this
export const themeStyles = {
...
0
votes
1
answer
308
views
React Native styling with multi language app using i18next
My problem is when I create a multi-language app in react native, for example, an app that can be in Arabic and English. when I want to style a component to change the direction when language is ...
0
votes
1
answer
1k
views
ignore safe area in Absolute position child view in react native
I am trying to create overlay over the screen.
But the problem is child view i.e popup screen also have top and bottom safe area added.
I do not want to use this just for 1screen: https://www.npmjs....
1
vote
1
answer
905
views
React Native: Invalid prop `transform` of type `string` supplied, expected an array
We are using the CSS style transform/translate parameters but this is invalid for React Native typescript.
Invariant Violation: Invalid prop `transform` of type `string` supplied to `StyleSheet ...
1
vote
1
answer
167
views
How to add parameters to a React object?
I have a shared style with error:
export const modalStyle(height)= { // <-- Whats the syntax for adding parameter here?
width:MODAL_WIDTH,
height:height,
backgroundColor:...
0
votes
0
answers
230
views
How to add padding to all child elements in React Native
I'm trying to add styling to child components of a React Native View. Since you cant use the > * selector in React Native's StyleSheet.create function how do you achieve this result?
Here is the ...
-1
votes
1
answer
506
views
How to show an icon on last index of flat list
I'm trying to wrap my flat list and trying to show an Icon after last index of Flatlist. I had tried but it works fine on a single row. when we data goes to next row it would not work.
Here is my flat ...
1
vote
1
answer
2k
views
How to give spacing between the content of view in react native?
I am new in react native,I have to view right and left container given flex-between them,
now I have to give space in contents of left and right container also.
image shown in the below diagram as ...
0
votes
1
answer
58
views
How do I type a function inside the stylesheet in React Native CLI?
import { StyleSheet, TextStyle, ViewStyle, ImageStyle } from 'react-native';
export const styles = StyleSheet.create({
spacing: (marginBottom: number) => {
return {
...
0
votes
2
answers
1k
views
How to make a React Native TextInput change Opacity just like TouchableOpacity?
My code looks something like this currently:
<View>
<TextInput placeholder='PlaceholderText'>
</TextInput>
</View>
I want to make a TextInput component that has an ...