Does anyone know how to do a slide show of images in a HorizontalScroolView in android? Or do you know of any library that does this? I need to make a slideshow within a fragment
Does anyone know how to do a slide show of images in a HorizontalScroolView in android? Or do you know of any library that does this? I need to make a slideshow within a fragment
I use a very good call AndroidImageSlider
dependencies{compile"com.android.support:support-v4:+"
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
}
Add permissions on AndroidManifest.xml
<!-- if you want to load images from the internet -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- if you want to load images from a file OR from the internet -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Add Slider to your layout:
<com.daimajia.slider.library.SliderLayout
android:id="@+id/slider"
android:layout_width="match_parent"
android:layout_height="200dp"
/>
This is a basic step-by-step taken from the README of the project and translated, for instructions refer to it.