沈斌
2018-05-16 6c88cd89b3f3d6d140f6eb0cec20e2f57a7ff563
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package com.moral.yunfushao.activity;
 
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
 
import com.moral.andbrickslib.utils.StatusBarUtil;
import com.moral.yunfushao.MainActivity;
import com.moral.yunfushao.MainApp;
import com.moral.yunfushao.R;
import com.moral.yunfushao.base.BaseActivity;
 
 
/**
 * Created by haijiang on 2017/2/20.
 */
 
public class SplashActivity extends BaseActivity implements Runnable{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        StatusBarUtil.setStatusBarDrawable(SplashActivity.this, R.drawable.trans_rect_bg);
    }
 
    @Override
    protected void getBundleExtras(Bundle extras) {
 
    }
 
    @Override
    protected int getLayoutId() {
        return R.layout.ac_splash_layout;
    }
 
    @Override
    protected void initViews() {
        Thread delayThread = new Thread(this);
        delayThread.start();
    }
 
    @Override
    protected void initListener() {
 
    }
 
    @Override
    protected void initData() {
 
    }
 
    @Override
    protected void processClick(View view) {
 
    }
 
    @Override
    public void onClick(View v) {
 
    }
 
    @Override
    protected void onErrorPageClick() {
 
    }
 
    @Override
    public void run() {
        try {
            Thread.sleep(1000);
        } catch(InterruptedException e) {
            e.printStackTrace();
        }
        if(!TextUtils.isEmpty(MainApp.userId)){
            Intent intent = new Intent(this, MainActivity.class);
            startActivity(intent);
        }else{
            Intent intent = new Intent(this, LoginActivity.class);
            startActivity(intent);
        }
        finish();
    }
}