|
 |
8³â Àü |
ÇÁ·Î±×·¥ÀÌ ½ÇÇàÇϱâ Àü¿¡ ·Î°í¸¦ º¸¿©ÁÖ´Â À©µµ¿ì¸¦ º¸Åë Splash Screen ¶ó°í ºÎ¸¨´Ï´Ù.
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
public class Splashscreen extends Activity {
ImageView splash;
TextView text;
final Handler mHandler = new Handler();
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
splash = (ImageView) findViewById(R.id.splash);
splash.setImageResource(R.drawable.loading); // image for splash window...
text = (TextView) findViewById(R.id.text);
Thread t = new Thread() {
public void run() {
// for example, wait 4 seconds
mHandler.postDelayed(update, 4000);
// right now!! (no wait)
// mHandler.post(update);
}
};
t.start();
}
final Runnable update = new Runnable() {
public void run() {
splash.setVisibility(View.GONE); //hide
text.setVisibility(View.VISIBLE); //show
}
};
}
|
|
̵̧ : 311 |
̵̧
¸ñ·Ï
|
|