/**
* 长大长新-长江大学校园安卓应用
*
* Copyright (C) 2014-2016 Rex Lee <duguying2008@gmail.com>
*
* This program is free and opensource software;
* you can redistribute it and/or modify
* it under the terms of the MIT License
*/
package com.rex.yangtzeu.ui;
import com.rex.yangtzeu.R;
import android.os.Bundle;
import android.app.Activity;
import android.view.KeyEvent;
public class Library extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.library);
}
/**
* 按键事件
*/
public boolean onKeyDown(int keyCode, KeyEvent event) {
// 后退动画
if (keyCode == KeyEvent.KEYCODE_BACK) {
finish();
overridePendingTransition(R.anim.back_left_in,
R.anim.back_right_out);
return true;
}
return super.onKeyDown(keyCode, event);
}
}