react-native

How to change TextInput cursor position in React Native?

点点圈 提交于 2021-02-11 13:34:28
问题 I am trying to achieve this behaviour in React Native: The user type for example 5 then ".000" will be added automatically to the TextInput , but the user can add an other number for example 7, the final result should look like "57.000". I tried to find a workaround but calculating the length of value and add chars accordingly but it didn't work as expected. Then I found the selection props of the TextInput . Here is my take on this: I added this to state selection: { start: 0, end: 0 } Here

How do I link to another app from within my App? Information such as deep link documentation

北城余情 提交于 2021-02-11 13:33:43
问题 Hello Stack Overflow Community, I am working on a project for work and my current environment is as follows, we have contracted a react native application that has some web-views within the app that my team develops the content for. Within these web-views we want to have an "Apps" web page where the user will be able to launch company apps. I have found a couple good deep links (Below) but do not know how to find information regarding the others... Documentation appears to be really spotty

Firestore - how to get the total number of records in a collection like we are doing in sql [duplicate]

…衆ロ難τιáo~ 提交于 2021-02-11 13:28:47
问题 This question already has answers here : Cloud Firestore collection count (17 answers) Closed 2 years ago . db.collection("cities").get().then(function(querySnapshot) { console.log(querySnapshot.size); }); but the problem is I am using pagination and load 30 records for each call. so I am unable to get the total numbers of records. Is there any way to get it ? like, we are doing in sql. 回答1: How to get the total number of records in a collection with Firebase ? The method numChildren() do

How Do I handle Hardware back button of android to screen which I given to navigation.navigate in react native

耗尽温柔 提交于 2021-02-11 13:27:21
问题 I am new to react native. I want that when I press android Hardware back button. I navigate to page or screen which name I have given To that navigation.navigate I have made this constructor(props) { super(props) this.handleBackButtonClick = this.handleBackButtonClick.bind(this); } componentDidMount() { BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonClick); } componentDidUnmount() { BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonClick); }

The app is crashing when I navigate while going back using pop()

我与影子孤独终老i 提交于 2021-02-11 13:26:50
问题 Initially, the app was working fine, after which I created a custom stack over Authenticated stack (screens when the user is Authenticated). The app is crashing when I navigate while going back using pop(), but it works fine with navigate or goBack(). inActiveUser => Check for user touch events using Pan Responder, to log out when he is inactive. AuthenticatedNavigator => Routes where the authenticated user is allowed. New stack: New Authenticated stack is implemented over Authentcated stack.

How to update back(previous) screen in react-native by react-native-router -flux

主宰稳场 提交于 2021-02-11 13:26:44
问题 I am using react-native-router-flux in my application. -I am using a parameter at my first screen and then i navigate to second screen. -On the second screen i am updating that parameter which was used at my first screen. -I want it to be updated when i navigate back to that screen (first screen). How can i implement this functionality. Thank You 回答1: @Vinzzz is right best solution is to use redux. But here how you can make this work without it. When you navigate to another view you call

How to update back(previous) screen in react-native by react-native-router -flux

风格不统一 提交于 2021-02-11 13:26:00
问题 I am using react-native-router-flux in my application. -I am using a parameter at my first screen and then i navigate to second screen. -On the second screen i am updating that parameter which was used at my first screen. -I want it to be updated when i navigate back to that screen (first screen). How can i implement this functionality. Thank You 回答1: @Vinzzz is right best solution is to use redux. But here how you can make this work without it. When you navigate to another view you call

How Do I handle Hardware back button of android to screen which I given to navigation.navigate in react native

蓝咒 提交于 2021-02-11 13:25:27
问题 I am new to react native. I want that when I press android Hardware back button. I navigate to page or screen which name I have given To that navigation.navigate I have made this constructor(props) { super(props) this.handleBackButtonClick = this.handleBackButtonClick.bind(this); } componentDidMount() { BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonClick); } componentDidUnmount() { BackHandler.removeEventListener('hardwareBackPress', this.handleBackButtonClick); }

The app is crashing when I navigate while going back using pop()

拟墨画扇 提交于 2021-02-11 13:25:19
问题 Initially, the app was working fine, after which I created a custom stack over Authenticated stack (screens when the user is Authenticated). The app is crashing when I navigate while going back using pop(), but it works fine with navigate or goBack(). inActiveUser => Check for user touch events using Pan Responder, to log out when he is inactive. AuthenticatedNavigator => Routes where the authenticated user is allowed. New stack: New Authenticated stack is implemented over Authentcated stack.

(Expo with Electron) Disable native scrollbehavior

独自空忆成欢 提交于 2021-02-11 13:22:53
问题 i wanna build a desktop app with electron and expo (electron-adapter). The problem is that the body of the nested page automatically adds a scrollbar. Does anyone have a solution for this or knows how to disable this scrollbehavior? Or how to fix the header in expo? In case you need more information please let me know! Thanks for the help! 来源: https://stackoverflow.com/questions/60600943/expo-with-electron-disable-native-scrollbehavior