Last active
March 7, 2018 10:04
-
-
Save bluemyria/81103be2e6adc2c59c8ee0b4d72cad45 to your computer and use it in GitHub Desktop.
Android - 008 - OnClickListener for multiple buttons
This file contains hidden or 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
private class myOCL implements View.OnClickListener { | |
@Override | |
public void onClick(View view) { | |
Intent myIntent; | |
switch (view.getId()) { | |
case R.id.btnWortPaar1: | |
myIntent = new Intent(MainActivity.this, WortPaar2Activity.class); | |
startActivityForResult(myIntent, 1); | |
break; | |
case R.id.btnSuchen1: | |
//myIntent = new Intent(MainActivity.this, Suchen3Activity.class); | |
//startActivityForResult(myIntent, 1); | |
break; | |
case R.id.btnWoerterListe1: | |
myIntent = new Intent(MainActivity.this, WoerterListe4Activity.class); | |
startActivityForResult(myIntent, 1); | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment