I would like set button on the bottom right corner width fixed position in React Native.
position: fixed
don\'t work in React Native and stickyHeaderI
Try this:
render() {
return (
<View style={{flex:1}}>
<View style={{borderWidth:1,position:'absolute',bottom:0,alignSelf:'flex-end'}}>
<Button
title="Press"
color="#841584"
accessibilityLabel="Press"/>
</View>
</View>
);
}
Output:
<View style={{flex: 1}}>
<ScrollView style={{backgroundColor:'yellow'}}>
<Text>body</Text>
</ScrollView>
<View><Text>sticky footer</Text></View>
</View>
If you are using Native Base you can just use the Footer Component
Just put the component outside of the scrollview and set it with position absolute