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

how to fetch image url #3

Closed fadedreams closed 5 years ago

fadedreams commented 5 years ago

Hi, I am new in android programming, could you please guide me how to use this to load dynamic images from URL instead of using R.drawable folder? thanks

JonathanNet commented 5 years ago

Yeah I also looking for that :D

lobothijau commented 5 years ago

You can modify the model to have string for image url instead of int.

MohamedHamole7 commented 5 years ago

you can fetch image url Like this @JonathanNet @colorless1 @Override public void set(YourModel yourModel, int position) { if (yourModel.getPictureName().contains(" ")){ Picasso.get() .load(R.drawable.empty_pic_big) .into(sliderImage); } else { Picasso.get() .load(yourModel.getPictureName()) .into(sliderImage); } }

tamtom commented 5 years ago

@MohamedHamole7 thanks