woong's

Android Intro 사용하기 본문

Develop/Android

Android Intro 사용하기

dlsdnd345 2016. 2. 14. 00:29
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Android Intro 사용하기


​안녕하세요 . 자주 쓰이게 되는 Intro 효과 나타내기 입니다. 


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.iw.booklibrary;
 
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
 
public class IntroActivity extends BaseActivity {
 
    private static final int SLEEP_TIME = 2000;
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_intro);
 
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(SLEEP_TIME);
                } catch (Throwable ex) {
                    ex.printStackTrace();
                }
                Intent i = new Intent(IntroActivity.this, MainActivity.class);
                startActivity(i);
                finish();
            }
        }).start();
    }
}
 


Comments