daimajia / AndroidImageSlider

An amazing and convenient Android image slider.
MIT License
5.63k stars 1.66k forks source link

Can't get image from Drawable #309

Open renankaic opened 7 years ago

renankaic commented 7 years ago

I'm unable to use an image that is in my Drawable folder. I'm using this code. It's correct?

TextSliderView slide1 = new TextSliderView(this); slide1 .description("Serviços") .image(new File("D:\Renan\AndroidStudioProjects\LayoutTest\app\src\main\res\drawable\servicos.jpg")); sliderShow.addSlider(slide1);

But when I compile and run in my cellphone the image shows blank. Can someone help me, please?

aldocano commented 7 years ago

.image(R.drawable.servicos);

renankaic commented 7 years ago

It works! Thank you!