Created
June 23, 2017 23:16
-
-
Save blogdarkspot/e741b8d09a2143c0cb850b80fff0713b 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
package com.example.fabio.databind | |
import android.databinding.DataBindingUtil | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
import com.example.fabio.databind.databinding.ActivityMainBinding | |
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
val binding : ActivityMainBinding = DataBindingUtil.setContentView(this, | |
R.layout.activity_main) | |
var user : Person = Person("Fabio", 29) | |
binding.user = user | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment