OpenSooq / Pluto

Pluto is an Easy, lightweight and high performance slider view library for Android. You have the flexibility to customize it to any view since it based RecyclerView.
https://engineering.opensooq.com
109 stars 16 forks source link

App crashing when passing an empty array to adapter #2

Closed edu1525 closed 5 years ago

edu1525 commented 5 years ago

When I try to pass an empty array to my PlutoAdapter the app raises an IndexOutOfBoundsException, how can I handle this case and show a placeholder image?

tamtom commented 5 years ago

@edu1525 currently Pluto does not support empty array, my suggestion to handle this situation is to check if the array is empty before plotu.create() if it empty add a placeholder item. what do you think? we are open to any suggestion for another approach we can add to the library

tamtom commented 5 years ago

will close this since its user issue, please if you have any suggestion reopen it :)