Skip to content

Instantly share code, notes, and snippets.

@DanishAmjad12
Last active July 23, 2018 08:35
Show Gist options
  • Save DanishAmjad12/acf5a489fc1b5096d1abf8a80de585af to your computer and use it in GitHub Desktop.
Save DanishAmjad12/acf5a489fc1b5096d1abf8a80de585af to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<data>
<variable
name="user"
type="com.example.daamjad.databinding.bindingModels.UserModel"/>
<variable
name="handlers"
type="com.example.daamjad.databinding.bindingModels.MyHandlers"/>
</data>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{user.firstName}"
android:onClick="@{handlers::onClick}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment