Android Studio
[Android Studio] 안드로이드 애니메이션 오픈소스 라이브러리 사용하기
dong_su
2023. 12. 21. 13:07
사용할 애니메이션 참고 (https://github.com/daimajia/AndroidViewAnimations)
사용 방법
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.daimajia.androidanimations:library:2.4@aar'
}
-> 빌드파일(build.gradle.kts)의 dependencies { } 안에 사용할 라이브러리를 입력 해주면 된다.
YoYo.with(Techniques.Shake).duration(400).repeat(0).playOn(imgDice1);
YoYo.with(Techniques.Shake).duration(400).repeat(0).playOn(imgDice2);
-> 그 후 사용할 애니메이션을 참고 사이트가서 고른 후 사용법대로 사용하면 된다.