Skip to content

Instantly share code, notes, and snippets.

@ramonrabello
Created September 16, 2019 05:44
Show Gist options
  • Save ramonrabello/cbd435b5ae7124b9e97265542efb5912 to your computer and use it in GitHub Desktop.
Save ramonrabello/cbd435b5ae7124b9e97265542efb5912 to your computer and use it in GitHub Desktop.
View Binding using findViewById()
public class MainActivity extends Activity {
private TextView description;
private Button signInButton;
private Button cancelButton;
// onCreate()
description = (TextView) findViewById(R.id.description);
signInButton = (Button) findViewById(R.id.signInButton);
cancelButton = (Button) findViewById(R.id.cancelButton);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment