Skip to content

Instantly share code, notes, and snippets.

@Wicowyn
Created December 19, 2015 14:30
Show Gist options
  • Save Wicowyn/29cfa72eef9377db69db to your computer and use it in GitHub Desktop.
Save Wicowyn/29cfa72eef9377db69db to your computer and use it in GitHub Desktop.
Android - Java 7 / 8
//En Java 7
findViewById(R.id.mon_bouton).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
maFonction();
}
});
//En Java 8 + Retrolambda
findViewById(R.id.mon_bouton).setOnClickListener(v -> maFonction());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment