How to recreate Flatlist Padding Top style on Flashlist #1120
Unanswered
spagrhetti
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://snack.expo.dev/@spagrhetti/flashlist-background-image-header
I want to have a background image at the top of a list of elements. When I swipe up, i want the elements to go on top of the background image, but have a white background (as demo'd with the flatlist in the snack). I can achieve this by putting paddingTop on the flatlist, as well as paddingBottom in the contentContainerStyle.
However, since flashlist doesn't take in a style prop, I can't get an equivalent style. Does anybody have a workaround for this? Right now you can see the image behind the elements, which is not what I want.
Additionally: With the exact same render item styles, the flashlist adds what looks like a 1px margin to the right that doesn't exist in the flatlist, and doesn't have the correct 2px margin between the elements in the list. Does anybody know why this happens or how to fix?
Beta Was this translation helpful? Give feedback.
All reactions