Android Open Source - iSlide Play Menu






From Project

Back to project page iSlide.

License

The source code is released under:

MIT License

If you think the Android project iSlide 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 edu.csun.group2.islide;
//from  w w w.j  a  va  2 s.  c  o  m
import javax.xml.datatype.Duration;

import com.badlogic.gdx.backends.android.AndroidApplication;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;


public class PlayMenu extends Activity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_play_menu);
    setButtonHandlers();
    
  }
  private void setButtonHandlers() {
      ((Button) findViewById(R.id.btn_select)).setOnClickListener(btnClick);  
      //((Button) findViewById(R.id.btn_gallery)).setOnClickListener(btnClick);
      ((Button) findViewById(R.id.btn_test)).setOnClickListener(btnClick);
  }
  
  private View.OnClickListener btnClick = new View.OnClickListener() {
      @Override
      public void onClick(View v) {
          switch (v.getId()) {
              case R.id.btn_test: {
                Utility.fileLocation="";
                Intent test = new Intent(PlayMenu.this, MainActivity.class);
                startActivity(test);
                  break;
              }
              //add camera interaction here
              case R.id.btn_select: {
                if(android.os.Build.VERSION.SDK_INT >= 9){
                  Intent select = new Intent(PlayMenu.this, SelectImageActivity.class);
                  startActivity(select);
                }
                else{
                  Toast.makeText(PlayMenu.this, "Sorry API Level not high enough to use Camera function.", Toast.LENGTH_LONG).show();
                }
                  break;
              }
              /*
              case R.id.btn_gallery: {
                Intent gallery = new Intent(PlayMenu.this, .class);
                startActivity(gallery);
                  break;
              }*/
          }
      }
  };
}




Java Source Code List

edu.csun.group2.islide.CameraPreview.java
edu.csun.group2.islide.HighScore.java
edu.csun.group2.islide.MainActivity.java
edu.csun.group2.islide.MainMenuActivity.java
edu.csun.group2.islide.PhotoHandler.java
edu.csun.group2.islide.PlayMenu.java
edu.csun.group2.islide.SelectImageActivity.java
edu.csun.group2.islide.SettingsMenu.java
edu.csun.group2.islide.TakePictureActivity.java
edu.csun.group2.islide.UtilityInfo.java
edu.csun.group2.islide.Utility.java
edu.csun.group2.islide.engine.BoardTest.java
edu.csun.group2.islide.engine.Board.java
edu.csun.group2.islide.engine.GameBoardTest.java
edu.csun.group2.islide.engine.GameBoard.java
edu.csun.group2.islide.engine.GameManager.java
edu.csun.group2.islide.engine.InputHandler.java
edu.csun.group2.islide.engine.MoveComparator.java
edu.csun.group2.islide.engine.MoveTest.java
edu.csun.group2.islide.engine.Move.java
edu.csun.group2.islide.engine.Pair.java
edu.csun.group2.islide.engine.entity.SlideTile.java
edu.csun.group2.islide.engine.entity.TileManager.java
edu.csun.group2.islide.global.GameInfo.java
edu.csun.group2.islide.interfaces.IRenderable.java
edu.csun.group2.islide.iSlide.java