fix roomView

This commit is contained in:
Guilherme Gazzo 2017-11-14 15:01:16 -02:00
parent a062aeccc8
commit 4e769920a1
No known key found for this signature in database
GPG Key ID: 1F85C9AD922D0829
1 changed files with 17 additions and 12 deletions

View File

@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Text, View, StyleSheet, Button } from 'react-native';
import { Text, View, StyleSheet, Button, SafeAreaView } from 'react-native';
import { ListView } from 'realm/react-native';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
@ -19,6 +19,9 @@ const styles = StyleSheet.create({
flex: 1,
backgroundColor: '#fff'
},
safeAreaView: {
flex: 1
},
list: {
flex: 1,
transform: [{ scaleY: -1 }]
@ -193,18 +196,20 @@ export default class RoomView extends React.Component {
render() {
return (
<KeyboardView style={styles.container} keyboardVerticalOffset={64}>
<KeyboardView contentContainerStyle={styles.container} keyboardVerticalOffset={64}>
{this.renderBanner()}
<ListView
enableEmptySections
style={styles.list}
onEndReachedThreshold={10}
renderFooter={this.renderHeader}
onEndReached={this.onEndReached}
dataSource={this.state.dataSource}
renderRow={item => this.renderItem({ item })}
initialListSize={10}
/>
<SafeAreaView style={styles.safeAreaView}>
<ListView
enableEmptySections
style={styles.list}
onEndReachedThreshold={10}
renderFooter={this.renderHeader}
onEndReached={this.onEndReached}
dataSource={this.state.dataSource}
renderRow={item => this.renderItem({ item })}
initialListSize={10}
/>
</SafeAreaView>
{this.renderFooter()}
</KeyboardView>
);