question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't work on Android

See original GitHub issue

Hi guys, im running on Expo and doesn’t work on android (running the last version of expo with react native 49), here the code:

import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  TextInput,
} from 'react-native';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'

export default class App extends Component {
  render() {
    return (
        <KeyboardAwareScrollView enableOnAndroid>
          <TextInput style={styles.textInput} placeholder={'First Name'} ref={(r) => { this._firstNameTI = r; }} returnKeyType={'next'}
                     underlineColorAndroid="transparent" onSubmitEditing={(event) => this._lastNameTI.focus()}/>
          <TextInput style={styles.textInput} placeholder={'Last Name'} ref={(r) => { this._lastNameTI = r; }} returnKeyType={'next'}
                     underlineColorAndroid="transparent" onSubmitEditing={(event) => this._countryTI.focus()}/>
          <TextInput style={styles.textInput} placeholder={'Country'} ref={(r) => { this._countryTI = r; }} returnKeyType={'next'}
                     underlineColorAndroid="transparent" onSubmitEditing={(event) => this._stateTI.focus()}/>
          <TextInput style={styles.textInput} placeholder={'State'} ref={(r) => { this._stateTI = r; }} returnKeyType={'next'}
                     underlineColorAndroid="transparent" onSubmitEditing={(event) => this._addrTI.focus()}/>
          <TextInput style={styles.textInput} placeholder={'Address'} ref={(r) => { this._addrTI = r; }} returnKeyType={'next'}
                     underlineColorAndroid="transparent" onSubmitEditing={(event) => this._emailTI.focus()}/>
          <TextInput style={styles.textInput} keyboardType="email-address" placeholder={'Email'} ref={(r) => { this._emailTI = r; }}
                     underlineColorAndroid="transparent" returnKeyType={'next'} onSubmitEditing={(event) => this._msgTI.focus()}/>
          <TextInput style={styles.textInput} placeholder={'Message'} ref={(r) => { this._msgTI = r; }} returnKeyType={'next'}
                     underlineColorAndroid="transparent" onSubmitEditing={(event) => this._notesTI.focus()}/>
          <TextInput style={styles.textInput} placeholder={'Notes'} ref={(r) => { this._notesTI = r; }} returnKeyType={'go'}
                     underlineColorAndroid="transparent"  />
        </KeyboardAwareScrollView>
    );
  }
}

const styles = StyleSheet.create({
  mainTitle: {
    fontSize: 20,
    marginTop: 10,
    textAlign: 'center'
  },
  textInput: {
    height: 60,
    borderColor: 'gray',
    borderWidth: 1,
    marginBottom: 16,
    // paddingVertical: 4,
    // paddingHorizontal: 8,
  },
});

screen recording 2017-11-08 at 06 58 pm

Thanks !!!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14

github_iconTop GitHub Comments

36reactions
Spoof14commented, Nov 17, 2017

@outaTiME have you tried adding extraScrollHeight={100}? I’m using both android and expo and it works fine for me like this <KeyboardAwareScrollView extraScrollHeight={100} enableOnAndroid={true} keyboardShouldPersistTaps='handled'>

3reactions
lucastobrazilcommented, Nov 10, 2017

@outaTiME i found the same problem… @Swordsman-Inaction thanks for the info 😃 Expo confirmed indeed that it’s adjustResize. One suggestion might be to update the docs of this repo so it’s a bit clearer that the actual setting for windowSoftInputMode is adjustPan? And also potentially that it currently can’t be used with Expo?

I’d gladly take a look at making a PR. any pointers on where to look first?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix an installed Android app that isn't working - Google Support
Try the following steps if an app installed on your phone has any of these problems: Crashing. Won't open. Won't respond. Isn't working...
Read more >
Top 8 Ways to Fix Apps Won't Open on Android - Guiding Tech
Top 8 Ways to Fix Apps Won't Open on Android · 1. Force Stop Apps · 2. Clear the App Cache and Data...
Read more >
are my apps not working on my Android phone - Carlcare
How to fix android apps not working · Reboot your phone · Update or roll back Android System WebView app · Check and...
Read more >
15 common Android problems and how to fix them - CNET
Apps won't download ... There may be two causes for your apps not downloading. First, go back to the last page on this...
Read more >
Your Android Phone or Tablet Won't Turn On? 6 Ways to Fix
Check Your Connections. Firstly, check the obvious points. · Dirt and Dust. Next, ensure there's no dust, dirt, or other gunk clogging up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found