Android Open Source - FourRowSolitaire Menu Activity






From Project

Back to project page FourRowSolitaire.

License

The source code is released under:

GNU General Public License

If you think the Android project FourRowSolitaire 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

/*
 This file is a part of Four Row Solitaire
//from   w  w w  .j  av  a  2 s  .co m
 Copyright (C) 2010-2014 by Matt Stephen, Todor Balabanov, Konstantin Tsanov, Ventsislav Medarov, Vanya Gyaurova, Plamena Popova, Hristiana Kalcheva, Yana Genova

 Four Row Solitaire is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 Four Row Solitaire is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with FourRowSolitaire.  If not, see <http://www.gnu.org/licenses/>.
 */

package eu.veldsoft.four.row.solitaire;

import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 * 
 * @author Todor Balabanov
 */
public class MenuActivity extends Activity {

  /**
   * On Creation.
   * 
   * @param savedInstanceState
   * 
   * @author Konstantin Tsanov
   */
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_menu);

    ((Button) findViewById(R.id.new_game_button))
        .setOnClickListener(new OnClickListener() {
          @Override
          public void onClick(View v) {
            MenuActivity.this.startActivity(new Intent(
                MenuActivity.this, GameActivity.class));
          }
        });

    // ((Button) findViewById(R.id.statistics_button))
    // .setOnClickListener(new OnClickListener() {
    // @Override
    // public void onClick(View v) {
    // MenuActivity.this.startActivity(new Intent(
    // MenuActivity.this, StatisticsActivity.class));
    // }
    // });
    //
    // ((Button) findViewById(R.id.best_times_button))
    // .setOnClickListener(new OnClickListener() {
    // @Override
    // public void onClick(View v) {
    // MenuActivity.this.startActivity(new Intent(
    // MenuActivity.this, BestTimesActivity.class));
    // }
    // });
    //
    // ((Button) findViewById(R.id.settings_button))
    // .setOnClickListener(new OnClickListener() {
    // @Override
    // public void onClick(View v) {
    // MenuActivity.this.startActivity(new Intent(
    // MenuActivity.this, SettingsActivity.class));
    // }
    // });

    ((Button) findViewById(R.id.view_help_button))
        .setOnClickListener(new OnClickListener() {
          @Override
          public void onClick(View v) {
            MenuActivity.this.startActivity(new Intent(
                MenuActivity.this, HelpActivity.class));
          }
        });

    ((Button) findViewById(R.id.about_game_button))
        .setOnClickListener(new OnClickListener() {
          @Override
          public void onClick(View v) {
            MenuActivity.this.startActivity(new Intent(
                MenuActivity.this, AboutGameActivity.class));
          }
        });

    ((Button) findViewById(R.id.check_for_updates_button))
        .setOnClickListener(new OnClickListener() {
          @Override
          public void onClick(View v) {
            MenuActivity.this.startActivity(new Intent(
                Intent.ACTION_VIEW,
                Uri.parse(getResources().getString(
                    R.string.check_for_updates_url))));
          }
        });

    ((Button) findViewById(R.id.exit_button))
        .setOnClickListener(new OnClickListener() {
          @Override
          public void onClick(View v) {
            finish();
            System.exit(0);
          }
        });
  }
}




Java Source Code List

eu.veldsoft.four.row.solitaire.AboutGameActivity.java
eu.veldsoft.four.row.solitaire.AcePileLayeredPane.java
eu.veldsoft.four.row.solitaire.AcePile.java
eu.veldsoft.four.row.solitaire.AnimationSettings.java
eu.veldsoft.four.row.solitaire.BestTimesActivity.java
eu.veldsoft.four.row.solitaire.CardColor.java
eu.veldsoft.four.row.solitaire.CardComponent.java
eu.veldsoft.four.row.solitaire.CardRank.java
eu.veldsoft.four.row.solitaire.CardStackLayeredPane.java
eu.veldsoft.four.row.solitaire.CardStack.java
eu.veldsoft.four.row.solitaire.CardSuit.java
eu.veldsoft.four.row.solitaire.Card.java
eu.veldsoft.four.row.solitaire.ChangeAppearance.java
eu.veldsoft.four.row.solitaire.ChangeOptions.java
eu.veldsoft.four.row.solitaire.ColumnLayeredPane.java
eu.veldsoft.four.row.solitaire.Column.java
eu.veldsoft.four.row.solitaire.Common.java
eu.veldsoft.four.row.solitaire.DealDeckLayeredPane.java
eu.veldsoft.four.row.solitaire.DealDeck.java
eu.veldsoft.four.row.solitaire.Deck.java
eu.veldsoft.four.row.solitaire.DiscardPileLayeredPane.java
eu.veldsoft.four.row.solitaire.DiscardPile.java
eu.veldsoft.four.row.solitaire.FireworksDisplay.java
eu.veldsoft.four.row.solitaire.FourRowSolitaire.java
eu.veldsoft.four.row.solitaire.GameActivity.java
eu.veldsoft.four.row.solitaire.GameDifficulty.java
eu.veldsoft.four.row.solitaire.GameState.java
eu.veldsoft.four.row.solitaire.HelpActivity.java
eu.veldsoft.four.row.solitaire.MenuActivity.java
eu.veldsoft.four.row.solitaire.SettingsActivity.java
eu.veldsoft.four.row.solitaire.SingleCellLayeredPane.java
eu.veldsoft.four.row.solitaire.SingleCell.java
eu.veldsoft.four.row.solitaire.SolitaireBoardFrame.java
eu.veldsoft.four.row.solitaire.SolitaireBoard.java
eu.veldsoft.four.row.solitaire.SolitaireLayout.java
eu.veldsoft.four.row.solitaire.SolitairePanel.java
eu.veldsoft.four.row.solitaire.SoundsSettings.java
eu.veldsoft.four.row.solitaire.StatisticsActivity.java
eu.veldsoft.four.row.solitaire.StatisticsTab0Activity.java
eu.veldsoft.four.row.solitaire.StatisticsTab1Activity.java
eu.veldsoft.four.row.solitaire.StatisticsTab2Activity.java
eu.veldsoft.four.row.solitaire.StatisticsTab3Activity.java
eu.veldsoft.four.row.solitaire.StatisticsTab4Activity.java
eu.veldsoft.four.row.solitaire.StatisticsTab5Activity.java
eu.veldsoft.four.row.solitaire.ThroughLimit.java
eu.veldsoft.four.row.solitaire.TopTimes.java
eu.veldsoft.four.row.solitaire.WinActivity.java
eu.veldsoft.four.row.solitaire.WinScreen.java