2011-03-15 2 views
0

XML의 Android 버전은 loadAnimation입니까? 내 레이아웃 XML의 뷰에 적용 할 애니메이션을 지정하고 싶습니다. 내 레이아웃 XML에서 아래 할 수있는 방법XML은 Android의 loadAnimation과 동일합니다.

<?xml version="1.0" encoding="utf-8"?> 
<rotate 
    xmlns:android="http://schemas.android.com/apk/res/android"  
    android:fromDegrees="0" 
    android:toDegrees="359" 
    android:pivotX="50%" 
    android:pivotY="50%" 
    android:duration="10000" 
    android:repeatCount="infinite" /> 

: 나는 애니메이션 리소스에 정의 된 애니메이션을

?

ImageButton main_button = (ImageButton)this.findViewById(R.id.imageButton1); 
    Animation rotateAnimation = AnimationUtils.loadAnimation(this, R.anim.my_rotate); 
    main_button.startAnimation(rotateAnimation); 

답변

0

당신은, 하, 하 슬픈 얼굴을 XML :

+0

에서이 내가 한 것이 할 수없는, 감사 –