allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
dependencies { compile 'com.github.yogeshpaliyal:Android-Curl-View-Animation:-SNAPSHOT' }
<techpaliyal.com.curlviewanimation.CurlView android:layout_width="match_parent" android:layout_height="match_parent" app:horizontal_two_page="false" android:id="@+id/curlView"/>
Java ArrayList<Integer> arrImages=new ArrayList<Integer>();
Kotlin var arrImages=ArrayList<Int>()
arrImages.add(R.drawable.img1); arrImages.add(R.drawable.img2); arrImages.add(R.drawable.img3); ...
CurlActivity(this).load(curlView,array)
package techpaliyal.com.curlanimationlibrarytest
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_main.*
import techpaliyal.com.curlviewanimation.CurlActivity
class MainActivity : AppCompatActivity() {
var array=ArrayList<Int>()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
array.add(R.drawable.img1)
array.add(R.drawable.img2)
array.add(R.drawable.img3)
array.add(R.drawable.img4)
array.add(R.drawable.img5)
CurlActivity(this).load(curlView,array)
}
}
2 Comments
Dear,
I am happy to get this curl page Tutorial.but I am new to Android studio and facing a problem. I want to add image from server to curlView . How can do it? Please give the solution.
Have you added internet permission?