react-native-android

react-native TextInput displays wrong when changing height on Android

99封情书 提交于 2020-06-09 12:13:51
问题 I have a TextInput with the following style: amountInput: { flex: 1, backgroundColor: 'rgba(255, 255, 255, 0.1)', color: 'rgba(255, 255, 255, 0.9)', }, On iOS it correctly looks like it doesn't have enough padding: On Android is has enormous padding by default: Not a problem - I'll set a right and left padding, and a height: amountInput: { flex: 1, backgroundColor: 'rgba(255, 255, 255, 0.1)', height: 30, paddingRight: 5, paddingLeft: 5, color: 'rgba(255, 255, 255, 0.9)', } Looks good on iOS:

react-native : can't push to git because of hprof file

耗尽温柔 提交于 2020-05-27 05:11:53
问题 I would like to push my project into the github, however i just notice there is a file called java_pid14920.hprof inside the android folder and cause around 300MB remote: error: File android/java_pid14920.hprof is 301.75 MB; this exceeds GitHub's file size limit of 100.00 MB I wonder it is safe to delete this file ? 回答1: This sounds like a heap profiling output file, which you probably don't want in your repository at all. You'll want to delete it from the entire history and probably add an

How to Activate GPS Icon in react-native?

最后都变了- 提交于 2020-05-24 05:45:12
问题 I want to appear GPS Icon on the status bar when I open app or screen that's contain Map, So I add a function that asks a user at the first time to allow Location permission and it's work very well and I can get Lat/Long but GPS "Location" Icon did not activate so how can I force an app to activate this icon? here's my Ask for permission function async requestLocationPermission() { try { const granted = await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION, {

React Native app with same code but different result for vertical margins in iOS and Android

耗尽温柔 提交于 2020-05-22 09:39:46
问题 I tested a simple render() on android (Galaxy S7) and iOS (iPhone S8+), and I get results that I don't understand. The S7's height in dp's (Density-independent Pixels) is 640, while the iPhone 8 Plus height is 736 dp's, so I expected the distance between 'email' and 'password' to be somewhat smaller on the iPhone 8+, but not that tiny... The 2nd issue is negative margins, that seem to behave differently on the two platforms. Is that what one should expect? (And, yes, I know that I can set

React Native app with same code but different result for vertical margins in iOS and Android

梦想与她 提交于 2020-05-22 09:39:26
问题 I tested a simple render() on android (Galaxy S7) and iOS (iPhone S8+), and I get results that I don't understand. The S7's height in dp's (Density-independent Pixels) is 640, while the iPhone 8 Plus height is 736 dp's, so I expected the distance between 'email' and 'password' to be somewhat smaller on the iPhone 8+, but not that tiny... The 2nd issue is negative margins, that seem to behave differently on the two platforms. Is that what one should expect? (And, yes, I know that I can set

File cannot open after download on Android

自古美人都是妖i 提交于 2020-05-17 06:40:21
问题 I have used rn-fetch-blob to fetch api and download a video, the video is getting downloaded successfully however, when I try to open the file, it shows me :'file cannot open', it is a mp4 format, and is running otherwise, I have checked the file separately. Below is the download function: download = async (item) => { console.log(item) const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE) if (granted === PermissionsAndroid.RESULTS.GRANTED) {

Task 'installDebug' not found in project ':app'

ぃ、小莉子 提交于 2020-05-15 10:12:06
问题 I get error on my react-native app while I am trying to execute following code react-native run-android --variant=release Starting a Gradle Daemon (subsequent builds will be faster) > Configure project :react-native-firebase react-native-firebase: using React Native prebuilt binary from /Users/sanglee/Documents/react-native-firebase-starter/node_modules/react-native/android FAILURE: Build failed with an exception. * What went wrong: Task 'installDebug' not found in project ':app'. I

React Native Circular Slider?

天涯浪子 提交于 2020-05-15 06:33:19
问题 I've tried to look through several libraries of React Native circular sliders, however none of them work as intended. All of them suffer the same bug where they randomly change values as you slide. A example would be: What I am looking for, is a circular slider with it's value in the middle of the slider, very much so like this: Thank you in advance Edit: I've added a test repo if you want to play around with it. I've tried my best, but this is the best I could do https://github.com/2joocy

How to run multiple tracks at a time / simultaneously in react-native?

旧时模样 提交于 2020-05-14 12:50:25
问题 Describe the bug: I'm using react-native in my application, I want to play the multiple tracks at a time. I tried some node modules but they only allows me to play a song at a time. Is there any way to do this? Expected behavior: Play the multiple songs at a time Platform: Android 回答1: This could be possible with react-native-audio-toolkit module. You could create multiple Player instance at same time and play multiple tracks. import {Player} from '@react-native-community/audio-toolkit';