Questions tagged [react-native]

19470 questions
1

votes
1

answer
280

Views

DrawerLayoutAndroid in react native

I'm trying 'DrawerLayoutAndroid' in react native with inside the drawer I added the react-navigation 'stackNavigator' to navigate between screen.What I'm trying to do but the problem is when I navigate it opens in the drawer How do I open it full screen as a normal page Is there a better method to...
DEELAKA
1

votes
1

answer
560

Views

WebView keyboard React Native

when I select a text field and the keyboard appears it spoils the layout, in case it raises the page but when the keyboard disappears the page continues raised my WebView code:
1

votes
0

answer
374

Views

React Native expo there was a prob loading this experience

When i run 'exp start' from command line. my react native app builds perfectly on simulator and on device. i also ran exp start --no-dev which i assumed was to show what would run with dev mode flag off when i run exp publish. When i run 'exp publish' i get There was a problem loading this experienc...
James Woods
1

votes
1

answer
144

Views

How can I switch firebase configuration using toggle in react native

I am using reactnative, redux and firebase. Now i want to config two diff firebase env one is development and other one is production. I implemented a toggle to switch the firebase diff account. i put firebase config file in ./App.js import React, { Component } from 'react'; import { Provider } from...
Subrata Mallik
1

votes
0

answer
21

Views

How Do I Test Just The Functions Of My React Native Component?

I have the following component... import React, {Component} from 'react'; import {connect} from 'react-redux'; import { Button, StyleSheet, Text, View, TextInput } from 'react-native'; import BooksViewModel from './books-viewmodel' class BooksComponent extends Component { constructor(props) { debugg...
Exitos
1

votes
0

answer
407

Views

I want to pass props to stackNavigator inside tab navigator

I am trying to pass props from login screen to the whole app because every fetch request depend on user credentials so how can I achieve this. routeConfig file: export const sendStack = StackNavigator({ send:{ screen:Send, }, confirm:{ screen:ConfrimPay, } }); export const transactionStack = StackNa...
mohamed aldie
1

votes
2

answer
55

Views

reactxp .error in opening app in web

I created an react-xp app by create-xp-app MyProject and tried to run in chrome but then please help me solve ths
1

votes
1

answer
437

Views

How to get coordinates from non-GPS GNSS like GLONASS with react-native

I'm using React-Native to create a native application for Android platforms. I want to get the coordinates from Global navigation satellite systems(GNSS) like GPS, GLONASS, Compass, IRNSS, QZSS, Galileo. For GPS I can use react-native geolocation but for others, I don't know what I should do. Can so...
mahdi n75
1

votes
0

answer
46

Views

Parse Chordpro in React native

I want to edit chordpro files in my app. The problem is: How to display chords (exactly!)over the lyrics. I have tried to position the chords with position: absolute. But it did not really work in React Native. Of course I could work with HTML Syntax (react-native-htmlview). But I think it's not th...
Lukas Müller
1

votes
0

answer
193

Views

undefined is not an object (evaluating 'u.requestPermissions')

I am trying to use FCM push notification in my react native app. I am stuck at this point where i have imported FCM but still it says 'undefined is not an object (evaluating 'u.requestPermissions')' I have imported the lib and also linked to my project. Done exactly as mentioned in this README.md fi...
HungrySoul
1

votes
1

answer
186

Views

How to switch back to origin app after using storybook react native

I had a react native app. I applied storybook by using getstorybook from official doc. Every times I run react-native run-ios, the app is the storybook, not my app anymore. Now I don't know how to switch back my original app. I tried to close all my terminals + remove build folder but no one worked.
Khoa
1

votes
1

answer
68

Views

React Native Image URL lowers my performance

When I display my images in the horizontal scroll-view with paging enabled the performance of app decreases. I know it is due to high resolution of the image. I want a good way so that I can load image with out degrading it's quality. Thank you in advance.
Alish Manandhar
1

votes
0

answer
20

Views

I need specific placeholders to address specific types of jobs

This is the code I currently have. I need to change it so that a specific placeholder corresponds to the specific job type such as ride or service. Ex) on the job type rides only a placeholder that corresponded to a ride would be displayed. The problem with the current code is that all placeholders...
Alex Lazarev
1

votes
1

answer
363

Views

Lottie animation is very small compared to it's container in react native

I have an on click animation that is working perfectly, but I can't get the actual animated element to be more 'zoomed' in. It looks like this: Here's the code: import { Animated, TouchableHighlight } from 'react-native'; import Animation from 'lottie-react-native'; // a bunch of code here render()...
Test
1

votes
0

answer
174

Views

Infinite scroll not working in Listview React Native

i want pagination in my react native application so below is my code this.renderSiteView(rowData, rowID)} onEndReached={this.onEndReached} /> onEndReached() { if (!this.state.waiting) { this.state.offset=10, this.APIGetSiteGPS(this.state.token); } } When i run above code next page data not come so...
Harshal Kalavadiya
1

votes
1

answer
805

Views

react-native headerTitleStyle

I am using the StackNavigator and was trying to align the word 'topic' to center vertically. However, adjusting padding and margin does not seem to help. I believe the space above the word is to cater to the status bar. Is there a way around this? The StackNavigator code is below. See image export...
jayque
1

votes
1

answer
857

Views

KeyboardDidShow/Hide events are not working on Android with adjustResize setting

I am trying to capture events on Keyboard Show/Hide events on Android with React Native. I got stuck at a dead-end. Here is my manifest setting: And here is my RN Component: import React, {Component} from 'react'; import { View,Keyboard } from 'react-native'; export default class KeyboardAwareCompo...
Ishaq Hassan
1

votes
0

answer
212

Views

Watchman keep crashing when I developing react-native

OS:macOS 10.12.6 node -v 6.9.0 npm -v 3.10.8 watchman -v 4.9.0 installed via brew create-react-native-app --version:1.0. As I found, watchman fails to work after I change several files, although it works perfectly if nothing changed. Then I tried watchman watch-del-all && watchman shutdown-server...
吴环宇
1

votes
0

answer
361

Views

React-native touch move event across components (something like onMouseEnter)

I'm making a custom calendar component with a month view where each day is a specialized component. When the user puts his finger on a day and moves across the screen I want to do something in each touched day component. In other words I need something like onMouseEnter event from standard react. He...
Michael K. Sondej
1

votes
1

answer
252

Views

Change the style of row in FlatList using SetNativeProps

this.bankImgView(item, index)} keyExtractor={(item, index) => index} horizontal={false} numColumns={4} /> bankImgView(item, index) { return ( this.selectBank(item.image, item.text, index)}> ) } selectBank(bankImage,bankName,index) { this.refs['img'+index].setNativeProps({ backgroundColor: 'red' })...
Sudhanshu
1

votes
0

answer
446

Views

Getting issues with ADB for react-native run-android

I've been trying to follow the react-native tutorial on udemy, but I've been having trouble getting started: When I try to run the react-native run-android, I've been getting this error: app:installDebug FAILEDnstallDebug FAILURE: Build failed with an exception. * What went wrong: Execution failed...
Samuel.bkn
1

votes
1

answer
354

Views

Bug of React Native FlatList

I have a problem with React Native FlatList, export default class PoolList extends Component { constructor(props) { super(props) this.state = { data: [ {key: 1, img: './resources/image1.png', txt: 'Text 1'}, {key: 2, img: './resources/image2.png', txt: 'Text 2'}, {key: 3, img: './resources/image3....
Atom
1

votes
2

answer
2.5k

Views

How to set parent view's height based on subview's height

I want to write a customized parent View which includes either one Text componet subView or two Text component subViews. Is there a way to set the parent View's height based on the Text view's height? class ParentView extends Component { constructor(props) { super(props); } render() { const { titleT...
Johnson
1

votes
0

answer
211

Views

'React/RCTRootView.h' file not found after detach from expo

I created a new project with expo and detached it. When I try to run the iOS project in XCode, it gives an error 'React/RCTRootView.h' file not found If I create a new project with react-native init instead, I'm able to build with react-native-navigation successfully. Why does it fail with expo? Ste...
Avery235
1

votes
0

answer
486

Views

React-Native image pinch-to-zoom using PanResponder (Icon as maps)

What is the best way using react-native to set a pinch-to-zoom image, where i can place icon/button? as google maps when you are zooming icon keep position (when you zoom on the picture, icon(store/bank/metro/...) keep absolute position). Me i want this but only on one picture (1 plan) Im trying to...
btbenjamin
1

votes
0

answer
38

Views

How can i fetch current url form CustomTabs in react-native

I am working on react-native app . I am using CustomTabs to open external URL. Its working properly but I want to fetch current URL from CustomTabs into my react-native app and want to close CutomTabs automatically. the URL 'https://www.demo.com' have forms and after submission redirecting to the an...
kiranb ghrix
1

votes
1

answer
154

Views

how can I change display name on View in React Native?

I have a React Native project. At first the view has style = {{ Display:null }} but I want to change this to style = {{Display:'none'}}. How can I do that? hide
Ali Faridizadeh
1

votes
0

answer
565

Views

How can I sync two flatList scroll position in react native

As you can see in the picture above, there is a vertical list of two columns. I have developed two flatLists because I can not style photos with different height on one line with the flatList column option. I want two flatLists to have the same scroll position. I wrapped two FlatList component with...
byunghyun park
1

votes
0

answer
268

Views

How to get response back from Chrome Custom Tabs in react-native

I want to get response from URL that is opened into chrome custom tab. actually i have some forms in external url that is submitted and return data array on success page. I want to get array into my app. when user click on button custom tab will open and submit required fields and goes into success...
Ranjeet singh
1

votes
1

answer
708

Views

AWS Amplify React Native, GET request error 403 status code

I enabled access to unauthenticated identities to do some quick testing before integrating authentication. My configuration code is the following, Amplify.configure({ Auth: { identityPoolId: 'us-east-1:example', region: 'us-east-1', userPoolId: 'us-east-1_example', userPoolWebClientId: 'us-east-1_ex...
David Kim
1

votes
1

answer
439

Views

Reload AsyncStorage data every time tabbar screen is displayed using React Navigation

I am using React Navigation in a React Native app I'm building and I have a set of screens that are in a TabNavigator. One of the screens may change something in AsyncStorage which will need to reflected in another screen. I tried various different things including setting the tabBarOnPress property...
Youssef Moawad
1

votes
1

answer
96

Views

Preventing generation of Realm JS files when running Jest in Javascript?

I'm currently running React-Native(0.51) with Jest(21.2.1) and RealmJS(2.1.1). I've gotten them to play nicely where the RN app runs realm and my tests with jest work. The issue is that after running Jest, I end up with some artifacts, specifically: * default.realm * default.realm.lock * default.rea...
Zidail
1

votes
1

answer
666

Views

Firebase authentication error with react native?

import React, { Component } from 'react'; import RNFirebase from 'react-native-firebase'; const firebase = RNFirebase.initializeApp({ apiKey: 'KEY', authDomain: 'APPNAME.firebaseapp.com', databaseURL: 'https://APPNAME-#####.firebaseio.com/', projectId: 'APPNAME-#####'}); export default firebase; Thi...
sy89
1

votes
2

answer
95

Views

How to filter out objects from array of object on the basics of object id

I am using react-native where i have to filter out the objects from object array on the basics of id which is provides in another array of object. i have array object as: var objArr = [ {name:'a',id:1}, {name:'ab',id:2}, {name:'abc',id:3} ]; var keys = [ {user_id:1}, {user_id:2} ]; var filterResult...
Shubham Kumar
1

votes
0

answer
500

Views

Scroll ScrollView to top on content change, without glitching (React Native)

I have a ScrollView component (in React Native [iOS]) that is vertically-paged and populated with full-height images. The result is a vertically-swipable 'gallery' of images that I only want a user to be able to scroll past once. When onMomentumScrollEnd is triggered, I delete the top-most image, an...
Sarreph
1

votes
1

answer
317

Views

How to upload images from React Native App directly to Cloudinary using Attachinary in a Rails API

I'm trying to send a file from a mobile photo library to a Rails API and then upload it to Cloudinary using Attachinary and I'm getting the following error while doing so: Errno::ENOENT - No such file or directory @ rb_sysopen - file:///Users/hugoh/Library/Developer/CoreSimulator/Devices/7270BD44-FF...
Hugo
1

votes
2

answer
399

Views

application initializing document picker is missing the icloud entitlement

I am using 'react-native-document-picker' library and using iphone 6 simulator. I am getting an exception: 'Application initializing document picker is missing the iCloud entitlement', whenever I clicked on the button. how can I resolve this issue? please suggest me any solution. thanks in advance....
kalyani_jamunkar
1

votes
2

answer
2.7k

Views

AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'

I'm using React Native and getting this error during build. I'm pretty sure it's because of the mismatch between the SDK and the support library but I couldn't find the correct values. What SDK version and support library should I use. Please help me I'm really in a tough spot. :app:processDebugReso...
Leo
1

votes
0

answer
215

Views

FlatList, Load in from behind, Fade Effect

Kinda a unique question, I have a FlatList component that renders a bunch of images.. essentially like a slideshow. I am trying to create the effect that the Pictures appear from behind one another, I was thinking of doing this as sliding one row right behind another, and then setting the opacity to...
J DOe
1

votes
1

answer
308

Views

Prevent TouchableOpacity onpress when not mid-press?

right now when I press my touchableopacitys very quickly, it will stack up a bunch of calls to the onpress callback and then execute them over time. What I want instead is to be able to prevent further callbacks while the touchableopacity is 'pressed' or faded, so that the onpress is only called on...
Dizzykiwi

View additional questions