package j4ckall.rxflux.ui.registration; import android.databinding.DataBindingUtil; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import j4ckall.rxflux.R; import j4ckall.rxflux.databinding.ActivityRegistrationBinding; public class RegistrationActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActivityRegistrationBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_registration); RegistrationViewModel viewModel = new RegistrationViewModel(); binding.setViewModel(viewModel); getLifecycle().addObserver(viewModel); } }