react-native-android

How to update the array - ReactNative

廉价感情. 提交于 2019-12-12 03:39:35
问题 What I'm trying to achieve is an Array like this infos = [{type: 'phone', val: '2222222'} {type: 'email', val: 'abc@abc.com'}] Here is the state constructor(props) { super(props); this.state = { rows: [], //this is used for the add component contactDetails: [{type: '', val: ''}], // where i will add the values }; } So I have a two TextInput <View> <TextInput label='Type'/> <TextInput label='Details'/> </View> This View can be dynamically added when a button is clicked and can also be deleted.

Full Screen Background Image behaves differently from network and local storage

杀马特。学长 韩版系。学妹 提交于 2019-12-12 03:05:48
问题 I am trying to stretch a background-image to full screen. Images seem to behave differently when fetched from Network and from Local storage. This function does not stretch the image as requested (there is a white margin of around 70 pixels from the right): This is my render() fundtion: var BackgroundImage = require('./images/logo_og.png'); render(){ return( <View style={[{flex: 1, alignItems: 'stretch'}]}> <Image source={BackgroundImage} style={[{flex: 1}]} > </Image> </View> ); The same

How do you use custom fonts with React-native android?

﹥>﹥吖頭↗ 提交于 2019-12-12 02:42:59
问题 I'm having difficulty getting custom webfonts to work with react-native on android. I have followed the instructions from here https://medium.com/@gattermeier/custom-fonts-in-react-native-for-android-b8a331a7d2a7#.w6aok6lpw but to no success. I've tried with a few different fonts, still no joy. nb I've tried renaming the font files, replaces dashes with underscores, all lowercase, and so on, but still no success. Any help, greatly appreciated. This is my code: import React, { Component } from

What does WIN DEATH: android.osDeadObjectException mean?

醉酒当歌 提交于 2019-12-12 02:12:49
问题 I am testing my app on older Android versions. It runs fine on Android 4.4.4, but 4.3 seems to crash immediately upon opening the app. I have no idea what this error means: W/dalvikvm( 9296): Invalid indirect reference 0xa4fdcc00 in decodeIndirectRef I/dalvikvm( 9296): "main" prio=5 tid=1 RUNNABLE I/dalvikvm( 9296): | group="main" sCount=0 dsCount=0 obj=0xa4b86480 self=0xb79b6bd0 I/dalvikvm( 9296): | sysTid=9296 nice=-4 sched=0/0 cgrp=[fopen-error:2] handle=-1217191904 I/dalvikvm( 9296): |

React native navigation is not working on TouchableOpacity

折月煮酒 提交于 2019-12-12 01:48:31
问题 I tried react-native on Button which is working fine. I want to customize Button so this made me to go for TouchableOpacity . I am trying to setup react native navigation like below which is not working now. I am using this for navigation https://reactnavigation.org/ index.android.js /** * https://github.com/facebook/react-native * @flow */ import React, { Component } from "react"; import { AppRegistry, Image, View, Text, Button, StyleSheet, TouchableOpacity } from "react-native"; import {

I am getting The module `./index.css` could not be found From react-native

泄露秘密 提交于 2019-12-11 18:27:56
问题 I am getting The module ./index.css could not be found From react-native, I have imported the file correctly on the location. Searched a lot on the google , please help. Here is the full output of the error, Body: {"originModulePath":"/Users/tejas-mac/Documents/React Studio/Exported Projects/index.js","targetModuleName":"./index.css","message":"Unable to resolve module `./index.css` from `/Users/tejas-mac/Documents/React Studio/Exported Projects/index.js`: The module `./index.css` could not

No Android SDK found - Android Studio - Missing SDK

本小妞迷上赌 提交于 2019-12-11 18:27:42
问题 I am a beginner in android development. I have installed Android Studio but when I start Android Studio it shows "No Android SDK found" screen every time. Please guide me if I miss anything during installation. Thanks 回答1: First of all, check the SDK path like others state in comments, by going to: File -> Project Structure -> SDK location If your path is correct, check if your downloaded SDK version matches what you are using in project, you can find it in your app gradle file: android {

React Native Android - how to disable android back button in StackNavigator

不羁的心 提交于 2019-12-11 18:19:34
问题 I am trying to implement a lock screen. Only when the password is correct does the screen go back, otherwise the screen must not be exited. But if you press the Back button on Android, it will always go back. I tried using BackHandler but it failed. It seems to be related to StackNavigator . How can I do nothing when the backButton is pressed? import React, { PureComponent } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import PINCode from '

React Native android app throws Network Error when upload on App store

别说谁变了你拦得住时间么 提交于 2019-12-11 17:23:38
问题 I am working on an app which is used to get Tenders data across the country. I am using axio to post and get data and everything works fine. I have generated Apk and tested it on simulators and Bluestaks but when I published the app yesterday then app started to throw the network error on login page. This is the first time I am getting the error and I am badly stuck now. please somebody help me My package.json file is dependencies are "dependencies": { "axios": "^0.19.0", "firebase": "^5.11.1