Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- FLUTTER
- Android
- android error
- Java
- JavaScript
- Kotlin
- css
- error
- Android Apk
- spring
- 안드로이드
- Eclipse
- Exception
- Program type already present
- R프로그래밍
- tomcat
- apache gzip
- CSS사용법
- MySQL
- android fragment
- DataTable
- Android Apk 이름
- java error
- html
- jQuery
- Android Apk 이름 변경
- release Apk
- release unsigned
- Firebase
- fragment
Archives
- Today
- Total
selfstarter
Animation simple example in Android 본문
Animation simple example in Android
Android Animation 예제(애니메이션 방식)
- 00~03.png file drop into drawable folder
- Add animation-list file in drawable folder
- write animation image list
- option android:oneshot="true" : if finished animation, it would stop
<?xml version="1.0" encoding="utf-8"?> <animation-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/00" android:duration="20"/> <item android:drawable="@drawable/01" android:duration="20"/> <item android:drawable="@drawable/02" android:duration="20"/> <item android:drawable="@drawable/03" android:duration="20"/> </animation-list>
- add Code in activity_main.xml
<ImageView android:id="@+id/testAnimation" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/test_animation" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" />
- add Code in MainActivity
ImageView testImage = (ImageView)findViewById(R.id.testAnimation); AnimationDrawable animationDrawable = (AnimationDrawable)testImage.getBackground(); animationDrawable.start();
'App > Android' 카테고리의 다른 글
Setting String format in Android (0) | 2020.04.01 |
---|---|
Internal error in Firestore (0.6.6-dev) (0) | 2020.04.01 |
Simple Current Time Example (0) | 2020.03.26 |
BroadcastReciver app to app in Android (0) | 2020.03.18 |
Using Android getIdentifier (0) | 2020.03.12 |
Comments