ÇØ´ç ¾×ƼºñƼ ½ÇÇà½Ã ¹Ù·Î ·ÎµùȸéÀÌ »ý±â°í
·ÎµùȸéÀÌ ³¡³ª°Ô µÇ¸é ´ÙÀ½ ¾×ƼºñƼ·Î ³Ñ¾î°¡°Ô ÇÏ°í ½Í½À´Ï´Ù.
ÀÏ´Ü Áö±ÝÀº ÇØ´ç ¾×ƼºñƼ·Î ³Ñ¾î°¡¸é ÇÁ·Î¼¼½º ¿¡·¯°¡ ³³´Ï´Ù. ±âÃÊÀûÀÎ
½Ç¼ö¸¦ ÇÑ °Í °°Àºµ¥ ¾î¶² °ÍÀÌ ¹®Á¦ÀÎÁö ¸ð¸£°Ú¾î¿ä.
1. ±× ¹®Á¦°¡ ±Ã±ÝÇÕ´Ï´Ù.
2. ÇѹøÀÇ ÇÁ·¹ÀӾִϸÞÀ̼ÇÀ» µ¹¸° ÀÌÈÄ ´ÙÀ½ ¾×ƼºñƼ·Î ³Ñ¾î°¡·Á¸é ¾îµð¿¡ ¼Ò½º¸¦ ³Ö¾î¾ßÇÒÁö?
LoadingActivity.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();
}
});
}
}
loading.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
loadani.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
¾î¶² °ÍÀÌ ¹®Á¦¶ó µ¹¾Æ°¡Áö ¾Ê´ÂÁö ±Ã±ÝÇÕ´Ï´Ù!! ´É·ÂÀÚÇüµé ÇØ°á¹Ù¶÷
* ±ÛÀ» µî·ÏÇϽǶ§ ²À ÇÊ¿äÇÑ °æ¿ì°¡ ¾Æ´Ï¸é °³ÀÎÁ¤º¸¸¦ ³²±âÁö ¸¶¼¼¿ä ^^ (¿¬¶ôó,À̸ÞÀÏÁÖ¼Ò,Áֹεî·Ï¹øÈ£ µî)