Skip to content

Instantly share code, notes, and snippets.

@blogdarkspot
Created June 23, 2017 23:16
Show Gist options
  • Save blogdarkspot/e741b8d09a2143c0cb850b80fff0713b to your computer and use it in GitHub Desktop.
Save blogdarkspot/e741b8d09a2143c0cb850b80fff0713b to your computer and use it in GitHub Desktop.
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