Skip to content

sarovin/react-native-scrollview-smart

 
 

Repository files navigation

React Native Scrollview Smart CircleCI react-native-scrollview-smart npm version Known Vulnerabilities

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.scroll.inputFocused(
      findNodeHandle(this[inputName]),
    );
  }

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

Donate

  • Bitcoin (BTC): 1Eca2r87M5iBMPedAaNLvNpqnSjxBeGiE8
  • Etherium (ETH): 0xf6CEe7BbaF05702a55d2579A89081063dc15Ff72
  • Litecoin (LTC): LaN2fKHPrRMLQqC7C3ngLUnJPNoAeW41W7

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%