Created
January 8, 2017 10:07
-
-
Save adityaladwa/7f7d524d3fffc7cadadca410debc3823 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.ladwa.aditya.databinding_blitzkrieg.User"/> | |
<variable | |
name="presenter" | |
type="com.ladwa.aditya.databinding_blitzkrieg.Presenter"/> | |
</data> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:gravity="center_horizontal" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="@{user.firstName}"/> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="@{user.lastName}"/> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="@{Integer.toString(user.age)}"/> | |
<Button | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:onClick="@{presenter::onClickMethod}" | |
android:text="Method Reference"/> | |
<Button | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:onClick="@{()->presenter.onClickReference(user)}" | |
android:text="Listener Binding"/> | |
</LinearLayout> | |
</layout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment