New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android not showing all local images in carousel #371
Comments
Do your images or image containers (the ones where nothing shows up) show a loading indicator? |
No loading indicator. Note these images are local and so we use Source not uri for them. |
Have same problem here |
@StuartMorris0 I haven't been able to reproduce the issue so far. It would really help if you could provide me with a Snack example. Also, here are two things to check:
|
@StuartMorris0 @wachidyulio Did you have time to try what I've previously suggested? |
I was able to resolve the issue in the end. I used a flatlist and was able to reproduce the issue. The issue seemed to be because we were using large images at 1600x1600. The issue only occurred on Android devices and not emulators. We tried the large heap change too to no avail. Making the images smaller worked out the issue for us with flatlist, so at a guess it will be the same issue here. We moved away from this package in the end, but it might help someone in the future. Using the scrolllist variable for this package made no difference in our issue either. Thanks |
Thanks a lot for the feedback @StuartMorris0 |
Is this a bug report, a feature request, or a question?
Bug Report/Question
Have you followed the required steps before opening a bug report?
(Check the step you've followed - replace the space character between the square brackets (
[]
) by anx
.)Have you made sure that it wasn't a React Native bug?
Yes, unsure.
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
Android, any version. Release or Debug build reproducible
Is the bug reproductible in a production environment (not a debug one)?
Both.
Environment
react-native-cli: 2.0.1
react-native: 0.55.3
react-native-snap-carousel 4.6.1
Expected Behavior
Show all images in the carousel
Actual Behavior
The issue occurs for items further down the carousel. The first 20 items might show fine, then random ones will not show the image.
Steps to Reproduce
This is an example of our Carousel setup. Please note, I have tried different options with the removeClippedSubviews and the initialNumToRender and useScrollView props to no avail.
The actual entry is simple text and image.
`export default class GameTypeEntry extends Component {
static propTypes = {
data: PropTypes.object.isRequired,
};
}`
What we find is that random indexed items in the carousel will not show the image. Even though with the above setup most will be using the same default image. So we know the image is there and it works for other slides (so to speak). It just doesn't show for all.
I've read the performance notes on Android. I'm not sure about the note on 'Implement shouldComponentUpdate' wether that would help or where that even needs to be implemented. Checking the examples I cannot see it anywhere.
The text was updated successfully, but these errors were encountered: