StudySchedule.java :  » UnTagged » asterplus-android-dev » kr » endy » smartwords » activities » etc » Android Open Source

Android Open Source » UnTagged » asterplus android dev 
asterplus android dev » kr » endy » smartwords » activities » etc » StudySchedule.java
package kr.endy.smartwords.activities.etc;

import kr.endy.smartwords.R;
import kr.endy.smartwords.SmartWords;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;

public class StudySchedule extends Activity {
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.schedule);
  }
  private void returnToMain() {
    // TODO Auto-generated method stub
    Intent intent = new Intent(StudySchedule.this, SmartWords.class);
    intent.putExtra("isMain", false);
    startActivity(intent);
    finish();
  }
  @Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {
    
    if ( keyCode == event.KEYCODE_BACK ) {
      returnToMain();
    }
    
    // TODO Auto-generated method stub
    return super.onKeyDown(keyCode, event);
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.