android Programming Glossary: islock
Override home and back button is case a boolean is true http://stackoverflow.com/questions/10025660/override-home-and-back-button-is-case-a-boolean-is-true extends Activity Called when the activity is first created. TextView mTextView ToggleButton mToggleButton boolean isLock false @Override public void onCreate Bundle savedInstanceState super.onCreate savedInstanceState setContentView R.layout.main.. @Override public void onCheckedChanged CompoundButton buttonView boolean isChecked TODO Auto generated method stub isLock isChecked onAttachedToWindow @Override public boolean dispatchKeyEvent KeyEvent event if event.getKeyCode KeyEvent.KEYCODE_HOME.. onAttachedToWindow @Override public boolean dispatchKeyEvent KeyEvent event if event.getKeyCode KeyEvent.KEYCODE_HOME isLock mTextView.setText KEYCODE_HOME return true else return super.dispatchKeyEvent event @Override public boolean onKeyDown..
|