Android Open Source - MathGame Keypad Activity






From Project

Back to project page MathGame.

License

The source code is released under:

GNU General Public License

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

/**
 * Copyright (C) 2012 by Luis ??ngel Fernndez Fernndez <la@zzsoft.es>
 * //www  . ja v  a  2s. co  m
 * This file is part of MathGame.
 * 
 * MathGame 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.
 * 
 * MathGame 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 Foobar.  If not, see <http://www.gnu.org/licenses/>.ww.gnu.org/licenses/>.
 */

package zzsoft.la.mathgame;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

/**
 * @author Luis ??ngel Fernndez Fernndez
 *
 */
public class KeypadActivity extends Activity {

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_keypad);
  }
  
  public void onClickKeypad(View v) {
    Intent intent = new Intent();
    intent.putExtra("key_pressed", ((Button)v).getText());
  
    setResult(2, intent);
    finish();
  }
}




Java Source Code List

zzsoft.la.mathgame.KeypadActivity.java
zzsoft.la.mathgame.MainActivity.java