native-base

onChange on TextInput Not Working Inside Formik

邮差的信 提交于 2020-05-21 07:25:07
问题 Generally <TextInput> allows you to type even when you're just specifying a placeholder. However, when using within the Formik form, I am unable to type and validate anything in my form. What am I doing wrong? I have tried onChangeText with setFieldValue and handleChange both. const initialValues: FormValues = { friendEmail: '', }; export const Page: React.FunctionComponent<Props> = ({ toggleShowPage, showPage, }) => { const validationSchema = emailValidationSchema; const getFriendId = React

How to make card rounded shape in react native, native base

本秂侑毒 提交于 2020-04-30 02:35:12
问题 I'm using the native base components on top of react native and I was wondering how to get the cards be round instead of rectangular in the UI. Is there a rounded prop for that? 回答1: Well, no one actually could answer this, but somehow luckily on github I found this: import React, { Component } from "react"; import { Container, Header, Title, Content, Button, Icon, Card, CardItem, Text, Body, Left, Right, IconNB, View } from "native-base"; export default class App extends Component {

How to avoid collapsing of screen when keyboard opens in react native

大兔子大兔子 提交于 2020-03-24 00:30:35
问题 In my app the landing page is login screen. I've done it using native-base ui kit.The login screen contains a logo and below there will be 2 input fields for username and password also login button. The problem is that whenever i clicked on the input field the login form get collapse under the logo. I will share the corresponding screens for it. I've tried the following method android:windowSoftInputMode="adjustResize" within activity tag in AndroidManifest.xml . But still getting the same

React-Native Detect Screen Notch

女生的网名这么多〃 提交于 2020-03-17 07:57:27
问题 I am using nativebase.io as the UI framework for my app. My issue when I input a header for an IOS device, if the iPhone simulator is simulating iPhone X, (where there is a notch on the top of the screen), the Header element automatically detects this and moves the Header element lower on the screen. some android devices also have a similar notch at the top of the screen, but when I use a nativebase.io Header element, it doesn't detect the notch and the Header overlaps the notch. My question

How to remove the border of native-base tabs

徘徊边缘 提交于 2020-02-03 21:42:39
问题 I need to remove the border as I marked in the image. I am using react-native & native-base tabs. I need to remove the bottom border of tabs. <Tabs> <Tab heading="Tab1"> <Tab1 /> </Tab> <Tab heading="Tab2"> <Tab2 /> </Tab> <Tab heading="Tab3"> <Tab3 /> </Tab> </Tabs> 回答1: I found the solution, Need to implement ScrollableTab , Then <ScrollableTab style={{ borderWidth: 0}}> 回答2: Try this way <Tabs tabContainerStyle={{ borderBottomWidth: 0 }}> 回答3: For everyone still trying to remove the border

How to remove the border of native-base tabs

百般思念 提交于 2020-02-03 21:42:10
问题 I need to remove the border as I marked in the image. I am using react-native & native-base tabs. I need to remove the bottom border of tabs. <Tabs> <Tab heading="Tab1"> <Tab1 /> </Tab> <Tab heading="Tab2"> <Tab2 /> </Tab> <Tab heading="Tab3"> <Tab3 /> </Tab> </Tabs> 回答1: I found the solution, Need to implement ScrollableTab , Then <ScrollableTab style={{ borderWidth: 0}}> 回答2: Try this way <Tabs tabContainerStyle={{ borderBottomWidth: 0 }}> 回答3: For everyone still trying to remove the border

Right to Left in react-native

孤者浪人 提交于 2020-02-03 02:58:28
问题 By using this code(in below),The App has been RTL but location of Right & Left changed(So things must be shown in Right are turned to Left).I did it via tutorial. ReactNative.I18nManager.allowRTL(true); And another problem is when Mobile's language is LTR, Location of Images & designs turns into another side(for e.g changes from Right to Left) because App has only one LTR language. Is there any way for showing RTL & LTR like each other?? 回答1: you can use this code : first : import {

Can a React Native Picker have some kind of divider or separator between some Items?

≡放荡痞女 提交于 2020-01-03 02:55:12
问题 In other React Native and Native Base components I've seen that among the main selectable entry items you can add non-selectable things usually called dividers or separators. I can't see anything of the kind in the Picker components however. I'm implementing something like favourites or recent items sorted at the top of the picker. It would be nice to be able to insert a kind of visible dividing line between the favourite/recent section and the main section. +-----------+ | Ford | | Chevrolet

How to add custom Icons to NativeBase

时间秒杀一切 提交于 2019-12-24 20:03:47
问题 I have the .ttf and .svg files for customized icons that I designed. But I would like to import them into my NativeBase project, making them available for use in NB's <Icon /> component. How can I achieve this? 回答1: React Native Custom Icon Font for NativeBase Adopted from: https://medium.com/@kelleyannerose/react-native-custom-icon-font-with-no-sad-red-screen-72b8d09a0e7b This is what worked for me :) Step 0: React Native Vector Icons install and link Make sure you have react-native-vector

how to use universal footer for all screens in nativebase

时光毁灭记忆、已成空白 提交于 2019-12-24 11:28:19
问题 I am new to react-native and I am using nativebase UI with React Navigation This a screen I have as home the main screen. I am using nativebase components Container , Header , Footer . My question is how can I create one Footer or Header file that I can import in all screens? so I have one universal template for footer since it will be the same on all pages. Code: export default class Home extends React.Component { render() { return ( <Container> <Header> <Left/> <Body> <Title>Home</Title> <