Skip to content

Instantly share code, notes, and snippets.

@yelinaung
Created June 18, 2015 05:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yelinaung/7bb27cf18513beb53a9c to your computer and use it in GitHub Desktop.
Save yelinaung/7bb27cf18513beb53a9c to your computer and use it in GitHub Desktop.
MMAUG Simple Databinding - Normal MainActivity.java
public class MainActivity extends AppCompatActivity {
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView userName = (TextView) findViewById(R.id.userName);
TextView userAge = (TextView) findViewById(R.id.userAge);
TextView userAddress = (TextView) findViewById(R.id.userAddress);
User user = new User("Xernicon", "24", "Yangon, Myanmar");
userName.setText(user.name);
userAge.setText(user.age);
userAddress.setText(user.address);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment