Android Open Source - TheFirstMyth01 Game Activity






From Project

Back to project page TheFirstMyth01.

License

The source code is released under:

MIT License

If you think the Android project TheFirstMyth01 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.gametest1;
//  w  w w  .  j  a v a  2  s . c  o  m
import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.pm.ActivityInfo;
import android.view.Window;
import android.view.WindowManager;

public class GameActivity extends Activity {

  private GameView msf;

  @Override
  protected void onResume() {
    // TODO Auto-generated method stub
    super.onResume();
  }
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    
    
    // ???????-?????????????????
    this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    // ?????
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    msf = new GameView(this);
    setContentView(msf);
    // setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);??????
  }

  @Override
  public void onBackPressed() {
    // TODO Auto-generated method stub
    new AlertDialog.Builder(this)

    /* ???????????? */

    .setTitle("??????")

    /* ???????????? */

    .setIcon(R.drawable.ic_launcher)

    /* ????????????? */

    .setMessage("??????????????")
    .setPositiveButton("??",
        new DialogInterface.OnClickListener() {
          // ??
          public void onClick(
              DialogInterface dialoginterface, int i) {
            android.os.Process
                .killProcess(android.os.Process
                    .myPid());

            // SoundManager.Instance.stopBackgroundSound();
          }
        })
    .setNegativeButton("????",
        new DialogInterface.OnClickListener() {
          /* ????????????? */
          public void onClick(
              DialogInterface dialoginterface, int i) {
            // ???????
          }
        }).show();

  }
  
  public void onPause() {
      super.onPause();
  }
}




Java Source Code List

com.example.gametest1.GameActivity.java
com.example.gametest1.GameMainActivity.java
com.example.gametest1.GameView.java
com.example.gametest1.MoveTest.java
com.game.base.BaseInfo.java
com.game.base.GameBackGround.java
com.game.base.GameMap.java
com.game.base.PubSet.java
com.game.commen.ActionToDo.java
com.game.commen.BitmapUtil.java
com.game.commen.Direction.java
com.game.commen.EffectName.java
com.game.commen.GetImgCommen.java
com.game.commen.MapName.java
com.game.commen.ToDo.java
com.game.data.BaseInfo.java
com.game.data.RoleData_Main.java
com.game.data.RoleData.java
com.game.effect.SpecialEffect1.java
com.game.effect.SpecialEffect.java
com.game.renwu.Objs.java
com.game.renwu.SpiritMain.java
com.game.renwu.Spirit_Main.java
com.game.renwu.Spirit_NPC.java
com.game.renwu.Spirit.java
com.game.renwu.Spiritgirl.java