Skip to content

sarovin/react-native-scrollview-smart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native Scrollview Smart react-native-scrollview-smart npm version

A smart iOS and Android scrollview for React Native

INSTALLATION

npm i react-native-scrollview-smart --save

Android

in your `AndroidManifest.xml add:

<activity
  android:windowSoftInputMode="adjustPan" ... >

Demo

Usage

See the Example app

class Example extends Component {

  constructor(props) {
    super(props);
    this.scrollOnFocus = this.scrollOnFocus.bind(this);
  }

  scrollOnFocus = (inputName) => () => {
    this.refs.scroll.inputFocused(
      findNodeHandle(this.refs[inputName]),
    );
  }

  render() {
    return (
      <ScrollViewSmart
        ref={'scroll'}
      >
        <TextInput
          ref={'input'}
          onFocus={this.scrollOnFocus('input')}
        />
        // ...
      </ScrollViewSmart>
    );
  }
}

About

A Smart ScrollView component for IOS and Android

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 48.4%
  • Objective-C 30.6%
  • Python 11.9%
  • Java 9.1%