Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private ActivityMainBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
//tvTitle = TextView in layout with id = tv_title
binding.tvTitle.setText("Hello world!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment