Last active
August 28, 2018 08:52
-
-
Save prakashpun/b145f2b8e3e557e2bcdef50225a74c14 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
<?xml version="1.0" encoding="utf-8"?> | |
<layout xmlns:android="http://schemas.android.com/apk/res/android"> | |
<data> | |
<variable | |
name="user" | |
type="com.tuts.prakash.databinding.model.User" /> | |
<variable name="handler" | |
type="com.tuts.prakash.databinding.handlers.MyHandlers"/> | |
</data> | |
<LinearLayout | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
android:padding="@dimen/padding16" | |
tools:context=".MainActivity" | |
tools:showIn="@layout/activity_main"> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="@{user.name, default=@string/placeholder_name}" /> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="@{user.email,default=@string/placeholder_email}" /> | |
<Button | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="@string/btn" | |
android:onClick="@{(view) -> handler.btnClick(view, user)}" /> | |
</LinearLayout> | |
</layout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment