/** * 监听器 * * @author ren */ @Override public void onClick(View v) { // TODO Auto-generated method stub if (v.getId() == backBtn.getId()) { finish(); // (点屏幕)退出加特效,duang,从右到左移动 ActivityAnimation.left_To_right(this); } if (v.getId() == writeBtn.getId()) { Intent write = new Intent(this, PersonalMessageEdit.class); // 进入信息编辑界面 startActivity(write); // 进入加特效,duang,从右到左移动 ActivityAnimation.right_To_left(this); } }
@SuppressWarnings("static-access") @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == event.KEYCODE_BACK) { if (!b) { finish(); // (返回键)退出加特效,duang,从右到左移动 ActivityAnimation.left_To_right(this); return super.onKeyDown(keyCode, event); } else { return false; } } else { return super.onKeyDown(keyCode, event); } }