Socket
Socket
Sign inDemoInstall

@remobile/react-native-smart-keyboard

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @remobile/react-native-smart-keyboard

A smart keyboard for ios base on IQKeyboardManager[android not needed]


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

React Native Smart Keyboard (remobile)

A smart keyboard for ios base on IQKeyboardManager[android not needed]

Installation

npm install @remobile/react-native-smart-keyboard-label --save

Installation (iOS)

  • Drag RCTSmartKeyboard.xcodeproj to your project on Xcode.
  • Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libRCTSmartKeyboard.a from the Products folder inside the RCTSmartKeyboard.xcodeproj.

Android

  • android not needed, because it has windowSoftInputMode.

Usage

Example

'use strict';

var React = require('react');
var ReactNative = require('react-native');
var {
    StyleSheet,
    TextInput,
    ScrollView,
    TouchableOpacity,
    Text,
} = ReactNative;

const SmartKeyboard = require('@remobile/react-native-smart-keyboard');

module.exports = React.createClass({
    getInitialState() {
        return {
            enable: true
        };
    },
    switchEnable() {
        const {enable} = this.state;
        if (enable) {
            SmartKeyboard.disable();
        } else {
            SmartKeyboard.enable();
        }
        this.setState({enable: !enable});
    },
    render() {
        const {enable} = this.state;
        return (
            <ScrollView>
                <TouchableOpacity onPress={this.switchEnable}>
                    <Text style={styles.instructions}>
                        {enable?'关闭':'开启'}
                    </Text>
                </TouchableOpacity>
                <TextInput
                    placeholder="您的手机号码1"
                    style={styles.text_input}
                    />
                <TextInput
                    placeholder="您的手机号码2"
                    style={styles.text_input}
                    />
                <TextInput
                    placeholder="您的手机号码3"
                    style={styles.text_input}
                    />
                <TextInput
                    placeholder="您的手机号码4"
                    style={styles.text_input}
                    />
                <TextInput
                    placeholder="您的手机号码5"
                    style={styles.text_input}
                    />
                <TextInput
                    placeholder="您的手机号码6"
                    style={styles.text_input}
                    />
                <TextInput
                    placeholder="您的手机号码7"
                    style={styles.text_input}
                    />
                <TextInput
                    placeholder="您的手机号码8"
                    style={styles.text_input}
                    />
                <TextInput
                    placeholder="您的手机号码9"
                    style={styles.text_input}
                    />
                <TextInput
                    placeholder="您的手机号码10"
                    style={styles.text_input}
                    />
            </ScrollView>
        );
    }
});

const styles = StyleSheet.create({
    instructions: {
        marginTop: 50,
        textAlign: 'center',
        color: '#333333',
        marginBottom: 5,
    },
    text_input: {
        height:40,
        width: 250,
        fontSize:14,
        marginBottom: 20,
        paddingLeft: 2,
        alignSelf: 'center',
        backgroundColor: '#FFFFFF',
    },
});

Screencasts

demo

Methods

  • enable : PropTypes.function
  • disable : PropTypes.function

see detail use

  • https://github.com/remobile/react-native-template

Keywords

FAQs

Last updated on 06 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc