Forked from PondThaitay/MainActivity.class (setData)
Created
February 7, 2017 13:50
-
-
Save jedsada-gh/035ecb6e46dc8a7b13a667bf4a151e02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompatActivity { | |
private ActivityMainBinding binding; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
binding = DataBindingUtil.setContentView(this, R.layout.activity_main); | |
UserModel user = new UserModel(); | |
user.setFirstName("Jedsada"); | |
user.setLastName("Tiwongvorakul"); | |
user.setAge(22); | |
binding.setData(user); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment