Doesn't work on Android
See original GitHub issueHi 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,
},
});
Thanks !!!
Issue Analytics
- State:
- Created 6 years ago
- Comments:14
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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'>
@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 forwindowSoftInputMode
isadjustPan
? 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?