react native scrollview horizontal
<ScrollView horizontal={true}>
<Text>Child 1</Text>
<Text>Child 2</Text>
<Text>Child 3</Text>
</ScrollView>
react native scrollview horizontal
<ScrollView horizontal={true}>
<Text>Child 1</Text>
<Text>Child 2</Text>
<Text>Child 3</Text>
</ScrollView>
overflow scroll react native
import React, { Component } from "react";
import { ScrollView, View } from "react-native";
const { height } = Dimensions.get("window");
export class index extends Component {
state = {
screenHeight: 0,
};
onContentSizeChange = (contentWidth, contentHeight) => {
this.setState({ screenHeight: contentHeight });
};
render() {
const scrollEnabled = this.state.screenHeight > height;
return (
<ScrollView
style={{ flex: 1 }}
contentContainerStyle={styles.scrollview}
scrollEnabled={scrollEnabled}
onContentSizeChange={this.onContentSizeChange}
>
<View style={styles.content}></View>
</ScrollView>
);
}
}
export default index;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us