Last active
December 29, 2015 06:49
-
-
Save Bapho/7631856 to your computer and use it in GitHub Desktop.
This is the start activity. - three-day project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.baphoware.prjhelloween.activities; | |
import com.baphoware.prjhelloween.R; | |
import com.baphoware.prjhelloween.R.layout; | |
import com.baphoware.prjhelloween.R.menu; | |
import com.baphoware.prjhelloween.listener.HelloWeenActivityOnClickListener; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.view.Menu; | |
import android.widget.Button; | |
public class HelloWeenActivity extends Activity | |
{ | |
// Button deklarieren | |
private Button cmdStart = null; | |
private Button cmdExit = null; | |
// Listener deklarieren | |
private HelloWeenActivityOnClickListener mainListener = null; | |
@Override | |
protected void onCreate( Bundle savedInstanceState ) | |
{ | |
super.onCreate( savedInstanceState ); | |
setContentView( R.layout.hello_ween_layout ); | |
// Button initialisieren | |
cmdStart = (Button) findViewById( R.id.cmdStart ); | |
cmdExit = (Button) findViewById( R.id.cmdExit ); | |
// Listener deklarieren und initialisieren | |
mainListener = new HelloWeenActivityOnClickListener(); | |
// Listener zuweisen und setzen | |
cmdStart.setOnClickListener( mainListener ); | |
cmdExit.setOnClickListener( mainListener ); | |
} | |
@Override | |
public boolean onCreateOptionsMenu( Menu menu ) | |
{ | |
getMenuInflater().inflate( R.menu.hello_ween, menu ); | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment