-
-
Save LondonAppDev/f6c428f7c2d0c271320935ae4b147713 to your computer and use it in GitHub Desktop.
1602 Helper Functions
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
private void clearRepoList() { | |
// This will clear the repo list (set it as a blank string). | |
this.tvRepoList.setText(""); | |
} | |
private void addToRepoList(String repoName, String lastUpdated) { | |
// This will add a new repo to our list. | |
// It combines the repoName and lastUpdated strings together. | |
// And then adds them followed by a new line (\n\n make two new lines). | |
String strRow = repoName + " / " + lastUpdated; | |
String currentText = tvRepoList.getText().toString(); | |
this.tvRepoList.setText(currentText + "\n\n" + strRow); | |
} | |
private void setRepoListText(String str) { | |
// This is used for setting the text of our repo list box to a specific string. | |
// We will use this to write a "No repos found" message if the user doens't have any. | |
this.tvRepoList.setText(str); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment