maxmagee / chick-fil-a

(Old Version. See README) Recreating the Chick-fil-A App in React Native.
2 stars 0 forks source link

Design and Create Home Screen #41

Closed maxmagee closed 6 years ago

maxmagee commented 6 years ago

Design and create the home screen. There are a few things to consider here:

maxmagee commented 6 years ago

This might be how I handle the scrolling content 'over' the header text. Found here

Try declaring your background element "behind" the ScrollView using position:absolute within a position:relative container, and make the ScrollView transparent to let the background show through:

<View style={[styles.container]}>
  <View style={[styles.fixed]}>
    {backgroundImageContent}
  </View>
  <ScrollView style={[styles.fixed, {backgroundColor: 'transparent'}]}>
    {scrollableContent}
  </ScrollView>
</View>
var styles = StyleSheet.create({
  container: {
    position: 'relative'
  },
  fixed: {
    position: 'absolute',
    top: 0,
    left: 0,
    right: 0,
    bottom: 0,
  }
})