react-native-android

React native bottom tab bar pushing itself up when opening keyboard

≡放荡痞女 提交于 2020-07-09 05:25:12
问题 We are using createBottomTabNavigator. In one of the tab contains search bar at the top. While clicking on that search bar, we are opening the keyboard. But the keyboard pushing up the bottom tab bar also. We need the bottom tab bar remains at the bottom when opening keyboard. One of the solution I have tried is, in android manifest, I have changed android:windowSoftInputMode="adjustPan" or "adjustNothing". It is working fine as expected. But we are using chat layout in another tab which

How to communicate with a flask server (backend) to send it information from a react native frontend?

|▌冷眼眸甩不掉的悲伤 提交于 2020-06-29 04:45:09
问题 I'm developing an application with a react native frontend and a flask backend. I managed to retrieve information from the flask server via a local url but I don't know how to communicate in the other direction and send information to the flask server . I need to communicate with the backend and send the information that the user will provide to the application. I work with an android emulator (Android Studio). What I did : import React from 'react'; import { StyleSheet, Text, View } from

React-Native: How to collect the systrace in android

隐身守侯 提交于 2020-06-29 04:17:48
问题 I followed JS: https://facebook.github.io/react-native/docs/android-ui-performance.html to analyze the performance of my app. when run this command $ <path_to_android_sdk>/platform-tools/systrace/systrace.py --time=10 -o trace.html sched gfx view -a <your_package_name> as mentioned in the documentation, one .js file has been opened in the code editor as follows, #!/usr/bin/env python # Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD

react-native run-android Vs ./gradlew assembleDebug

。_饼干妹妹 提交于 2020-06-29 03:43:06
问题 I've noticed that react-native and gradle have two different outputs when building android builds. react-native build seems to incorporate some pre-build work from plugins such as react-native-config react-native will fail on build if there is no device present to install in (emulator in my case) different BUILD SUCCESSFUL output, particularly error type 3 in my case install - react-native only Question Aside from the install portion (4), why are the build portions of these two commands

React Native - Native Base Footer not change color

自闭症网瘾萝莉.ら 提交于 2020-06-27 23:12:39
问题 Here is the code: // Bottom.js <StyleProvider style={getTheme(commonColor)}> <Footer> <FooterTab> <Button active> <Icon active name="food" size={24} /> <Text active>Lunch Box</Text> </Button> <Button> <Icon name="coins" size={24} /> <Text>Point</Text> </Button> <Button> <Icon name="face" size={24} /> <Text>Profile</Text> </Button> </FooterTab> </Footer> </StyleProvider> // commonColor.js // Footer footerHeight: 55, footerDefaultBg: '#ffffff', // FooterTab tabBarTextColor: '#FFF',

How do I find element in object typescript code

落爺英雄遲暮 提交于 2020-06-26 06:27:50
问题 So, am trying to assign colours to my icons dynamically ... but this line of code keeps complaining, let icon = iconsList[name]; When I hover of it .. This is the explanation " Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ heart: string; star: string; like: string; dislike: string; flash: string; marker: string; filter: string; user: string; circle: string; hashtag: string; calendar: string; chevronLeft: string; optionsV: string;

How to know the useful height of an iOS device in React Native?

戏子无情 提交于 2020-06-25 02:59:10
问题 In some very specific cases I need to set the height of a View to the full height of the device useful area (without using flex). I was using a hardcoded "notch height" to calculate this useful height but I just discovered that the notch can have different heights depending on the device. (3 points of difference between iPhone XS and iPhone XS Max). Is there a way to know the useful height of a device with notch and safe area? 回答1: You can use the react-native-safe-area. it provides function

ReactNative - Android extremely slow within may image views

心已入冬 提交于 2020-06-17 09:49:28
问题 I'm implementing a Home screen that have lots of image views. The concept is like Photoshop layers. Each layer is an image view (PNG). The screen contains 20-30 images. The assets are stored locally. The app runs smoothly on iOS but it is extremely slow in Android. My first solution is reducing the file sizes but it doesn't help much. Thank you for any help you can offer! react-native versions is 0.59.10. 回答1: use react-native-fast-image https://github.com/DylanVann/react-native-fast-image

How do fix the white keyboard space that shows whenever I use KeyboardAwareView or react-native-keyboard-aware-scroll-view in my Expo react-native?

狂风中的少年 提交于 2020-06-13 06:28:43
问题 I am using Expo - react-native in creating an app, but using KeyboardAvoidingView and other Keyboard Packages (react-native-keyboard-aware-scroll-view) show white spaces at the bottom of the screen. How do I fix this? (https://i.stack.imgur.com/1c0M6.jpg) have tried KeyboardAvoidingView and react-native-keyboard-aware-scroll-view but the problem still persist import React, {Component} from 'react'; import {StyleSheet, ScrollView, Text,ActivityIndicator, TouchableOpacity, TextInput, View,

react-native TextInput displays wrong when changing height on Android

痴心易碎 提交于 2020-06-09 12:14:13
问题 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: