Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

jackphuongvu/react-native-keyboard-view-custom

 
 

Repository files navigation

react-native-keyboard-view

KeyboardView Library for react-native

Supports:

only supports: react-native >= 0.42.0

platform:

ios √
android √

Example

Installation

  • Install from npm
npm i react-native-keyboard-view --save
  • Link native library
react-native link react-native-keyboard-view

Usage

import KeyboardView from 'react-native-keyboard-view';

class Example extends Component {
    
    close() {
        KeyboardView.dismiss();
    };
    
    _renderStickyView() {
        return (
            <View style={{height: 40}}><Text>BUTTON</Text></View>
        );
    };
    
    _renderCover() {
        return (
            <View style={{flex: 1, backgroundColor: 'rgba(0, 0, 0, 0.25)'}} />
        );
    };
    
    render() {
        return (
            <KeyboardView
                onShow={() => console.log('onShow')}
                onHide={() => console.log('onHide')}
                renderStickyView={this._renderStickyView}
                renderCover={this._renderCover}
            >
                <View style={{flex: 1}} />
            </KeyboardView>
        );
    }
}

About

KeyboardView for react-native

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 45.2%
  • Java 41.9%
  • JavaScript 10.6%
  • Python 1.3%
  • Other 1.0%