fix roomView
This commit is contained in:
parent
a062aeccc8
commit
4e769920a1
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
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 { ListView } from 'realm/react-native';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
|
@ -19,6 +19,9 @@ const styles = StyleSheet.create({
|
||||||
flex: 1,
|
flex: 1,
|
||||||
backgroundColor: '#fff'
|
backgroundColor: '#fff'
|
||||||
},
|
},
|
||||||
|
safeAreaView: {
|
||||||
|
flex: 1
|
||||||
|
},
|
||||||
list: {
|
list: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
transform: [{ scaleY: -1 }]
|
transform: [{ scaleY: -1 }]
|
||||||
|
@ -193,18 +196,20 @@ export default class RoomView extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<KeyboardView style={styles.container} keyboardVerticalOffset={64}>
|
<KeyboardView contentContainerStyle={styles.container} keyboardVerticalOffset={64}>
|
||||||
{this.renderBanner()}
|
{this.renderBanner()}
|
||||||
<ListView
|
<SafeAreaView style={styles.safeAreaView}>
|
||||||
enableEmptySections
|
<ListView
|
||||||
style={styles.list}
|
enableEmptySections
|
||||||
onEndReachedThreshold={10}
|
style={styles.list}
|
||||||
renderFooter={this.renderHeader}
|
onEndReachedThreshold={10}
|
||||||
onEndReached={this.onEndReached}
|
renderFooter={this.renderHeader}
|
||||||
dataSource={this.state.dataSource}
|
onEndReached={this.onEndReached}
|
||||||
renderRow={item => this.renderItem({ item })}
|
dataSource={this.state.dataSource}
|
||||||
initialListSize={10}
|
renderRow={item => this.renderItem({ item })}
|
||||||
/>
|
initialListSize={10}
|
||||||
|
/>
|
||||||
|
</SafeAreaView>
|
||||||
{this.renderFooter()}
|
{this.renderFooter()}
|
||||||
</KeyboardView>
|
</KeyboardView>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue