Как я могу сделать так, чтобы BottomTabNavigator не покрывал вид прокрутки? - PullRequest
0 голосов
/ 13 июня 2019

enter image description here

Как сделать так, чтобы представление прокрутки подходило экрану?

        return(
                    <ScrollView scrollEnabled contentContainerStyle = {{marginBottom: 'auto'}}>
                        {this.state.bills.map(bill => {
                            return(
                                <Bill bill = {bill} key = {bill.id} />
                            )
                        })}
                    </ScrollView>

1 Ответ

0 голосов
/ 13 июня 2019

Закройте вид прокрутки внутри вида с помощью {flex: 1}, это помогло мне в моем приложении

export default class App extends React.Component {
  render() {
    return (
      <View style={styles.main}>
        <ScrollView scrollEnabled contentContainerStyle = {{marginBottom: 'auto'}}>
                        {this.state.bills.map(bill => {
                            return(
                                <Bill bill = {bill} key = {bill.id} />
                            )
                        })}
                    </ScrollView>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  main: {
   flex: 1   
  }
});
...