Skip to content

Instantly share code, notes, and snippets.

@khle
Created August 9, 2016 22:20
Show Gist options
  • Select an option

  • Save khle/84b4253ea3151b437ce5f6355081a209 to your computer and use it in GitHub Desktop.

Select an option

Save khle/84b4253ea3151b437ce5f6355081a209 to your computer and use it in GitHub Desktop.
public class LoginActivity extends AppCompatActivity {
private LoginViewModel loginViewModel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityLoginBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_login);
loginViewModel = new LoginViewModel("", "");
binding.setLoginViewModel(loginViewModel);
binding.setHandler(loginViewModel);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment