Skip to content

Instantly share code, notes, and snippets.

View leocruzdev's full-sized avatar
🏠
Working from home

Leonardo Cruz leocruzdev

🏠
Working from home
  • Brasil
View GitHub Profile
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 25, 2024 19:45
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@udacityandroid
udacityandroid / onCreate method in MainActivity.java
Created May 13, 2016 18:17
Use OnClickListeners for All Categories - onCreate method in MainActivity.java
// Find the View that shows the numbers category
TextView numbers = (TextView) findViewById(R.id.numbers);
// Set a click listener on that View
numbers.setOnClickListener(new View.OnClickListener() {
// The code in this method will be executed when the numbers View is clicked on.
@Override
public void onClick(View view) {
Intent numbersIntent = new Intent(MainActivity.this, NumbersActivity.class);
startActivity(numbersIntent);