-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathSplash.java
More file actions
58 lines (45 loc) · 1.65 KB
/
Splash.java
File metadata and controls
58 lines (45 loc) · 1.65 KB
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
package com.fei435;
import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageButton;
public class Splash extends Activity {
private ImageButton startMain;
private ImageButton config;
private Drawable startDrawable;
private Drawable configDrawable;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//隐去标题(应用的名字必须要写在setContentView之前,否则会有异常)
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.splash);
startMain = (ImageButton)findViewById(R.id.btnStartMain);
config = (ImageButton)findViewById(R.id.btnConfig);
startMain.setOnClickListener(
new ImageButton.OnClickListener(){
public void onClick(View v) {
Intent setIntent = new Intent();
setIntent.setClass(Splash.this, Main.class);
startActivity(setIntent);
finish();
System.exit(0);
}
});
config.setOnClickListener(
new ImageButton.OnClickListener(){
public void onClick(View v) {
Intent setIntent = new Intent();
setIntent.setClass(Splash.this, WifiCarSettings.class);
startActivity(setIntent);
}
});
}
}