Skip to content

Instantly share code, notes, and snippets.

@DanishAmjad12
Last active July 23, 2018 08:35
Show Gist options
  • Save DanishAmjad12/9ca28e1085ac132d94aa2a683190cf62 to your computer and use it in GitHub Desktop.
Save DanishAmjad12/9ca28e1085ac132d94aa2a683190cf62 to your computer and use it in GitHub Desktop.
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityMainBinding activityMainBinding= DataBindingUtil.setContentView(this,
R.layout.activity_main);
UserModel userModel=new UserModel("John");
activityMainBinding.setUser(userModel);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment