-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainActivity.java
More file actions
50 lines (44 loc) · 1.36 KB
/
MainActivity.java
File metadata and controls
50 lines (44 loc) · 1.36 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
package com.example.jason.a4x4;
import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
public class MainActivity extends Activity {
GamePanel gamePanel;
@Override
protected void onCreate(Bundle savedInstanceState) {
System.out.println("onCreate");
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
gamePanel = new GamePanel(MainActivity.this);
setContentView(gamePanel);
}
@Override
protected void onPause(){
super.onPause();
System.out.println("onPause");
}
@Override
protected void onRestart(){
super.onRestart();
System.out.println("onRestart");
}
@Override
protected void onStart(){
super.onStart();
System.out.println("onStart");
}
@Override
protected void onStop(){
super.onStop();
System.out.println("onStop");
}
@Override
protected void onResume(){
super.onResume();
System.out.println("onResume");
}
}