-
-
Save udacityandroid/797532fc79eed21d801e to your computer and use it in GitHub Desktop.
Android Development for Beginners : Cola Wars Example
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
public class MainActivity extends AppCompatActivity { | |
... | |
public void voteUdacicola(View view) { | |
int udacicolaVotes = 0; | |
udacicolaVotes = udacicolaVotes + 1; | |
} | |
public void votePepcity(View view) { | |
int pepcityVotes; | |
pepcityVotes = pepcityVotes + 1; | |
} | |
public void showMeVotes(View view) { | |
display(udacicolaVotes + " vs. " + pepcityVotes); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
very nice course