@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (MainTabAct.handleBack(getIntent())) {
isFromMain = false;
return true;
}
} else if (keyCode == KeyEvent.KEYCODE_HOME) {
isFromMain = false;
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public void onAttachedToWindow() {
isFromMain = false;
super.onAttachedToWindow();
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (MainTabAct.handleBack(getIntent())) {
isFromMain = false;
return true;
}
} else if (keyCode == KeyEvent.KEYCODE_HOME) {
isFromMain = false;
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public void onAttachedToWindow() {
isFromMain = false;
super.onAttachedToWindow();
}