-
-
Save LondonAppDev/ddccecdb3c2d7296bce37ca34e51188b to your computer and use it in GitHub Desktop.
1602 onCreate Method
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); // This is some magic for Android to load a previously saved state for when you are switching between actvities. | |
setContentView(R.layout.activity_main); // This links our code to our layout which we defined earlier. | |
this.etGitHubUser = (EditText) findViewById(R.id.et_github_user); // Link our github user text box. | |
this.btnGetRepos = (Button) findViewById(R.id.btn_get_repos); // Link our clicky button. | |
this.tvRepoList = (TextView) findViewById(R.id.tv_repo_list); // Link our repository list text output box. | |
this.tvRepoList.setMovementMethod(new ScrollingMovementMethod()); // This makes our text box scrollable, for those big GitHub contributors with lots of repos :) | |
requestQueue = Volley.newRequestQueue(this); // This setups up a new request queue which we will need to make HTTP requests. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment