📄 ac01.java
字号:
package com.misoo.ppxx;import android.app.Activity;import android.content.Context;import android.os.Bundle;import android.view.KeyEvent;import android.view.LayoutInflater;import android.view.View;import android.view.View.OnClickListener;import android.widget.Button;import android.widget.LinearLayout;public class ac01 extends Activity implements OnClickListener { /** Called when the activity is first created. */ private final int WC = LinearLayout.LayoutParams.WRAP_CONTENT; private GraphicView gv = null; private LinearLayout current_layout = null; private int state_var_A = 0; //initial @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); state_var_A = 0; current_layout = null; gv = new GraphicView(this); goto_state_1(); } @Override public boolean onKeyDown(int keyCode, KeyEvent msg) { switch(keyCode) { case KeyEvent.KEYCODE_A: if(state_var_A == 1) this.goto_state_2(); break; } return true; } void state_entry_action(){ if(current_layout != null) current_layout.removeAllViewsInLayout(); } void goto_state_1() //go to state-01 { setTitle("
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -