Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jedsada-gh/035ecb6e46dc8a7b13a667bf4a151e02 to your computer and use it in GitHub Desktop.
Save jedsada-gh/035ecb6e46dc8a7b13a667bf4a151e02 to your computer and use it in GitHub Desktop.
public class MainActivity extends AppCompatActivity {
private ActivityMainBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
UserModel user = new UserModel();
user.setFirstName("Jedsada");
user.setLastName("Tiwongvorakul");
user.setAge(22);
binding.setData(user);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment