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
- Host: GitHub
- URL: https://github.com/yogeshpaliyal/android-curl-view-animation
- Owner: yogeshpaliyal
- Archived: true
- Created: 2017-12-29T12:19:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T05:37:38.000Z (over 3 years ago)
- Last Synced: 2025-02-18T22:16:23.173Z (over 1 year ago)
- Topics: android, animation, java, kotlin
- Language: Java
- Homepage: https://techpaliyal.com
- Size: 1.98 MB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Android Curl View Animation
[](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