Skip to content

Instantly share code, notes, and snippets.


LondonAppDev/ Secret

Last active Feb 23, 2017
What would you like to do?
1602 onCreate Method
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(; // Link our github user text box.
this.btnGetRepos = (Button) findViewById(; // Link our clicky button.
this.tvRepoList = (TextView) findViewById(; // 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
You can’t perform that action at this time.