Created
March 16, 2015 00:57
-
-
Save agusbrand/dd8c09c178074335ba9a to your computer and use it in GitHub Desktop.
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
myButton.setOnClickListener(new View.OnClickListener() { | |
public void onClick(View v) { | |
SimpleDateFormat formatter = new SimpleDateFormat("h:mm:ss a"); | |
String strWhen = formatter.format(new Date()); | |
TextView myTextview = (TextView) | |
findViewById(R.id.TextViewToShow); | |
myTextview.setText("Clicked at " + strWhen); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment