native-base

multiple inputs in native base

人盡茶涼 提交于 2019-12-24 06:06:29
问题 I have a project in react native and use "native-base". I want to have inputs like this Can anyone help? 回答1: May be it's helpful for your requirement import React, { Component } from "react"; import { Container, Header, Content, Item, Input } from "native-base"; export default class RoundedTextboxExample extends Component { render() { return ( <Container> <Header /> <Content contentContainerStyle={{ flexDirection: "row", justifyContent: "space-between", marginTop: 20, borderColor: "black",

Uppercase Button in nativebase

自古美人都是妖i 提交于 2019-12-24 00:59:45
问题 I have a button with face book icon <Button iconLeft block > <Icon name='logo-facebook' /> <Text>Login with facebook</Text> </Button> with text "Login with facebook" But it displays "LOGIN WITH FACEBOOK" .I am tried with capitalize={false} but no hope.Is there any way? NB version:2.2.1 回答1: you are using Native Base Right ? maybe you can try this one. you can change this code: <Button iconLeft block > <Icon name='logo-facebook' /> <Text> {'Login with facebook'.toUpperCase()} </Text> </Button>

React Native “onViewableItemsChanged” not working while scrolling on dynamic data

放肆的年华 提交于 2019-12-23 13:08:02
问题 I have a React Native FlatList. base on Documentation I used onViewableItemsChanged for getting the current showing item on the screen. but while scrolling or when scrolling stops nothing happens and I can't get the current Id. How Can I use it in correct way? export default class TimeLine extends Component { constructor(props) { super(props); this.renderTimeline = this.renderTimeline.bind(this); this.state = { timeline: [], }; this.handleViewableItemsChanged = this.handleViewableItemsChanged

Can I use multiple or nested elements in the Label of a Picker Item in React Native?

青春壹個敷衍的年華 提交于 2019-12-23 05:07:33
问题 I'm using React Native with NativeBase and would like to make the labels of my Picker more complicated than just one plain string of text. But is it even possible to pass elements as the label, say multiple child elements wrapped in a single top-level element? Or do Pickers only support plain text as labels? As requested by bennygenel, here's a version of what I've tried: export default class ThingPicker extends React.Component { render() { const { initialThing, things, onThingChanged, } =

undefined is not an object (evaluating 'RootComponent.prototype')

只谈情不闲聊 提交于 2019-12-22 06:35:29
问题 ---------index.js-------- import { AppRegistry } from 'react-native'; import Navigate from './Navigate'; AppRegistry.registerComponent('form1', () => Navigate); ----Navigate.js----- import React from 'react'; import { StackNavigator, DrawerNavigator } from 'react-navigation'; import TabsList from './TabsList'; export const StackTab1 = StackNavigator({ TabList: { screen: TabsList}, }); export const Navigate = DrawerNavigator( { Tab1: { screen : StackTab1 }, Tab2: { screen : StackTab1 }, Tab3:

Unrecognized font family ionicons

大兔子大兔子 提交于 2019-12-22 04:07:45
问题 I followed the setup instructions in the NativeBase Docs and ran rnpm link . I am getting this error: Unrecognized font family ionicons also checked by Xcode, the fonts are already in the build phase. What am I missing? 回答1: Expanding on the exisiting answer and using the solution found on this github issue, do the following; Close the running packager Run react-native link react-native-vector-icons Then run react-native start --reset-cache Finally run react-native run-ios to restart the

React NativeBase not showing my imported components

偶尔善良 提交于 2019-12-18 09:47:18
问题 I'm fairly new to React and React Native and I'm having a play with React NativeBase. I've managed to get the following working within a single file, but now I'm simply trying to split up my code into multiple components in separate files. The problem is, my imported component does not show. I've struggled with this for a while now and I can't see what I'm doing wrong... probably something really stupid. Here is my code: code/index.ios.js import React, { Component } from 'react'; import {

How to add footer navigation with react native using native base library?

笑着哭i 提交于 2019-12-13 21:00:25
问题 am new for react native development am trying implement native base footer navigation but i couldn't make it work. Now let me explain what i have tried so far. This is the class i have implemented footer navigation: import React, { Component } from 'react'; // import { FlatList, // ActivityIndicator, // StyleSheet, // View, // TouchableNativeFeedback, // TouchableHighlight, // Text, // ListView, // Button // } from 'react-native'; import { AppRegistry, StyleSheet, ActivityIndicator, ListView,

React Native JS bundle crashes on iOS Release, Babel not working?

故事扮演 提交于 2019-12-13 04:37:01
问题 My React Native build compiles in Debug and runs fine, but when I run my Release scheme the spread operators are throwing errors, causing the build to crash. Specifically, the first error thrown is from a spread operator in the NativeBase library. For reference, my .babelrc is here: { "presets": ["stage-3", "react-native"], "plugins": [ "transform-es2015-destructuring", "transform-object-rest-spread", "syntax-object-rest-spread", [ "import", { "libraryName": "antd-mobile", "style": true } ] ]

react native iPhone Plus text lines

心已入冬 提交于 2019-12-13 02:58:04
问题 There are lines over all the multiline Text tags in the app.Lines only shows on iPhone Plus not on iPad, tab, android or any other device. Any idea how to fix it? Lines over Text similar to the image below: import React, {Component} from "react"; import { Image, View, StatusBar, TouchableOpacity, WebView, Dimensions, Linking, ScrollView, NetInfo, Alert } from "react-native"; import { Container, Header, Title, Content, Text, H3, Button, Icon, Footer, FooterTab, Left, Right, Body } from "native