Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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