각종 소스를 참고하여 만들어보았는데

 

프레임애니메이션이 들어가는 액티비티가 실행될때에 잠시 멈췄다가

 

프로세스에러가 납니다. 어느 부분이 잘못된 것일까요?

 

몇시간동안 이거 오류만 잡다가 포기했습니다.. 흑흑

 

 

그리고 로딩이 끝난 이후에 바로 다음 액티비티로 넘어가게 하려면 어떻게 해야하죠?

 

(즉 로딩애니.xml 에 있는 원샷 옵션이 끝나고 난 뒤에 말이죠.)

 

 

로딩액티비티.java

 

package Show.Back.SB;

import android.app.Activity;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;

public class LoadingActivity extends Activity {
 
 ImageView img;
 AnimationDrawable mAni;
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.loading);
       
        img = (ImageView)findViewById(R.id.loading0);
        img.setBackgroundResource(R.drawable.loadani);
        mAni = (AnimationDrawable)img.getBackground();
       
        img.post(new Runnable(){
         public void run(){
          mAni.start();
         }
        });
       
    }
     
}

 

로딩.xml

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">

    <ImageView
        android:id="@+id/loading0"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
        android:src="@drawable/loadani"/>

</LinearLayout>

 

로드애니.xml

 

<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="httpL//schemas.android.com/apk/res/android"
    android:oneshot="true">
    <item android:drawable="@drawable/loading0" android:duration="500"/>
    <item android:drawable="@drawable/loading1" android:duration="500"/>
    <item android:drawable="@drawable/loading2" android:duration="500"/>
    <item android:drawable="@drawable/loading3" android:duration="500"/>
    <item android:drawable="@drawable/loading4" android:duration="500"/>
    <item android:drawable="@drawable/loading5" android:duration="500"/>
    </animation-list>