Skip to content

Instantly share code, notes, and snippets.

@PondThaitay
Created December 2, 2016 07:22
Show Gist options
  • Save PondThaitay/8f0da32c38deb30e6c93db550e70c8e1 to your computer and use it in GitHub Desktop.
Save PondThaitay/8f0da32c38deb30e6c93db550e70c8e1 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