Skip to content

Instantly share code, notes, and snippets.

@vsay01
Created August 27, 2017 21:10
Show Gist options
  • Save vsay01/838a66008a0b356a5278469190f8c5fd to your computer and use it in GitHub Desktop.
Save vsay01/838a66008a0b356a5278469190f8c5fd to your computer and use it in GitHub Desktop.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityDetailBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_detail);
//This is just initalize the mEvent instance
mEvent = new Gson().fromJson(getIntent().getStringExtra(Constants.EVENT_EXTRA), Event.class);
binding.setEvent(mEvent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment