안드로이드 개발 질문/답변
(글 수 45,052)
animation 을 추가하는 중인데,
예전에 만들었던것은 잘 돌아가는데 다시 할려니 잘 안돼는군요. 뭐가 문제인지..
일단 res 디렉토리 밑이 anim 디렉토리를 생성하고 아래와 같은 xml 파일을 생성했습니다.
intro_anim_01, 02 파일은 drawable 디렉토리 밑에 들어있구요.
그리고 layout 디렉토리 밑의 intro.xml 파일에서 불러오는데 animation 효과는 없고 첫번째 그림파일만 출력되네요.
소스로 보면 아래와 같습니다.
설정에서 뭘 빠트린게 있는지.. 왜 안돼는지 모르겠네요.
다른 프로젝트에서 정상적으로 사용하고 있는 방법인데..
정리를 하자면..
설정을 따로 해준것은 없고 res 디렉토리 밑에 anim 디렉토리를 만들고 animation 정의를 한 xml 파일을 넣어두고, 그 파일을 layout 의 xml 파일에서 불렀습니다.
현재 첫번째 그림만 출력되고 animation 작동은 하지 않습니다.
-_-..
그럼 수고하세요..
예전에 만들었던것은 잘 돌아가는데 다시 할려니 잘 안돼는군요. 뭐가 문제인지..
일단 res 디렉토리 밑이 anim 디렉토리를 생성하고 아래와 같은 xml 파일을 생성했습니다.
<?xml version="1.0" encoding="utf-8"?> <animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false"> <item android:drawable="@drawable/intro_anim_02" android:duration="1000" /> <item android:drawable="@drawable/intro_anim_01" android:duration="1000" /> </animation-list>
intro_anim_01, 02 파일은 drawable 디렉토리 밑에 들어있구요.
그리고 layout 디렉토리 밑의 intro.xml 파일에서 불러오는데 animation 효과는 없고 첫번째 그림파일만 출력되네요.
소스로 보면 아래와 같습니다.
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:layout_width="fill_parent">
<LinearLayout android:id="@+id/LinearLayout01" android:layout_height="fill_parent" android:layout_width="fill_parent"><ImageView android:layout_height="fill_parent" android:layout_width="fill_parent" android:id="@+id/imgViewIntroAnim" android:background="@anim/intro01"> </ImageView></LinearLayout> </LinearLayout>
설정에서 뭘 빠트린게 있는지.. 왜 안돼는지 모르겠네요.
다른 프로젝트에서 정상적으로 사용하고 있는 방법인데..
정리를 하자면..
설정을 따로 해준것은 없고 res 디렉토리 밑에 anim 디렉토리를 만들고 animation 정의를 한 xml 파일을 넣어두고, 그 파일을 layout 의 xml 파일에서 불렀습니다.
현재 첫번째 그림만 출력되고 animation 작동은 하지 않습니다.
-_-..
그럼 수고하세요..