An open API service indexing awesome lists of open source software.

https://github.com/yogeshpaliyal/android-curl-view-animation

Android Curl View Animation Advance | JAVA | Kotlin
https://github.com/yogeshpaliyal/android-curl-view-animation

android animation java kotlin

Last synced: over 1 year ago
JSON representation

Android Curl View Animation Advance | JAVA | Kotlin

Awesome Lists containing this project

README

          

# Android Curl View Animation

[![](https://jitpack.io/v/yogeshpaliyal/Android-Curl-View-Animation.svg)](https://jitpack.io/#yogeshpaliyal/Android-Curl-View-Animation)

**Step 1.** Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
```gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```

**Step 2.** Add the dependency
``` gradle
dependencies {
compile 'com.github.yogeshpaliyal:Android-Curl-View-Animation:-SNAPSHOT'
}
```

**Step 3.** Add Curl View To Your Layout
``` xml

```
**Step 4.** Create Int Array (JAVA)
```java
Java ArrayList arrImages=new ArrayList();

Kotlin var arrImages=ArrayList()
```
**Step 5.** Load Array(Both Java & Kotlin)
```java
arrImages.add(R.drawable.img1);
arrImages.add(R.drawable.img2);
arrImages.add(R.drawable.img3);
...
```
**Step 6.**
```Kotlin
CurlActivity(this).load(curlView,array)
```

**Full Activity Code**
```Kotlin
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()
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)
}
}
```

**Source**
https://github.com/harism/android_page_curl