react-native-android

React Native - Button with lower zIndex appears on top of view with higher zIndex

允我心安 提交于 2019-12-12 11:35:15
问题 I have a curious situation where a button with zIndex: 5 sits on top of an Interactable.View of zIndex: 19 . EDIT: It only appears to be on top. It is visible. But not (for lack of a better term) tappable. Below is the code. I have marked the button and the interactable.view in the code with //********************************************************************// map.js import { StyleSheet, View, Text, FlatList, TouchableHighlight, Dimensions, Platform, //findNodeHandle, Image } from 'react

React Navigation Stack Navigator default shadow styling

六月ゝ 毕业季﹏ 提交于 2019-12-12 10:53:32
问题 I'm using React Navigation to construct a tab bar based type of an app in ReactNative. "react-native": "0.44.0", "react-navigation": "^1.0.0-beta.9", I've got the navigation part pinned down and working. But with regards to styling I'm seeing a shadow on the StackNavigator (navigation controller) inside tab bar. Refer image below. I'm not used to seeing this kind of a shadow on native iOS apps (I'm an iOS mobile dev trying out RN) upon further investigation I saw that there are 'shadow'

React Native Android location request timed out

邮差的信 提交于 2019-12-12 08:22:09
问题 In IOS there isn't a problem while looking for gps coords. It works fine. On Android side its not stable as IOS. This problem both in real device and emulator. Sometimes it can find location, but sometimes not. Looking for 3days but there wasn't find a solution. When my app cannot find my location, I tried via Google Maps app, it works like charm. Here is my code for both IOS and Android; getCurrentPosition() { navigator.geolocation.getCurrentPosition( (position) => { this.setState({

How Can Bind the Dragged view inside ScrollView item?

╄→гoц情女王★ 提交于 2019-12-12 08:16:31
问题 I have created ScrollView with three views. and I want to bind the dragged view inside the ScrollView , and the rest of haven't drag-dropped view should maintain outside of ScrollView . How can it be possible. See the GIF : I want to add the draggableView inside the ScrollView. Code : import React, { Component } from 'react'; import { StyleSheet, View, Text, PanResponder, Animated, Easing, Dimensions, Platform, TouchableOpacity, ScrollView, } from 'react-native'; import Carousel from 'react

custom font is not working in react native

[亡魂溺海] 提交于 2019-12-12 04:38:55
问题 After saving the fonts in my assets folder of my project I linked it by the command react-native link the links were installed and I cross checked the installation in my android>src>main>assets>fonts and everything was fine there too and I expected to get the custom font using the styling fontFamily: 'Coda-Heavy' but I didn't get the required custom font in run Also please refer to this link I have posted it as an issue in react native: https://github.com/facebook/react-native/issues/15266

How to send image from android gallery to react-native app?

牧云@^-^@ 提交于 2019-12-12 04:33:57
问题 How do i share an image from android gallery to react-native app? I've added an intent-filter to my AndroidManifest.xml: <intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="image/*" /> </intent-filter> How do i listen to the send intent? Edit: I want to send an image from native image gallery to my react-native app, like sharing an image from gallery to instagram app. 回答1: There is currently

When trying to open a file with Intent getting 'Media not found' error

≡放荡痞女 提交于 2019-12-12 04:32:57
问题 I download a file and save it as a temporary file using File outputDir = context.getCacheDir(); File f = File.createTempFile(FILE_TYPE_PREFIX, "." + extension,outputDir); f.exists() says that the file exists and as well I set f.setReadable(true, false); to be able to read it. The I start a new Intent Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(f), mimeType); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); the f returns

Headless Task use inside component with React Native

偶尔善良 提交于 2019-12-12 04:31:36
问题 I am trying to run a background task using headlessjs in react-native . The problem is that I am unable to access the async task inside the component in order to show it on the view. Here's my default component. import React, { Component } from 'react'; import { AppRegistry, Text, View, NativeModules } from 'react-native'; module.exports = NativeModules.ToastAndroid; someTask = require('./SomeTaskName.js'); export default class test2 extends Component { constructor() { super() this.state = {

react-native red screen error

情到浓时终转凉″ 提交于 2019-12-12 04:28:10
问题 I have installed new application from git but i'm having this red screen error can some one help me out. ReferenceError: Can't find variable: process (http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:2506) E/unknown:React( 2312): E/unknown:React( 2312): Try the following to fix the issue: E/unknown:React( 2312): • Ensure that the packager server is running E/unknown:React( 2312): • Ensure that your device/emulator is connected to your machine and has

navigate to another screen from tab-view screen not working

假如想象 提交于 2019-12-12 04:07:41
问题 following is my code:- posting full code index.android.js import React, { Component } from 'react'; import { AppRegistry, Text, StyleSheet, View, NetInfo, Alert, AsyncStorage } from 'react-native'; import Splash from './app/screens/Splash' import { StackNavigator } from 'react-navigation' import Login from './app/screens/Login' import Register from './app/screens/Register' import Check from './app/screens/Check' import Qwerty from './app/screens/Qwerty' import Home from './app/screens/Home'